ActInfPOMDP
GNN v1.1
Fundamentals Weather POMDP (Example 9.1)
Discrete perception model of the weather agent in Fundamentals of Active
Inference (Namjoshi), Chapter 9 §9.1, Example 9.1; implemented in this
repository by chapters/chapter_09/example_9_1_state_inference.py.
A is the 3x4 column-stochastic likelihood
A[o, s] = P(observation o | hidden state s).D is the uniform prior over the four hidden states.q(s) = sigma(log A^T o + log D) (book Eq. 13); observing “hot” reproduces
the book’s Eq. 15 posterior [0.18, 0.40, 0.36, 0.06].tests/test_gnn_spec.py fails when either side is edited alone.A[3,4,type=float] # Likelihood P(observation | hidden state); columns are states D[4,type=float] # Prior over hidden states s[4,1,type=float] # Posterior over hidden states o[3,1,type=int] # Observation (one-hot)
D>s s-A A-o o>s
A={ (0.80, 0.33, 0.05, 0.40), (0.15, 0.33, 0.30, 0.05), (0.05, 0.34, 0.65, 0.55) }
D={(0.25, 0.25, 0.25, 0.25)}
Likelihood (every column sums to 1 over observations): A[o, s] = P(o | s)
Exact static perception for a one-hot observation o (book Eq. 13): q(s) = sigma(log A^T o + log D) = softmax(log A[:, o] + log D)
Book Eq. 15, observing “hot” (the second row of A): q = (0.18, 0.40, 0.36, 0.06)
Time=t Static Discrete
A=LikelihoodMatrix D=PriorOverHiddenStates s=HiddenState o=Observation
num_hidden_states: 4 num_obs: 3 state_labels: rainy, cloudy, sunny, snowy observation_labels: water, hot, bright example_observation: hot expected_posterior: 0.18, 0.40, 0.36, 0.06
Fundamentals Weather POMDP (Example 9.1) — the discrete perception model of
chapters/chapter_09/example_9_1_state_inference.py, declared here as GNN.
Validated with the parser revision pinned in specs/gnn-pin.json.
Hand-authored declaration; bound to the implementation by
tests/test_gnn_spec.py. Not cryptographically signed.