Contacts: Marta Gandolla, Marin Bricq
Location: Politecnico di Milano (Bovisa Campus)

Motivation of the study: Shared control between a human and an artificial agent is central to assistive and rehabilitation robotics. The agent should support the user’s goal, adapt to how the user behaves, and avoid working against them. The research group has developed a physical setup for studying this: a human and an Active Inference (AIF) agent jointly lift a shared object in a 2D task. The human acts on one side of the object, while the agent controls the other side through a motor. The agent follows a brain-inspired design: it is a hierarchy of levels, from perception up to intention, in which each level predicts the activity of the level below and updates its beliefs from the resulting prediction errors. Perception itself is part of this hierarchy. A camera tracks the object with two visual cues (colour blobs and ArUco markers), and the agent combines them into a belief about the object’s position and orientation, giving more weight to whichever cue is more reliable at the moment. On top of this, an intention detector lets the agent make some high-level predictions about what the human will do next. A simulation version of the same task is also available for development and testing.


Physical setup for the 2D lifting task, with an illustrative overlay of the processing done by the PC: detection of the reference markers and the object, estimation of the object’s pose, the forces applied at the human (blue) and agent (orange) handles, and the agent’s beliefs. The values shown are illustrative.

However, the current agent essentially treats the human’s inputs as disturbances to cancel out. It reacts to what the human does at each moment, but it does not model how that particular person plays. It has no notion of which strategy they follow, how that strategy changes during a game, or how it carries over from one game to the next. As a result, the collaboration does not improve with experience, and the agent cannot anticipate its partner beyond the short term.


Example trial with the current AIF agent. Top: handle positions and the agent’s low-level beliefs. Middle: the intention detector’s posterior over Lift, Hold and Drop. Bottom: forces applied by the user and the agent. The agent infers the user’s immediate intention but has no representation of their longer-term strategy.

Active Inference addresses this through deep temporal models. In these models, higher levels encode slowly varying hidden states, such as a strategy or a context, and these set the priors for the faster levels below. The current strategy can be inferred online within a game from evidence gathered at the lower levels, while prior beliefs over strategies can be learned across games. Previous work has shown that AIF agents can learn habits over long time scales. Related work on hierarchical AIF has also shown that collaboration can emerge between agents that model each other’s beliefs.

This thesis extends the existing agent with a higher-level strategy layer of this kind. A key technical challenge is the interface between levels. Deep temporal models are usually formulated as discrete POMDPs, while the existing agent performs continuous control, so the project requires a hybrid (discrete–continuous) hierarchical model. The existing discrete intention detector is a natural starting point for this interface.

Objective: The goal of this thesis is to give the AIF agent a model of its human partner’s strategy. The agent should infer that strategy within a game and learn the partner’s tendencies across games. Specific objectives include:

  • Strategy definition: Define a small, concrete set of identifiable human strategies for the 2D lifting task (e.g., leading versus following, or the order in which targets are reached).
  • Within-game strategy inference: Extend the AIF agent with a higher hierarchical level that infers the partner’s current strategy online. The strategy is modelled as a slowly varying discrete hidden state linked to the existing continuous controller.
  • Across-game learning: Enable learning of prior beliefs over strategies across games (e.g., through Dirichlet updates of initial-state or transition parameters), so that the agent adapts to an individual partner over repeated interactions.
  • Validation and evaluation: Validate strategy inference and across-game learning in simulation, against simulated players with known, switchable strategies. Then deploy the agent on the physical setup and evaluate it in a pilot study with human participants, against the current agent as a baseline.
  • Optional extension: Compare the dynamics of the agent’s beliefs with human belief updating. This covers signatures such as gradual evidence accumulation and delayed detection of strategy switches, and comparison with participants’ own judgments of their partner’s strategy.

Expected outcomes:

  • A hierarchical AIF agent that infers the partner’s strategy online, integrated with the existing continuous controller.
  • A mechanism for learning strategy priors across games, so the agent adapts to an individual partner.
  • A set of simulated players with known strategies, usable as a benchmark for strategy inference in shared control.
  • A quantitative comparison with the current agent, in simulation and in a pilot study with human participants.

Candidate profile:

  • Master’s student in Mechanical Engineering, Biomedical Engineering, Robotics, Computer Science, or a closely related field.
  • Strong programming skills, preferably in Python.
  • Solid foundation in probability, Bayesian inference, or estimation theory.
  • Interest in computational neuroscience and human–robot interaction.
  • Bonus: prior experience with Active Inference or predictive coding, POMDPs or hierarchical Bayesian models, control theory, or experimental work with human participants.

Suggested reading:

  • R. Smith, K. J. Friston, C. J. Whyte, “A step-by-step tutorial on active inference and its application to empirical data,” J. Math. Psychol., 2022.
  • T. Parr, G. Pezzulo, K. J. Friston, Active Inference: The Free Energy Principle in Mind, Brain, and Behavior, MIT Press, 2022.
  • K. J. Friston et al., “Deep temporal models and active inference,” Neurosci. Biobehav. Rev., 2017.
  • M. Priorelli, I. P. Stoianov, “Dynamic planning in hierarchical active inference,” Neural Networks, 2025 (code).
  • S. Schwöbel et al., “An active inference perspective on habit learning,” CCN, 2019.
  • J. Pöppel, S. Kahl, S. Kopp, “Resonating minds — Emergent collaboration through hierarchical active inference,” Cogn. Comput., 2022.