The Valley, a board game whose AI opponents run in your browser
A satirical tech empire builder, with a rules engine in Rust and AI opponents that search ahead on your own machine.
- Published
- 8 November 2026
- Play
- In the browser, offline
- Stack
- Rust, webassembly, typescript
- Download
- 2.8 MB
The Valley is a board game about the AI boom. Four companies share a valley laid out like a circuit board. The dice pay out Water, Steel, Data, Power and GPUs; you spend them on fibre, offices and data centres, train your AI, hire Star Researchers and trade with the other companies. The first to ten points wins.
The other three companies are run by chief executives you may recognise the type of: the Hoodie Founder who wants to connect the whole world, mostly to his adverts; the Leather-Jacket Chipmaker who sells the shovels in a gold rush, and the gold, and the rush; the Pivot Queen, whose dating app became a crypto exchange and is now an AI, with the same logo. Each plays to one trait. Between turns, the news lands: a supply shock, a regulator, a rogue agent.
One set of rules, in one place
All of the game’s rules live in a Rust engine: what may be built where, what a roll pays, how a trade is offered and answered, what each news card does. The page is a thin view over it. It draws the board and sends the player’s choices, and never decides anything itself. That one rule (no game logic outside the engine) is what lets the same engine run in three places without the rules drifting apart: behind a server for testing, inside the training loop for the AI, and in the browser.

For the browser the engine is compiled to WebAssembly and run in a worker, so the AI thinking never holds up the page. The whole game, engine, network and art, is a 2.8 MB download. It plays with no server and no account, and keeps working with the network switched off.
Opponents that look ahead
Each AI company chooses its move with a tree search: it tries a few hundred futures a dozen moves deep and keeps the move that does best. Where a future is cut short, a small value network judges how good the position is for each company. The network was trained on the outcomes of games the AI played against itself, and its weights are 33 KB.
Personality comes from weighting, not from separate programs. The Settler values spreading out, the Industrialist saves for data centres, the Merchant trades for anything and the Hermit never offers a trade at all. The search is the same for all of them.

Checked, not just played
A game with trading, hidden cards and twenty news cards has a lot of places to be subtly wrong. The rulebook is written as numbered, testable rules, and each rule has a check. Random games are played through the engine and through the page to catch any move the rules allow but the page cannot show, or the other way round. Browser tests play real games at desktop and phone sizes, checking that nothing is cut off, covered or too small to press.

Play it
The Valley is on itch.io, to play in the browser on a desktop or a phone, held upright or on its side. Pinch the board to look closer.
