A forecast you can trust, until you can’t

The idea behind a small tactics game about weather, crews and deep uncertainty, and how it is built

playground
deep uncertainty
serious games
The idea behind the Forecast game and how it is built: three years that stand for three kinds of not knowing, a forecast that is the game’s own rules run forward, pixel art and music made in code, and a short reading list on deep uncertainty.
Published

November 21, 2026

Forecast is a small game. Three crews look after a riverside town for three years, and before every round the game shows what the weather will do. This article is about the idea behind it, how it is built, and what to read to go further.

NoteHow this was made

Built with AI coding tools: I set the direction, tested and decided; the tools wrote the code and the first draft of this article. The reference list was checked against Crossref, the publisher’s page or a library record, and what the article says about each source against the source itself or its abstract.

Pixel-art island with a river, groups of small houses, three crew figures, blue and orange tinted tiles, some of them speckled, and red signs reading minus one
Figure 1: A round in year 2. Blue ground will flood, orange ground will be hot. Speckled ground and a question mark mean the forecast is not sure. The red signs count the people a quarter would lose.

A game, not a model

The town does not exist. Its rules were made up to make a good puzzle, no number in it has a unit, and nothing was fitted to a measurement. A flood in the game takes “one person per quarter” because that is easy to see and to count, not because floods do that.

So the game says nothing about any real place or any real forecast. What it can do is let you feel one situation from the inside: you plan with a forecast, the forecast gets worse, and nobody tells you when.

What you do

The town is an 8 by 8 grid with a river. Each house is one person; a quarter holds up to four. A game lasts three years of five rounds.

Before each round the map shows the weather that is coming, in the order it will arrive:

  • a storm sweeps half a row. It takes one person in every quarter on its way and knocks down trees and levees (sandbags laid on open ground).
  • heat covers a square of 2 by 2 tiles. It takes one person per quarter, unless a tree stands on one of the eight tiles around the quarter.
  • a flood spreads from a stretch of the river, one or two tiles inland, and takes one person in every quarter it reaches.

You have three crews. Each walks up to three tiles and then works once: one lays sandbags, one plants trees, one shelters a quarter for the round. Then you end the round and the forecast comes true. Between years people move back, one per quarter that still has people.

Phone screenshot of the game: the island map on top, a hint line, a chip reading flood minus one, three crew buttons and a button reading End round minus one
Figure 2: Round 1 on a phone. The sandbag crew has walked next to the house the flood would take; the glowing tiles show where it can work, with a faint preview of the sandbags.

The idea of showing every threat one turn ahead comes from turn-based tactics games. A well-known example is Into the Breach (Subset Games, 2018), where every enemy shows its next attack before it lands. Forecast borrows that idea and nothing else: no names, no art, no text.

Three years, three kinds of not knowing

The rounds look the same in every year. What changes is how much the forecast is worth.

Year 1: you know. The forecast is exact. Every tinted tile will be hit and no other. All that is left is a planning puzzle: three crews, more threats than hands.

Year 2: you know what you do not know. The forecast now gives ranges: the storm takes row 4 or row 5, the flood runs one or two tiles inland, the heat sits somewhere in a square of 3 by 3. The map shows the sure part as a solid tint and the unsure part speckled, with a question mark on the losses. The truth is always inside the range. You can still plan: cover the worst case if you have the hands, or decide which loss you can accept.

Year 3: you do not know that you do not know. One rule of the weather changes, and the game does not say so. The forecast looks as exact as in year 1, because it still runs on the old rules. A flood reaches one tile further than shown, or trees stop helping against heat, or storms take two rows. The first sign is a loss the forecast did not show, or a tile that was hit without being tinted.

The three years follow an old distinction. Frank Knight separated risk, where the odds can be measured, from uncertainty, where they cannot (Knight 1921). The work on decisions under deep uncertainty goes one step further. Lempert, Popper and Bankes use the term for situations in which analysts do not know, or the parties to a decision cannot agree on, the models that describe how the system works, the probability distributions for its key uncertainties, or how to value the outcomes (Lempert, Popper, and Bankes 2003). Year 2 of the game sits near Knight’s uncertainty: the outcomes are listed, the odds are not. Year 3 is a toy version of the deeper kind: the model itself is no longer right.

Water management has a well-known name for the assumption that breaks in year 3. Milly and colleagues describe stationarity as the idea that natural systems fluctuate within an unchanging envelope of variability, call it a foundation of training and practice in water engineering, and argue that climate change has undermined it (Milly et al. 2008). A forecast that was tuned on the old weather and is still trusted is the game’s picture of that.

What a player can try, and what the literature calls it

In year 3 a plan that covers the forecast exactly is the first to fail: if the flood runs one tile further, the levee stood one tile too close. Two habits are open to a player, and both have names in the literature.

The first is to stop planning for the one forecast future and to look for plans that still work when it is wrong: a tree where none is needed yet, a crew held back. Lempert, Popper and Bankes call strategies robust when they perform reasonably well across a wide range of plausible futures, instead of best in one (Lempert, Popper, and Bankes 2003).

The second is to watch for the sign that the forecast has failed and to change course when it comes. Dynamic adaptive policy pathways build this into a plan from the start: a sequence of actions over time, and signposts to monitor that show when the plan has to change (Haasnoot et al. 2013). In the game the signpost is the dashed red outline around a tile where the weather did more than the forecast said.

The game does not test either method. It only gives a few minutes in which both feel like the obvious thing to do. For the methods themselves, the open-access book edited by Marchau and colleagues is a good start (Marchau et al. 2019).

