The plant team asks a big question. "If we plant new tomatoes today, how tall might they be in a week?"
Comet groans. "We cannot wait a week to find out. They need an answer today."
Wren opens the growth log. "What do you notice? Each tomato grew a little every day, but never the same amount."
"So we build a pretend tomato," Comet says. "In pseudocode."
Nova dips toward the log. "Then decide what your pretend tomato keeps, and what it leaves out," she says.
Comet starts writing a REPEAT loop. Wren starts listing everything a real tomato needs.
A simulation is an abstraction of a more complex object or process, built for a specific purpose.
Building one means removing details or simplifying how things work.
Simulations are most useful when real experiments are impractical, for example too slow or too big.
A model makes predictions from chosen data and features. The amount, quality and variety of that data affect how good the model is.
Predictions are tested to check, or validate, a model.
Real plants grow by different amounts each day. A simulation can use random numbers to copy that variety.
RANDOM(a, b) gives a whole number from a to b, and each one is equally likely. So each run can come out different.
Here is the crew's tomato simulation. The height starts at 10 and grows by 1, 2 or 3 each day.
height ← 10
REPEAT 7 TIMES
{
growth ← RANDOM(1, 3)
height ← height + growth
}
DISPLAY(height) Simulations can carry bias from the real-world parts that were included or left out.
The crew's tomato grows every day no matter what. It ignores light, water and temperature.
So it could predict a tall tomato even for a plant left in the dark.
| Statement | True or false? |
|---|---|
| The tomato simulation uses light readings. | ? |
| Leaving out water could make the predictions too hopeful. | ? |
| Every run of this simulation gives the same height. | ? |
| A simulation is an abstraction of something more complex. | ? |
Strong modeling. Tomorrow is Impact Friday: what Beacon data could reveal about the crew.