Theory Reader — Learning Path
You want to understand the why behind COGANT: how Active Inference, Markov blankets, and the GNN format combine to make "code as a generative model" a coherent claim rather than a metaphor. This path is for researchers, reviewers, and anyone who needs to defend or critique the approach.
Estimated reading time: ~3 hours. No hands-on requirement, but having an example GNN open in a side window helps.
Steps
-
Active Inference for Programmers — The friendliest entry point. Builds intuition for the Free Energy Principle and active inference using programming analogies before any math. Read this even if you already know active inference — it sets up the COGANT- specific vocabulary used throughout the rest of the docs.
-
Markov Blankets in Codebases — The central conceptual move: a function (or module, or service) is a Markov blanket separating internal state from sensory inputs and active outputs. This is what makes the translation well-defined.
-
What is a GNN? — The notation we emit. Once you understand Markov blankets, GNN is "just" a serialization format for the resulting state-space model.
-
The Forward-Reverse Cycle — Why we care about being able to translate code → GNN → code, and what it means for the translation to be (approximately) an isomorphism. This is the theoretical hinge of the project.
-
Roundtrip Evaluation — The empirical counterpart to step 4: how we measure whether the roundtrip preserves semantics, what the current numbers look like, and how to read them.
-
Active Inference Mapping (R&D) — The deep dive. Where each piece of an active-inference generative model (states, observations, actions, preferences, priors) lives in a real codebase, with worked examples.
Adjacent reading (optional but recommended)
- Active Inference Primer (theory/) — More mathematical treatment of the same material as step 1.
- Code as Generative Model — The full theoretical framing.
- Isomorphism Theorem and the empirical results.
- GNN Format Reference — When the conceptual treatment isn't enough and you need the formal grammar.
- Literature and Related Work for situating the project.
Where to go next
- To see the theory in action on a real repo, follow the New User tutorials.
- To extend the active-inference mapping to a new construct, follow the Plugin Author path.
- If you have suggestions, corrections, or want to contribute, follow the Contributor path.