
Dune AI — Self-Play Agents for Dune: Imperium Uprising
A complete AI system for a four-player strategy board game with hidden hands, shuffled decks, and dozens of interacting card effects. I wrote the rules engine from scratch, built a ladder of increasingly strong agents on top of it, and trained them through hundreds of thousands of self-play games — then built a browser interface for playing against the strongest one and seeing why it made each move.
How it works
- Rules engine. Full turn flow with the Bloodlines expansion: 9 leaders, all 59 Intrigue cards, CHOAM contracts, tech tiles, Sardaukar skills, and the spy system. Benchmarking exposed engine bugs (the first-player token, free Infiltrates, intrigue choices), which I fixed and then re-ran every agent against.
- Search. Information-set Monte Carlo Tree Search that re-deals every hidden card into a possible world for each simulation, with per-seat value vectors so four players can each search for their own gain. With 24 playouts per move it won 90% of games against three heuristic bots.
- Learning from people. A vision pipeline scans recorded tournament streams, reads the board and chat with OCR, and replays each game through the engine. Fitting the heuristic to those decisions raised its match with human moves from 31% to 36% on held-out games.
- Self-play training. A value network with an AWR policy, an AlphaZero-style network for the tree search, evolutionary tuning of the heuristic's weights, and finally a PPO network that learns per-situation corrections to the heuristic's move scores. Long runs train on GPU nodes of Georgia Tech's PACE cluster through Slurm.
- Experiments, not guesses. Every change is gated by seat-rotated arenas of hundreds to thousands of games with confidence ranges — for example, an expected-reward combat model beat the old deploy-everything rule 59% to 41% over 1,920 games.
- Explainable play. A browser interface where you pick a seat and leader and play the AI; every AI move expands to show the options it weighed and how it scored them.





