These docs cover six audiences. Pick the path that matches what you’re trying to do.
Reading the book alongside others? The Active Inference Institute runs rolling cohorts of the textbook group, free and open to everyone — register at textbook-group.activeinference.institute.
chapters/chapter_01.md → run
chapters/chapter_01/01_box_scenario.py,
then the 05_belief_from_stream.py animation and the
interactive_inverse_problem.py slider explorer.chapters/chapter_02.md → run Examples 2.1–2.10.chapters/chapter_03.md → run Examples 3.1–3.7,
the diagnostic visualizers, and the interactive_bayesian_regression.py
and interactive_lgs_localization.py slider explorers.chapters/chapter_04.md → run the variational
examples (coordinate search, fixed-form VI, mean-field CAVI) and the
animation_vfe_descent.py GIF.chapters/chapter_05.md → run the predictive-coding
examples (precision balance, recognition dynamics, multivariate, parameterized,
hierarchical), the two animation orchestrators, and the
interactive_predictive_coding.py slider explorer.chapters/chapter_06.md → run generalized filtering
for perception: online tracking, multivariate filtering, generalized
coordinates, correlated embedding-order precision, and Example 6.7 vector
generalized filtering.chapters/chapter_07.md → run active generalized
filtering: start with set-point regulation, then inspect the §7.5
multivariate action-perception loop and animation.chapters/chapter_08.md → run learning/attention and
hierarchy/message-passing examples.chapters/chapter_09.md → run the categorical POMDP
examples: state inference, dynamic filtering, discrete VFE, Grid World, and EFE.chapters/chapter_10.md → run POMDP learning,
habit/precision, factorial bandit, and hierarchical examples.chapters/chapter_11.md → run Part III planning
extensions: free-energy variants, sophisticated inference, policy-tree
search, preferences, forgetting, and structure learning.chapters/chapter_12.md → run factor-graph
message passing, smoothing, VMP, and hybrid bridge examples.chapters/chapter_13.md → run robotics
navigation and social-inference application demos.chapters/chapter_14.md → run ergodic-density,
entropy-bound, Bayesian-mechanics, and Markov-blanket demos.topics/ page
and come back.Start at topics/ and pick:
| If you’re trying to learn… | Read |
|---|---|
| What Bayesian inference is and why it works on a grid here | topics/bayesian_inference.md |
| How the process / model split is realized in code | topics/generative_models.md |
| The MLE / MAP / BLR / EM lineage | topics/learning_and_inference.md |
Why linear-system solves (Cholesky or np.linalg.solve) matter for MVN math |
topics/multivariate_gaussians.md |
| The stability bound on gradient descent | topics/gradient_descent.md |
| When inversion goes bi-modal | topics/inverse_problem.md |
| The big-picture active-inference / FEP / Bayesian-mechanics triangle | topics/active_inference.md → topics/free_energy_principle.md → topics/bayesian_mechanics.md |
cookbook.md — copy-paste recipes for the 10 most-used
workflows.reference/core.md, reference/estimators.md,
reference/utils.md, reference/visualizations.md
— every public symbol with its signature and purpose.architecture.md — the layered design, so you know
which subpackage owns which concern.notation.md — book symbol ↔ Python identifier table.AGENTS.md and the per-folder AGENTS.md files
(chapters/AGENTS.md, topics/AGENTS.md,
statistics/AGENTS.md, reference/AGENTS.md)
spell out the file contracts every new page must satisfy.AGENTS.md files (under
src/active_inference/<sub>/) tell you when adding a new file is
justified and what minimum review checklist applies.../tests/AGENTS.md.Each page in statistics/ follows the same shape:
definition → closed form (when one exists) → API → tests that pin it
down → pitfalls. The “tests that pin it down” pointers are real test
classes you can run with::
pytest tests/core/test_diagnostics.py::TestKL
Combine that with reference/core.md (the API
table) for full traceability from claim to formula to implementation to
test.
There is no LLM in this repo — every figure and number comes from a script you
run and a library you can read, so the understanding comes from the
run → observe → fix loop rather than from generated prose. Start at
learn_by_hand.md: it shows which three surfaces you
actually touch (src/, chapters/+extras/+demo/, tests/), how to run one
example by hand, and a six-step practice loop for any chapter (read the
orchestrator → read the src/ logic → run it → change one parameter and
re-run → map the code to the book symbol in notation.md → lock it in with a
small test). The hard rule there: never hand-edit output/ to satisfy a
validator — fix the source.
If you only ever read one page, make it cookbook.md;
it surfaces the most common entry points and links into every other
section. If you read a second, make it
architecture.md; it explains how the four
subpackages depend on each other and why the chapter scripts stay
short.