Most influential parameters: Desired arousal (flips) · Current arousal (flips) · Crowd / obstacles (flips)
Expected Free Energy Model
Each policy π (walk, skip, run, stroll) is scored by its expected free energy:
G(π)=k∑wk⋅Ck(π)−wi⋅InfoGain(π)
where the cost terms Ck are Risk, Ambiguity, Energy, Social, Injury, and ∣Arousaldesired−Arousalpredicted∣.
The policy with the lowest G is selected. Costs (risk, energy, social penalty, injury, ambiguity, arousal mismatch) increase G; information gain decreases it, rewarding exploratory behaviour.
Policy Specifications
Each gait is parametrised by six numbers that feed into the EFE terms:
Spec
Walk
Skip
Run
Stroll
impact
0.25
0.75
0.90
0.15
signalAmp
0.35
0.85
0.80
0.20
energyPerDist
0.25
0.55
0.75
0.15
conspicuous
0.20
0.85
0.65
0.10
complexity
0.25
0.75
0.45
0.10
speed
0.35
0.55
0.85
0.20
impact drives injury probability; signalAmp is proprioceptive richness (high for skip); conspicuous feeds the social penalty; complexity determines how much there is to learn.
The Child-Adult Crossover
Both a child and an adult share the same EFE equation and the same four policies. The difference is the weight vector w. A child operates with high wi (curiosity) and low ws (social cost), so skipping wins: it is complex, proprioceptively rich, and novel. An adult raises ws, we, and wj, which penalises skipping enough that walking takes over. Try the Child and Adult presets and sweep mastery or normPressure to watch the crossover happen.
Notes
This is a toy model. The policy specs are hand-tuned, not fitted to biomechanical or behavioural data.
All context variables and weights are normalised to [0, 1] or [0, 2]. Absolute G values are arbitrary; only the ranking matters.
The radar chart shows raw component values (before weighting). The waterfall shows weighted contributions to G.
Sensitivity is measured by perturbing each context parameter by ±0.05 and checking whether the winner changes.
Model provenance
claude opus 4.8February 2026·first cut. builds the gait-gambit sandbox as an active-inference policy selector: four gaits (walk, skip, run, stroll) each scored by an expected free energy made of six weighted cost terms minus information gain, with a 2D winner heatmap, crossover sweep, radar of raw components, an EFE waterfall for the winner, a sensitivity ranking, and a stick-figure preview. calibration verifies that every deterministic EFE component reproduces its closed-form definition exactly, and six assumptions keep the active-inference framing apart from the hand-tuned, unit-free specifications.
Calibration
Modeling assumptions
Model changelog
v1.0February 2026
policy model: G(pi) = sum_k w_k C_k(pi) minus w_info InfoGain(pi) over four gaits; lowest G wins.
six cost terms (risk, ambiguity, energy, social penalty, injury, arousal mismatch) plus an information-gain reward, each a clamped closed form over ten [0,1] context variables.
per-gait specification table (impact, signal amplitude, energy per distance, conspicuousness, complexity, speed) feeding the cost formulas.
visual suite: winner heatmap over any two context axes, crossover sweep along one axis, raw-component radar, weighted EFE waterfall for the winning gait, and a stick-figure preview.
sensitivity ranking by perturbing each context variable by plus or minus 0.05 and flagging whether the winning gait flips.
calibration: every deterministic EFE component checked against its hand-derived closed form, reproducing to four decimals; the stochastic time-stepping is left out of the calibration on purpose.
framing kept honest: the active-inference equation is principled but the gait specs are hand-tuned and unit-free, and the child-versus-adult crossover is an interpretive weight change, not fitted data.