🧠 AI & Machine Learning — 5 Simulations
Machine learning simulations are unusual because the algorithms need to run long enough that you can watch them learn, but short enough that waiting doesn't break the experience. The five simulations in this category each chose a different strategy.
Neural Network — Real-time Training
A fully-connected 2-layer network trained in real time. You draw data points by clicking on the canvas, labelling them as class 0 or class 1, then hit Train and watch the decision boundary form over 100–1000 epochs. The network uses stochastic gradient descent with configurable learning rate and momentum; the loss curve updates every frame.
Q-Learning Maze
Reinforcement learning: an agent on an 8×8 grid learns to reach a goal while avoiding fire traps, using a Q-table and ε-greedy exploration. The training visualisation is the highlight — a heat map of Q-values updates in real time as the agent explores, and policy arrows show the current best action in each cell. Watch it go from random exploration to optimal path in a few hundred episodes.
// Bellman update — the core of Q-learning
Q[state][action] += learningRate * (
reward + gamma * Math.max(...Q[nextState]) - Q[state][action]
);
Self-Organising Map (Kohonen)
576 neurons arranged in a 24×24 grid learn to represent a high-dimensional colour distribution in 2D. The GPU-like ImageData rendering keeps it smooth — you can watch the map's topology unfold in real time as the neighbourhood radius shrinks from the initial broad spread to precise local tuning.
Decision Tree Live (CART)
A recursive CART decision tree grows in real time on three datasets (XOR, Moons, Blob). Each split is shown as it happens — the Gini impurity calculation, the feature and threshold chosen, and the colour-coded decision regions filling in like a mosaic.
5 simulations: neural network, Q-learning, SOM, decision trees, natural selection evolution.
Watch an RL agent learn optimal paths from scratch using Bellman equations and ε-greedy exploration.
🤖 Robotics — 6 Simulations
Robotics simulations sit at the intersection of physics, geometry and control theory. Each of the six covers a distinct problem class.
Inverse Kinematics — FABRIK
FABRIK (Forward And Backward Reaching IK) is the algorithm behind most real-time IK in game engines. The simulation has three modes: single chain, mirrored (for bipedal rigs), and spider mode with six auto-orbiting chains. Each chain is drawn with a cyan-to-purple gradient and updates every frame as you drag the target point.
Drone Swarm
A Boids-based drone swarm with four formation modes (flock, circle, grid, wedge) that the swarm smoothly transitions between. Each agent is drawn as an X-shaped body with four rotor arcs and a 22-frame motion trail. The swarm maintains formations while still obeying separation/alignment/cohesion rules — the tension between formation pressure and local collision avoidance produces organic- looking motion.
Hexapod Walker
Six-legged walking robot with two gait modes: tripod (alternating groups of three) and wave (sequential leg lift). Each leg uses two-link analytical IK — the cosine rule gives exact joint angles for any foot position. The terrain generator creates a mix of flat ground and bumps; the body height adjusts to maintain ground contact.
6 simulations: FABRIK IK, drone swarm, hexapod walker, path planning, soft robot, robotic arm.
Real-time FABRIK chains — drag targets and watch multi-link arms reach, with spider and mirror modes.
💰 Economics — 8 Simulations
Economics is perhaps the most surprising category on this site. Computational economics turns out to be rich territory for browser simulations — agent-based models, dynamical systems, and game-theoretic equilibria all run beautifully in Canvas 2D.
Solow Growth Model
The workhorse model of macroeconomic growth. The Solow model in this simulation is fully analytical: it computes the steady-state capital per effective worker k* and output y* algebraically, then shows both a time series (y, k, c over 200 periods) and a phase diagram with the saving function sf(k̃) plotted against the break-even investment line (δ+g+n)k̃. The golden-rule savings rate s_gold = α is highlighted.
// Solow steady-state: sf(k*) = (δ+n+g)k*
// With Cobb-Douglas: s·k^α = (δ+n+g)·k
// → k* = (s / (δ+n+g))^(1/(1-α))
Income Inequality — Boltzmann-Pareto
N agents repeatedly exchange a fraction of the smaller agent's wealth in random bilateral meetings. From this simple rule, a Pareto-like wealth distribution emerges spontaneously — without any designed hierarchy. The Gini coefficient rises to realistic levels (0.4–0.6) within a few seconds. A tax rate slider redistributes a fraction of wealth at each step, showing how even moderate redistribution significantly reduces inequality.
Opinion Dynamics — Deffuant Model
The Deffuant bounded-confidence model: agents update their opinions only when they encounter agents within ε of their current view. The ε slider controls how open-minded agents are. High ε: the population converges to consensus. Low ε: the population fragments into isolated clusters. A media bias slider injects an external influence. Two views: scatter (opinion vs time for each agent) and timeline (histogram progression).
8 simulations: Solow growth, income inequality, opinion dynamics, financial bubble, bank run, and more.
Boltzmann-Pareto exchange model — watch inequality emerge spontaneously and see the effect of redistribution.
26 categories are now complete with zero "coming soon" placeholders. Every simulation listed in a category is fully functional in EN + UK. The total library stands at 212 simulations.