Skip to content
All posts

Simulations with dice and beans: using simple rules to predict what will happen

An egg carton used as a garden with beans in some of the cups and two green sprouts growing from others, a die showing six next to it and a small bird in the corner.

How does a weather service say "rain tomorrow"? How does anyone know roughly how many fish will be in a lake next year? Nobody can see the future. Instead, computers build a small pretend world with a few simple rules, run it forward one turn at a time, and watch what happens. That is a simulation, and children aged about 8 to 12 can run one on the kitchen table with a die, a handful of beans and an egg carton.

This article gives you a bean garden to simulate, a way to record each turn, rule changes to try, and a way to talk about why no two runs come out the same.

What a simulation is

A simulation is not a crystal ball. It is a game with three parts:

  • a state: what the world looks like right now (how many beans are in the garden),
  • rules: what can happen in one turn (a seed sprouts, a bird eats a bean),
  • chance: a die that decides which rule happens this turn.

You apply the rules once, write down the new state, and repeat. After many turns you have a story of what happened. Run it again and you get a different story. A weather computer does exactly this with millions of numbers and millions of turns, but the idea is the same.

The bean garden

You need one die, about 30 beans, an egg carton (12 cups, which are 12 plots of garden) and a sheet of paper.

Start by putting one bean in each of three cups and writing "start: 3". Then, each turn, roll the die once:

  • 6: a seed sprouts. Put one bean in an empty plot.
  • 1: a bird visits. Take one bean away.
  • 2, 3, 4, 5: a quiet day. Nothing changes.

Write down the number of beans after each turn, and play 15 turns. The garden is full when all 12 plots have a bean (no room for more sprouts), and the game ends early if the garden is empty.

Before the first roll, ask your child for a prediction: "After 15 turns, how many beans?" Most children guess that the garden will grow. In fact, sprouting and eating are equally likely, so the garden wanders up and down and often ends close to where it started. The surprise is the point: a guess and a simulation are not the same thing.

A record sheet looks like this:

Turn Roll What happened Beans
1 6 A seed sprouted 4
2 3 Quiet day 4
3 1 A bird ate one 3
4 6 A seed sprouted 4
5 6 A seed sprouted 5

Older children can draw the curve on squared paper: turns along the bottom, beans going up, one dot per turn, dots joined. Two runs in two colors on the same sheet show at a glance how much the garden wanders.

Change one rule and run again

The interesting part of a simulation is changing a rule and seeing what it does to the whole story. Try one change at a time, and ask for a prediction before each run.

Variant New rule What usually happens
Rainy season A seed sprouts on 5 or 6 The garden fills up within a few turns
Hungry birds A bird eats on 1 or 2 The garden often empties early
Every bean counts Roll once for each bean in the garden: 6 means that bean makes a new one, 1 means that bean is eaten Big gardens grow fast, small ones vanish; the curve bends upward instead of wobbling
Smaller plot Only 6 cups allowed The curve climbs and then flattens at the ceiling

Changing only one rule per run matters: if you change two, you don't know which one made the difference. Let your child invent a rule too: a cat that scares the bird away on a 2, or a dry week where nothing sprouts for three turns.

Why no two runs are the same

Play the rainy season five times and the endings will differ, even though nothing in the rules changed. The die did. That is why one run proves very little, and why people who build simulations run the same world many times and look at the range.

Keep a tally of endings: full garden, empty garden, somewhere in between. After five runs, your child can say "with rainy season rules, the garden usually fills up". That word "usually" is what a forecast means. "A 70% chance of rain" is a way of saying that in ten runs of tomorrow's weather, seven had rain.

From beans to computers

A computer simulation keeps numbers instead of beans, draws random numbers instead of rolling a die, and does millions of turns in a second. The weather is cut into cells like the egg carton; each cell holds its temperature, wind and moisture, and rules say how each cell changes its neighbors. A flock of birds on a screen is often just a few rules for each bird (stay near the others, don't bump, fly the same way), and the flock appears by itself.

Children around 10 to 12 can write the bean garden as a list of steps: "Each turn: roll. If 6, add a bean. If 1, take one away. Write down the count. Repeat 15 times." That list is a program. A computer could run it a million times while you make lunch, and that is the whole trick behind "predicting" the future: not seeing it, but playing it out many times.

If your child likes following a die step by step, the "Roll the die" puzzles in the Space topic in Dologi show arrows along which a die rolls, one step at a time, and ask how many dots end up on top: the same habit of applying one rule over and over to predict the result.

In short

  • A simulation is a pretend world with a state, a few rules and some chance, run forward one turn at a time.
  • The bean garden needs a die, beans and an egg carton: roll, apply the rule, write down the count, repeat.
  • Change one rule at a time, predict before each run, and compare the stories.
  • No two runs are the same, so run the world several times and talk about what usually happens.

Read more: Rolling a die in your head: which face is on top after each roll?