The A-not-B Error: Object Permanence and Infant Working Memory (2D Field Model)
A 2D dynamic-neural-field model of Piaget's A-not-B error: two competing activation traces are numerically integrated every frame, with a learned habit trace at A racing a fresh memory trace at B, so the reach outcome emerges from real field dynamics, not a scripted probability.
Between roughly 8 and 12 months, infants pass through one of the most famous demonstrations in developmental psychology: shown a toy hidden repeatedly at location A, then watched it hidden at a new location B, they often still reach back to A. This 2D canvas simulator models that classic Piagetian "A-not-B error" as a pair of competing dynamic-neural-field nodes — one per hiding location — numerically integrated every frame following the working-memory-plus-habit account developed by Adele Diamond and formalised as an activation field by Esther Thelen, Gregor Schöner and colleagues. Adjust the simulated infant's age, the delay before it is allowed to search, and how many times it previously found the toy at A, then run trials and watch the two live activation traces and their memory-trace inputs race to decide — correctly at B, or perseveratively at A — exactly as real infants do in the lab.
Model Piaget's classic A-not-B error as a race between a decaying working-memory trace for an object's new hiding place and a learned reaching habit, and watch how age, delay and training trials change whether the simulated infant searches correctly or perseverates.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install