Low prediction error High prediction error
⚠ Couldn't load the 3D engineThree.js failed to load from the CDN. Check your connection and reload.

Predictive Coding: A Free-Energy Model of an Adaptive Mind

Theories of machine and biological "consciousness-like" behaviour keep returning to the same mechanism: a system that builds an internal model of itself and its world, then continuously revises that model to minimise surprise. This simulator renders that mechanism directly — a real three-layer hierarchical predictive-coding network performing gradient descent on variational free energy, exactly as formalised by Rao & Ballard's predictive-coding theory of cortex and Karl Friston's free-energy principle. A sensory layer receives a noisy, drifting world signal; a hidden layer and a top belief layer try to predict it top-down, and the mismatch — prediction error — drives their states to update until the surprise is explained away. Adjust the precision (attentional weighting) of each level, inject a sudden surprising input, and watch free energy spike and settle in real time.