A Monte Carlo decision lab Interactive simulation

Which route wins
in your world?

Which route would you choose before knowing the weather? Monte Carlo means trying many randomly chosen possibilities and comparing the results. A rough estimate can help you choose. Telling two very close options apart takes more samples. Here, every route faces the same weather in each trial.

You design the rules.
The simulation tests the possibilities.

Runs on your device. No accounts or AI calls.
Your harbor75% calm on each leg
Three routes out of a small harborDock is a guaranteed delivery. Channel needs one calm leg. The outer passage needs two, unless you bank cargo at its checkpoint. Select a route using the buttons below. 112ChannelOuter passageDockFar portCheckpoint N
Ready to explore. Original toy world. Numbered gates are independent weather draws. The map illustrates discrete rules.

Choose a route and commit. The trip’s hidden weather is drawn separately from the simulations.

Your last ten voyages

Exploration under these rules, not a controlled comparison. Changing the world clears this log.

  1. No voyages yet.

Make it your world

All stormsAll calm
Cargo delivered on success

Try a different question

These controls change a real local simulation. AI helped build this lesson; no model runs here.

Try possible futures before choosing

Compare the routes

Run a batch to compare the average cargo delivered by each route.

Ready. Every route gets the same number of sampled futures.

Dock

?points / trip

Waiting for your experiment.

Channel

?points / trip

Waiting for your experiment.

Outer passage

?points / trip

Waiting for your experiment.

Each trial uses one randomly drawn weather pair for all routes. Count × cargo shows how many trials returned each amount. Each average is total cargo divided by the number of trials. Dock’s return is exact; Channel and Outer use sampled averages. The separate exact-answer panel calculates probabilities from your rules.

A sampled leader is a clue. Check uncertainty before treating it as a clear winner.

How uncertain is the estimate?

Run a batch first. Dock is deterministic; its score is known exactly.

More trials usually narrow the range of plausible averages. The estimate itself can still move away from the exact answer on a particular run. These cautious ranges allow for checking three routes at four fixed sample counts. They rely on bounded scores and independent weather draws, approximated here by a repeatable random-number generator. They describe sampling noise, not whether your forecast is right. Editing or restarting begins a separate experiment.

Plan for reliable cargo and a changing forecast

These exact calculations explain your small world. They use the forecast, not the weather secretly drawn for an actual trip. On narrow screens, scroll the tables sideways. With a keyboard, focus a table and use the arrow keys.

Open this section to compare goals and stress-test the forecast.

Inspect a particular possibility

Follow one of the futures.

The first 16 sampled weather pairs stay available. Every completed sample contributes to the averages.

Run a batch, then inspect a future.

    A precise answer to the wrong question

    What if the forecast is wrong?

    Keep the sampler’s calm chance at 75%, but change the actual toy world to 50%. More samples cannot repair the old assumption.

    The simulator and actual trips currently use the same weather model.

    Try the idea somewhere else

    A delivery robot has three choices.

    Park for 5 points. Pass one gate for 9. Pass two for 14. Each independent gate opens 60% of the time. Which choice has the highest average score?

    Make a prediction. You can change your answer.

    Keep the code, inspect the method

    Save an experiment above. Download the original sampler, notebook tools and replay runner into the same folder as voyage.json. Run node replay.mjs voyage.json. Or reopen the JSON in this lesson. Scores are recomputed, rather than trusted from the file.

    Same seed, same rules, same result. Actual voyages use a separate random seed. Sample averages compare expected cargo. The delivery target compares reliability. These are different objectives. Each batch compares a fixed continuation policy. Monte Carlo tree search also builds and guides a search tree; this lesson uses flat route sampling.

    Method reference: OpenSpiel’s rollout evaluator. Interaction inspiration: Bret Victor and Seeing Theory. Code and original diagram: Jonathan Simone with AI assistance. Sampler licensed MIT.

    Nothing is sent to an AI service. There is no model inference, training or live agent in this lesson. This small example teaches a planning technique used in AI. Visitor engagement and learning have not yet been evaluated.