The Submarine

Active inference, Markov blankets, and the loop of perception and action

A guided interactive demonstration

A small submarine moves through a dark ocean.

The pilot inside cannot directly touch the ocean, see all its dangers, or know with certainty what lies beyond the hull.

Instead, the pilot receives signals: sonar echoes, pressure changes, vibrations, turbulence, instrument readings.

The question is no longer only: What caused my sensations? It is also: What should I do next?

πŸͺ¨
πŸ‹
βš“
〰️
Markov blanket / hull
sensory signals inward
actions outward

The hull is a boundary β€” but not a wall of isolation.

The submarine hull separates the inside of the vessel from the outside ocean. But it also allows contact between them.

This is the intuitive idea behind a Markov blanket: a boundary that separates internal states from external states while mediating their interaction through sensory and active states.

outside ⇄ sensory states ⇄ inside ⇄ active states ⇄ outside
external states
rocks, whales, currents
sensory states
sonar, pressure, vibration
internal states
beliefs, expectations, model
active states
turning, pinging, ascending

Perception and action form a loop.

The submarine is not a passive camera. It actively samples the world. It can send a sonar ping, slow down, turn away, or ascend.

🌊

External states

Things outside: rock walls, whales, open water, wrecks, currents, pressure zones.

πŸ“‘

Sensory states

Signals arriving at the blanket: sonar echoes, pressure, vibration, turbulence.

🧠

Internal states

The model inside: beliefs about what is out there and what will happen next.

βš™οΈ

Active states

Actions through the blanket: steering, ascending, slowing, sending sonar.

❗

Prediction error

A mismatch between expected signals and incoming signals.

πŸ”

Active inference

Update beliefs and act to reduce uncertainty and remain viable.

Interactive: what should the submarine do?

Current posterior belief

belief update: posterior ∝ prior Γ— likelihood
active step: choose an action to change future sensory evidence

Choose an action

Each action changes what the submarine samples next. In active inference, action is part of inference.

Why this is active inference

In the Windowless Room demo, the being updated its beliefs about hidden causes.

Here, the submarine does something more. It acts. By turning, pinging, slowing, or ascending, it changes the sensory stream it will receive next.

The system therefore reduces uncertainty in two linked ways:

  • by changing internal beliefs to better explain sensory evidence;
  • by changing the world/body relation so that future evidence becomes safer, clearer, or more predictable.

The core loop

predict β†’ sense β†’ compare β†’ update β†’ act β†’ sense again

This is why active inference is not just a theory of perception. It is a theory of embodied, self-maintaining systems.

Everyday active inference

The submarine is only a teaching image. The same logic appears throughout ordinary life.

Walking in fog.
You slow down, turn your head, listen harder, and move to create better sensory evidence.
Searching for your phone.
You do not just think harder. You lift cushions, retrace steps, call it, and sample the world.
Crossing a road.
You look, listen, pause, and adjust your movement to reduce uncertainty about cars.
Hearing a noise at night.
You may freeze, listen again, switch on a light, or walk toward the sound. Action tests hypotheses.
Touching an object in the dark.
Your hand moves around the object to infer its shape. Perception is guided exploration.
Conversation.
You lean forward, ask β€œsorry?”, watch the face, and use action to clarify uncertain speech.

Final teaching point

Living systems do not only infer what is out there. They act to sample the world, reduce uncertainty, and keep themselves viable.

The submarine helps us see the logic of active inference. It is enclosed, but not isolated. It is separated from the ocean by a boundary, but that boundary is exactly what allows perception and action.

The Markov blanket is therefore not simply a barrier. It is the structured interface through which a system maintains itself as a system.

From room to submarine

The Windowless Room shows Bayesian perception: hidden causes must be inferred from sensory effects.

The Submarine adds embodiment and action: the system acts through its boundary to generate better evidence and remain within safe states.

perception and action are one inferential loop