Interactive learning demo Back to my work
Interactive lesson · The Fire Triangle

See how a neural network learns

Fire needs heat, fuel, and oxygen. In this demo, you teach a small network that rule by giving it examples.

You do not need to know machine learning to try this. Start with a prediction, give the network the right answer, and watch what changes.

Live network map

Watch what happens inside the network

3 inputs · direct connection · 1 output
+ Positive weight − Negative weight

Tap a condition above or on the map to turn it on or off.

Try it: click or tap an input circle to switch that condition between present (1) and missing (0). Thicker lines have more influence.

Math behind this step Waiting for a prediction
Start hereAdd each condition’s vote, then turn the total into an output confidence.
See the technical equationz = Σ(wᵢxᵢ) + bŷ = σ(z)

Choose conditions and make a prediction to see the network’s calculation in everyday language.

The simple idea

Each condition gets a vote. The network adds those votes to its starting opinion, then converts the total into a percentage.

Guided experiment

Train the network by giving it examples

A neural network learns from correction, not from being handed the rule. Complete the four steps, then repeat them with different fire conditions.

Next action Choose a Fire Triangle scenario to begin. 0 training examples completed
🔥Fire0 examples
○No oxygen0 examples
○No fuel0 examples
○No heat0 examples
★0 cyclesBalanced training
1

Choose the conditions

Start with all three ingredients present, or experiment by clicking the input circles directly on the map. A circle switches between present (1) and missing (0).

2

Ask for a prediction

Make a prediction using the conditions on the map. Then change an input and predict again to see the difference in confidence.

Network confidence - Choose conditions, then predict.
3

Tell it the correct answer

Choose the conditions and make a prediction first. Then use the Fire Triangle rule to get the correct answer.

Correct answerWaiting…
Manual target controls
4

Watch what changed

The network checks how far off its answer was and works backward to adjust its connections. Change an input and predict again to see what it learned.

Before—→After— Train an example to see how the confidence changes.

Waiting for your first prediction

Choose a fire scenario above to begin.

Inputs

Edit input names, values, and correction strength manually

Adjust the conditions manually. For this lesson, keep each value between 0 and 1.

Correction strength controls how boldly the network changes after a mistake. The default 0.3 is easy to see while remaining stable.

Optional lab: change the network yourself

You do not need these controls for the guided lesson. Open them if you want to try changing the network yourself.

Experimental flattened-grid input

This turns grid cells into ordinary numeric inputs. It helps demonstrate input shape, but it is not a true convolutional neural network (CNN).

Architecture

What the network is changing

Importance (weight)

Each connection stores how strongly one value should support or oppose the next neuron or output. Training changes that importance after mistakes.

Starting opinion (bias)

This is the neuron's tendency before any condition votes are added. Training adjusts it too.

Confidence converter (activation)

Sigmoid turns each combined score into a 0–100% signal. Only the final layer produces the named output confidences.

Tracing the mistake backward (backpropagation)

The network compares every output with its correct answer, assigns responsibility through the hidden layers, then adjusts from the outputs back toward the inputs.

Open technical inspector

Once you have tried the guided lesson, you can inspect or edit the numbers here.

Weights and biases

These values update after every training example.

Training history