Grid Cell Demo 01: Rat Walk Demo in a 2 x 2 Arena
This page is the first step from static geometry toward an actual moving-animal simulation.
The setup is intentionally simple:
- the arena is a fixed $2\times 2$ square
- the rat is controlled by
W,A,S,D - the right side shows four moving waves:
theta,wave 1,wave 2,wave 3 - the middle panel accumulates the cell’s firing as the rat moves
The heatmap keeps the full firing history until you reset it, so the spatial pattern emerges directly from the trajectory itself rather than from a pre-drawn lattice.
Drag inside the arena and the rat will stay locked to the mouse position. The center panel is driven directly by online phase interference: motion updates the waves in real time, the four-wave sum is converted into a 0-1 score, and firing is deposited only when that score crosses the current threshold. The right column shows the live theta wave together with the three direction-tuned waves.
Rat in 2 x 2 Arena
While you drag, the rat moves exactly with the pointer inside the square world, and that movement updates the phase evolution of the directional waves.
Grid Cell Firing
Pale circles show the theoretical firing sites predicted by the same four-wave score and the same threshold. The brighter heat layer records the actual online firing accumulated from the rat's trajectory.
Oscillatory Waves
These four traces show the moving theta wave together with the three direction-tuned waves.