Machine learning is how modern software learns patterns from data instead of following hand-written rules — the technology behind spam filters, recommendation engines, self-driving perception and large language models. This hub pulls together the site's classical statistics, machine learning and neural-network simulations into one guided starting point, so you can watch each algorithm learn step by step instead of treating it as a black box.
16 simulations across Machine Learning, AI & ML and Statistics
Six simulations, in the order we recommend exploring them
Start with the simplest model in machine learning: fitting a line minimises squared error — every later model is a generalisation of this idea.
See the first learning algorithm for classification, and why a single linear unit fails on problems like XOR.
Learn the optimisation engine that trains almost every model on this list — compare SGD, Momentum, RMSprop and Adam directly.
Combine gradient descent with the chain rule to train a multi-layer network — the algorithm behind every deep learning system.
Switch from supervised to unsupervised learning — group unlabelled data by proximity alone.
Finish with a third learning paradigm: an agent that learns from trial, error and reward rather than labelled examples.
The theory and maths behind the simulations above
From linear regression to reinforcement learning — a complete map of the topic
Machine learning is the family of methods that let a computer improve at a task from data rather than from a fixed set of hand-written rules. Instead of programming every decision explicitly, you show a model examples and let an optimisation algorithm adjust its internal parameters until its predictions match reality closely enough. This hub gathers every machine learning simulation on mysimulator.uk into one guided starting point, spanning three interconnected categories — classical statistics, hands-on machine learning algorithms, and the neural-network side of AI — so you can see exactly how a model learns rather than treating it as a black box.
The foundation is supervised learning, where a model is trained on labelled examples. Linear regression is the simplest case: fit a straight line to noisy data by minimising squared error, and every more sophisticated model — from the perceptron to a deep neural network — generalises this same idea. The perceptron simulation shows the first working classification algorithm from 1958, nudging a weight vector after every misclassified point until it separates two classes with a straight line, and famously failing on problems like XOR that no single linear boundary can solve. Decision trees, random forests, k-nearest neighbours and naive Bayes each attack classification with a different strategy — splitting on the most informative feature, voting among many trees, voting among nearby points, or applying Bayes' rule — and comparing them side by side makes their trade-offs concrete.
Gradient descent is the optimisation engine underneath almost all of these models: adjust each parameter in the direction that reduces error, repeat thousands of times. The gradient descent visualiser lets you compare plain stochastic gradient descent against Momentum, RMSprop and Adam on the same 3D loss landscape, showing directly why modern optimisers converge faster and escape shallow local minima that trap simpler methods. Backpropagation extends the same idea to multi-layer neural networks by applying the chain rule layer by layer, computing how a change deep inside the network affects the final error — the algorithm that makes training deep learning models computationally feasible at all.
Not every problem comes with labelled answers. Unsupervised learning finds structure in raw data on its own: k-means and DBSCAN both group similar points into clusters, but by very different rules — k-means assumes round, evenly sized clusters and needs a chosen number of groups in advance, while DBSCAN grows clusters from dense regions and can find arbitrary shapes without knowing how many clusters exist beforehand. PCA and t-SNE take a different unsupervised approach, compressing high-dimensional data down to two or three dimensions you can actually plot and see, revealing structure that would otherwise be invisible. Reinforcement learning is a third paradigm again — a Q-learning agent explores a maze by trial and error, updating value estimates from the rewards it receives rather than from any labelled dataset at all.
Follow the learning path below for a recommended order through the three learning paradigms — supervised, unsupervised and reinforcement — or browse the full grid of simulations and jump into whichever algorithm you are currently studying or curious about.
Every simulation here trains a real model on real data inside the browser tab, rather than replaying a pre-computed animation. The backpropagation simulation genuinely runs forward and backward passes through a small network and updates its weights after each one, so the decision boundary you see morphing is the model actually fitting the data in front of you — pause it, change the learning rate, and the next update reflects that change immediately. The random forest simulation genuinely bootstraps different subsets of the data and different subsets of features for each of its trees, which is why you can watch a single overfit tree's jagged decision boundary smooth out into the ensemble's more reliable one as more trees are added. That fidelity matters whether you are a student trying to build intuition before an exam, an engineer refreshing the mechanics behind a library you use daily, or an educator who wants a live demonstration where every slider genuinely changes the underlying computation rather than just the illustration.
These same building blocks scale up directly into production systems: the linear regression here is the same least-squares fit behind pricing and forecasting models; the decision trees and random forests here are the same algorithms behind fraud detection and credit scoring; the backpropagation here is the same chain-rule computation, run on far larger networks with far more data, that trains the large language models and image generators in daily use. Reinforcement learning's Q-learning maze is a simplified relative of the algorithms that learned to play Go and Atari games from scratch, and the same reward-driven trial-and-error loop underlies modern robotics control and recommendation systems. Working through this hub end to end gives you a working mental model of every major branch of machine learning, in an order that mirrors how the field itself developed — a solid foundation whether you are preparing for a course, an interview, or simply want to understand the technology behind the tools you use every day.
Common questions about machine learning
Every simulation in this hub runs entirely in your browser, with no installation required. Use each interactive model to experiment with weights, gradients, clusters and rewards, then learn machine learning online at your own pace by tweaking parameters and watching the algorithm converge.