DEV Community

ORCHESTRATE
ORCHESTRATE

Posted on

Active Inference, The Learn Arc — Part 32: Session §6.1 — States, Observations, Actions (the Design Recipe)

Session 6.1 — Design: states, observations, actions

Series: The Learn Arc — 50 posts teaching Active Inference through a live BEAM-native workbench. ← Part 31: Session 5.4. This is Part 32.

The session

Chapter 6, §1. Session title: States, observations, actions. Route: /learn/session/6/s1_states_obs_actions.

Chapter 6 is the design-recipe chapter. Session 4.1 introduced the three lists in theory; Session 6.1 walks through them in practice with two extended examples. By the end of the session you should be able to sit down with any problem description and produce the three lists in under 10 minutes.

The worked example: a foraging squirrel

Session 6.1's first worked example is a squirrel that forages for acorns in a small patch of forest. The book walks through:

  • States: position in the patch (6 cells), acorn cached at home (boolean), season (summer / winter).
  • Observations: visual acorn-sighting (yes/no), position-hint (coarse), hunger level (3 tiers).
  • Actions: move cardinal (4), cache acorn at home, consume cached acorn.

Three lists. Each item justified. Then you write A, B, C, D.

The worked example: a doctor diagnosing

Session 6.1's second example is a doctor deciding between diagnoses. Very different domain. Same three-list pattern:

  • States: which disease (k options), patient's true fever/pain levels (integer scale).
  • Observations: reported symptoms (yes/no per symptom), lab values (continuous, discretized).
  • Actions: order test, prescribe medication, observe, discharge.

The pattern is the same. The content is different.

The takeaway: list discipline

Session 6.1's real teaching: the three lists force discipline. You cannot hand-wave. You cannot say "the agent figures it out." You have to commit to:

  • What variables the agent tracks.
  • What it can see.
  • What it can do.

That commitment is what downstream matrices fill in. Any time your agent behaves weirdly, go back to Session 6.1 and ask: did I pick the right lists?

Two common mistakes

Mistake 1: state = observation. A list like states = {saw_wall_north, saw_wall_south}. This is the observation, not the state. The state is which_cell_am_I_in. The observation is the wall signature at that state. Keep them separate.

Mistake 2: action = internal decision. A list like actions = {decide_to_plan_deeper, decide_to_stop}. These are internal reasoning, not emissions to the world. Actions must be things the world can respond to.

The Workbench's preflight catches both — it validates A's shape against the world's observation schema, and B's against the action vocabulary. If your lists are wrong, Studio refuses to attach.

The concepts this session surfaces

  • State commitment — picking what persists across ticks.
  • Observation emission — what the world actually gives you.
  • Action emission — what the agent actually sends back.
  • Domain translation — the same three-list pattern across very different problems.

The quiz

Q: You're designing an Active Inference agent to play a simple card game. Which of the following is a bad state list?

  • ☐ Whose turn it is, cards in hand, cards in discard pile.
  • ☐ The opponent's observed move last turn. ✓
  • ☐ Current score for each player, game phase.
  • ☐ The deck's current shuffle order.

Why: "Opponent's observed move last turn" is an observation, not a state. The state is what persists across ticks — score, hand contents, game phase. Last turn's move is evidence the agent uses to update belief about hidden states; it isn't itself a hidden state.

Run it yourself

The mental move

Good agents are built on good lists. Session 6.1 is short, but every hour you spend here saves ten hours of downstream debugging. The three lists are where every Active Inference project either lands or fails.

Next

Part 33: Session §6.2 — A, B, C, D. Once you have the three lists, you fill the four matrices. Session 6.2 walks through how to do that carefully. Real domains, real values, real validators.


⭐ Repo: github.com/TMDLRG/TheORCHESTRATEActiveInferenceWorkbench · MIT license

📖 Active Inference, Parr, Pezzulo, Friston — MIT Press 2022, CC BY-NC-ND: mitpress.mit.edu/9780262045353/active-inference

Part 31: Session 5.4 · Part 32: Session 6.1 (this post) · Part 33: Session 6.2 → coming soon

Top comments (0)