The balance-beam sweep
Question
Does the structure of the modulatory coupling and the body geometry determine the structure of the world the agent can build?
Setup
Each condition runs the self-localized mapper under a different "balance beam", varying both:
- (a) information-routing topology — how whisker affordances are routed into
the steering command:
flat/distributed (all whiskers pooled at once) vshierarchical/layered (whisker groups summarized, then combined), viaHAPExplorer(routing=...); - (b) physical body geometry — whisker count (3 / 5 / 9) and drive-zone track
width (narrow / wide), via
MouseSchema;
plus the architectural toggles ±BAP (the locomotor drive) and ±HAP (the affordance-recruited haltable action), and proprioceptive noise.
Conditions (9)
full · hierarchical routing · sparse (3w) · dense (9w) · narrow track · wide track · −BAP · −HAP · noisy proprioception.
Run
cd experiments && ../.venv/bin/python p2_topology_sweep.py
Outputs
figures/p2_topology_sweep.png— a 3×3 grid of the constructed maps.data/sweep_results.csv— coverage, precision, drift, and parameters per condition; per-conditiondata/sweep_*.npz(hit clouds + trajectories). The full data is gitignored; a curated copy is insamples/.
Findings

A 3×3 grid of constructed maps across the swept conditions. The columns and rows that build a faithful map are immediately visible; the ones that collapse it (no BAP, no HAP, heavy proprioceptive noise) are equally visible.
- ±BAP / ±HAP are decisive. Removing the basal drive (−BAP) collapses coverage to ~20% (no locomotion → it maps only a sliver); removing the haltable affordance-action (−HAP) drops it to ~44% (drives into a wall and stalls). Both modulatory layers are necessary to build a world model — "no modulation → no learning."
- Self-localization quality gates fidelity. Noisy proprioception keeps coverage but drops precision (100% → 74%) with ~6.7 cm drift: the snapshot smears.
- Routing and morphology are robust here (~96–97% across flat/hierarchical, 3/5/9 whiskers, narrow/wide track) — the arena is easy enough that the architecture is forgiving. Harder tasks (sparser sensing, a maze, faster motion) would separate these axes; that knob is built in.