Sequence Replay & Ratchet

A whole walked path lives in one hypervector: bundle each step under a permutation that tags its order, and you can replay any position later. And because reward credits a route by how fast it was, the colony's memory slowly ratchets onto the shortcut.

A path in one vector — ρ-tagged sequence

Encode the route as P = Σ ρk(cellk) — step 0 plain, step 1 shifted once, step 2 twice… To replay position k, undo the shift (ρ−k) and clean up to the nearest cell. One vector, the entire trajectory.

path length 9

The shortcut ratchet — speed-weighted credit

Both routes reach the goal, but each solve deposits credit on its branch move scaled by speed: a 9-step detour banks little, a 4-step dash banks a lot. Reinforce the long route first — then watch a few short solves overtake it. The agent always takes the higher bar.

speed bonus 1.5
long route
×0
0.00
short route
×0
0.00
No credit yet — the branch move is unlearned.
How it works. ρ (cyclic shift) is its own inverse under ρ−k, so shifting each step by its index stamps order into the bundle without a separate position field; replay just unshifts and cleans up. Capacity is the usual bundle limit — push the length up and the later steps blur first. For the ratchet, every solve adds credit ⊗ branch-move into one accumulator; the readout is the dot product, so the move with the most banked credit wins. Scaling that credit by 1 + bonus·(9−len)/9 means the shortcut earns more per solve and overtakes even after the detour was learned first.

Tie to Neuron Lab. The history vector is exactly the project's H ← clip(decay·ρ(H) + state) — a ρ-summary of the path walked, recent steps loudest, so route memory is content-addressed by trajectory not grid coordinate. The ratchet is its speedBonus: "shorter routes earn more credit per replay, so the agent ratchets toward shorter paths."