Cadence is a new open-source Python library for building continuously learning agents, which the project calls brains. It combines learning, memory, planning, and action selection in one persistent object. Each synapse updates from the activity of its two connected neurons plus a broadcast correction signal, with no retained backward graph or global gradient exposed to neurons.
Project snapshot
One loop keeps learning
The GenericBrain.step method receives an observation and the outcome of the previous action. It then updates memory and synapses, settles the brain’s state, and selects the next action. Every call can modify the same object used for action selection, so the library has no separate pretraining, fine-tuning, inference, or frozen deployment modes.
Each brain contains recurrent cortices that settle into a joint equilibrium. An incoming reading is centered, projected through a fixed sparse expansion, and filtered by winner-take-all inhibition. Active cells record what followed previous readings, and predictions combine the records associated with the current activity. This mechanism supplies working and episodic memory inside the learning loop, without requiring a separate replay buffer.