Active Inference in Action

Watch an agent learn through prediction and surprise

Click any shape to have the agent explore it
The Agent's World
Understanding the Process
Agent awaiting instruction...
This agent inhabits a world of abstract shapes. Like a child encountering objects for the first time, it must construct an internal model of what exists—predicting, being surprised, and updating its beliefs.
Agent's Generative Model (Schemas)
?
No schemas yet
Click a shape to begin learning...
I
Generative Models

The agent maintains a generative model—an internal representation of how the world produces sensations. Initially empty, this model grows with experience.

In Piaget's terms, these are schemas: organised patterns of knowledge that guide interpretation and prediction.

II
Prediction and Surprise

Before encountering an object, the agent generates predictions based on its model. The difference between prediction and reality is prediction error.

High prediction error signals disequilibrium—the uncomfortable state that drives learning.

III
Assimilation

When a new experience matches an existing schema, assimilation occurs. The prediction succeeds, free energy stays low, and the model remains stable.

This is the default mode—organisms prefer to confirm rather than revise their models of the world.

IV
Accommodation

When prediction fails significantly, the agent must accommodate—restructure its generative model to reduce future surprise.

In Active Inference, this means updating beliefs μ to minimise variational free energy F(μ).

V
Hierarchical Abstraction

As more objects are encountered, the agent forms abstract categories—schemas that group objects by shared properties.

This emergence of hierarchical structure mirrors how children develop increasingly sophisticated conceptual frameworks.

VI
Active Inference

The agent doesn't passively receive sensations—it actively explores to reduce uncertainty. Clicking shapes simulates the agent's curiosity-driven sampling of its environment.

This is epistemic action: acting to gain information that refines the generative model.

Foundational References

Genetic Epistemology
Piaget, J. (1952). The Origins of Intelligence in Children.
Piaget, J. (1970). Genetic Epistemology.
Piaget, J. (1985). The Equilibration of Cognitive Structures.
Free Energy Principle
Friston, K. (2010). The free-energy principle: A unified brain theory? Nature Reviews Neuroscience.
Parr, T., Pezzulo, G., & Friston, K. (2022). Active Inference: The Free Energy Principle in Mind, Brain, and Behavior. MIT Press.
Bridging Perspectives
Clark, A. (2016). Surfing Uncertainty. Oxford University Press.
Hohwy, J. (2013). The Predictive Mind. Oxford University Press.
Bruineberg, J., Kiverstein, J., & Rietveld, E. (2018). The anticipating brain is not a scientist. Synthese.