STM buffer slot Recall probability Word being presented

Serial Position Effect: Primacy & Recency Lab (2D)

Study a word list at your own pace, add a retention delay before recall, and watch the classic U-shaped serial-position curve emerge from a dual-store short-term / long-term memory model. Rather than plotting a closed-form curve, this build runs an actual stochastic simulation of Atkinson and Shiffrin's buffer model hundreds of times per attempt: a 4-slot short-term memory buffer fills as words are presented, a new word can bump a random occupant once the buffer is full, and every word sitting in the buffer accrues rehearsal ticks that feed a long-term-memory transfer probability. Early words bank rehearsal before the buffer first fills (primacy); the most recently presented words are least likely to have been evicted yet (recency). Switch on the delayed test to insert a distractor task before recall — clearing the buffer and reproducing Glanzer and Cunitz's 1966 finding that recency collapses under a filled delay while primacy survives untouched.