Neural Network Playground
Explore a real feedforward neural network interactively — adjust inputs, weights, biases, activation function and decision threshold and see the classification decision boundary recompute live.
How it works
An artificial neuron multiplies each input by a weight, adds them up with a bias, and passes the total through an activation function. Comparing the output with a threshold turns it into a yes/no answer, and the line where the answer changes is the decision boundary.
What you will learn
After using this simulation you should be able to:
- Describe what one artificial neuron calculates: a weighted sum of its inputs plus a bias, passed through an activation function.
- See how changing weights and biases moves the decision boundary.
- Explain why the XOR problem needs more than one layer of neurons.
Equations
- z = w₁·x₁ + w₂·x₂ + b
- Weighted sum of the inputs plus the bias.
- σ(z) = 1 / (1 + e^(−z))
- Sigmoid activation: squeezes any number into the range 0 to 1.
- ReLU(z) = max(0, z)
- Rectified linear unit: negative totals become 0, positive ones pass through.
- class = output ≥ threshold
- Turns the output into a yes/no decision.
What the model assumes
- The weights are set by hand. Real networks learn their weights from data (training), which this playground does not do.
- Every neuron in a layer uses the same activation function.
- Information flows one way, from inputs to output (a feedforward network).
Where it stops being right
- With ReLU the output is not limited to 0–1, so a threshold between 0 and 1 means something different than it does with sigmoid.
- Networks used in practice have thousands to billions of weights; a handful is enough to show the idea but not to recognise images or text.
Sources
This interactive simulation is part of ScienceVerse Plus.
Everything you need to understand the idea is on this page. Plus and Family plans add the hands-on explorer, along with higher tutor limits, full guided learning paths and progress exports.
Sign in or create a free account to subscribe · Compare plans
Using this simulation
How to use it
- Start with a preset to see a real example, then change one control at a time and watch which results change.
- Drag a slider to explore, or type an exact number in the box next to it.
- The results under the picture update straight away. Open “Show the data as a table” to see them laid out side by side.
- When you find something interesting, use “Copy shareable link” to send exactly those settings to someone else.
Things to try
- Choose the AND gate and set both inputs to 1: the output is close to 1. Set either input to 0 and the output drops close to 0.
- From the AND gate, change the bias from −30 to −10. The neuron now behaves like an OR gate: either input being 1 is enough.
- Choose XOR (two layers) and read the “For inputs 0 and 1” line: the answer is yes only when exactly one input is 1.
The controls
- Input
- The numbers fed into the network (Input 1 and Input 2).
- weight on
- How strongly a neuron responds to one of its inputs. A negative weight pushes the neuron's output down.
- bias
- A number added to the neuron's weighted sum, which shifts how easily it switches on.
- Decision threshold
- An output at or above this value counts as “yes”.
- Activation function
- Sigmoid squeezes any number into the range 0 to 1; ReLU keeps positive numbers and turns negative ones into 0.
- Preset
- Loads a ready-made, real-world example. The sentence under it says what the example shows.
- Reset to default
- Puts every control back to the first preset.
- Exact value boxes
- Each slider has a box for typing a precise number. A value outside the allowed range is refused with a message, never quietly changed.
- Show the data as a table
- Opens the same results as a table.
- Copy shareable link
- Copies a link that opens the simulation with exactly these settings. The link holds only the settings, nothing about you.
The readings
- Hidden layer outputs
- What each hidden neuron outputs for the current inputs (only when there is a hidden layer).
- Output
- The network's final number.
- Answer
- Yes or no: whether the output reaches the decision threshold.
- For inputs 0 and 1
- The answer for all four combinations of 0 and 1, so you can check it against a logic gate.
Accessibility
- The decision-boundary map is a picture; the outputs, the answer and the four-combination line give the same information as text.
- Every slider works with the keyboard: arrow keys for small steps, Page Up and Page Down for big ones, Home and End for the limits.
- Every result is written out as text and announced by screen readers as it changes, and the data table holds the same numbers.
- If your device asks for reduced motion, a still diagram is shown instead of the animation; otherwise the animation can be paused at any time.