How it is built

The game is one HTML file of about 100 KB with no library, no image files and no sound files. A short Python script puts it together from five JavaScript modules, a page template and a style sheet, about 1,700 lines in all.

One name, one town

The address of a game carries a short name, such as ?seed=k7m2p9. The name is hashed into a number that drives a small random generator, and everything follows from it: where the river bends, where the quarters lie (until at least 28 people live in town), the two first trees, where the crews start, all the weather of the fifteen rounds, and which rule will change in year 3. The same link gives the same game.

The first round is chosen when the town is made: the game looks for a stretch of river whose flood the sandbag crew can stop alone, if need be from another starting tile. In a few towns (about 3 in 100) no such stretch exists, and the first round is harder.

The forecast is the rules, run forward

There is no separate forecast. The red numbers come from running the round’s own rules on a copy of the map. In year 2 the forecast holds several versions of each hazard (two rows, four squares, two flood depths). A round in year 2 has two hazards, and the game runs every combination, eight at most. A tile that is hit in every run is drawn solid, a tile hit in some is speckled, and each quarter shows the most it could lose.

Year 3 needs only one more argument. The forecast runs the rules without the hidden change; the round itself runs them with it:

function endRound(g) {
  const hz = g.rounds[g.t];
  const guard = { shelter: g.shelter, bags: g.bags };
  const said = predict(g.terr, g.pop, hz, guard);          // what the forecast says
  const change = yearOf(g.t) === 2 ? g.change : null;      // year 3: the hidden change
  const o = resolve(g.terr, g.pop, actual(hz), guard, change);

The game then compares the two. Tiles that were hit without being named, and quarters that lost more than the forecast allowed, get the dashed outline.

How hard it is

A script played 40 towns to set the difficulty (_tools/balance.js next to this article’s source). With no crews at work, 39 % of the people are still in town after three years, on average. A simple player that moves one crew at a time to wherever the forecast loss drops most keeps 76 % (between 53 % and 107 % in single towns; more than 100 % is possible because quarters grow back between years). A person who plans the three crews together may do better. Nobody has measured how people play it yet.

Pixels and sound from code

Every sprite on the map (houses, trees, sandbags, crews) is a few rows of letters, and each letter is a colour of the day or night palette. The ground, the tints and the signs are drawn by code. This is the levee’s sandbag:

bag: ['.oooooo.', 'osssssSo', 'ossssSSo', 'oSSSSSSo', '.oooooo.'],

The map is drawn on a canvas of 344 by 208 pixels and scaled up without smoothing, so the pixels stay sharp. The ground is drawn once per town and year; water, weather, crews and houses are drawn on top in every frame. The grass gets a little drier each year.

The island with dry yellow-green grass, ruins between the remaining houses and tinted weather areas
Figure 3: Year 3 in another town. The grass has dried, and where people were lost, ruins remain. The forecast is drawn as sharply as in year 1; the dashed red outlines mark where the round before did more than it said.
The island at night: dark ground, houses with lit windows, the river and three crews
Figure 4: The same game by night, with lit windows.

The music is made with the Web Audio API and reads the town like a score: a line sweeps the eight columns, each quarter with people plays a note (higher on the map, higher note; more people, louder), trees add a low tone and the river a bass. The coming weather sets the sound and the tempo, and each new year shifts the scale. In year 3 the music changes before the map shows why.

Without a mouse, without motion

Behind the canvas lie 64 ordinary buttons, one per tile, out of sight. They carry the map for keyboards and screen readers: each one says what stands on its tile, what weather is coming and what would be lost. With reduced motion switched on, the map is drawn in still frames.

What the game leaves out

  • Odds. Year 2 gives ranges but no probabilities, and the player never learns how often the worse end came true.
  • Disagreement. In the definition above, deep uncertainty is also about people who cannot agree on what a good outcome is. The game has one goal and one player.
  • Cost. Sandbags, trees and shelter are free; only time is short. Real protection competes with everything else a town needs.
  • A forecast that learns. After the first miss, a real forecaster would start to doubt the model. The game’s forecast never does.
  • Slow change. The rule changes once and at once. Real change is gradual, and that makes it harder to notice.

References

Haasnoot, Marjolijn, Jan H. Kwakkel, Warren E. Walker, and Judith ter Maat. 2013. “Dynamic Adaptive Policy Pathways: A Method for Crafting Robust Decisions for a Deeply Uncertain World.” Global Environmental Change 23 (2): 485–98. https://doi.org/10.1016/j.gloenvcha.2012.12.006.
Knight, Frank H. 1921. Risk, Uncertainty and Profit. Boston; New York: Houghton Mifflin.
Lempert, Robert J., Steven W. Popper, and Steven C. Bankes. 2003. Shaping the Next One Hundred Years: New Methods for Quantitative, Long-Term Policy Analysis. MR-1626-RPC. Santa Monica, CA: RAND Corporation. https://doi.org/10.7249/MR1626.
Marchau, Vincent A. W. J., Warren E. Walker, Pieter J. T. M. Bloemen, and Steven W. Popper, eds. 2019. Decision Making Under Deep Uncertainty: From Theory to Practice. Cham: Springer. https://doi.org/10.1007/978-3-030-05252-2.
Milly, P. C. D., Julio Betancourt, Malin Falkenmark, Robert M. Hirsch, Zbigniew W. Kundzewicz, Dennis P. Lettenmaier, and Ronald J. Stouffer. 2008. “Stationarity Is Dead: Whither Water Management?” Science 319 (5863): 573–74. https://doi.org/10.1126/science.1151915.