HomeCognitive SciencePredictive Coding: A Free-Energy Model of an Adaptive Mind

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

Interactive 3D predictive-coding network: watch a three-layer hierarchical model minimise variational free energy by explaining away sensory prediction error, the mechanism behind theories of adaptive, self-modelling machine cognition.

Cognitive Science3DAdvanced60 FPS
technology-consciousness ↗ Open standalone

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.

⚙ Under the hood

A real three-layer hierarchical predictive-coding network that minimises variational free energy by explaining away sensory prediction error — the mechanism behind theories of adaptive, self-modelling machine cognition.

predictive codingfree energy principleneural networkconsciousnesscognitive sciencemachine learning

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)