📚 Encyclopedia

Games & Graphics · updated 2026-10-13

Measuring game balance with scripted bots

game-designbalancesimulationai-opponenttesting

Balance claims should be measured. Several justinahampton.com games were tuned by running batches of scripted players (a greedy bot, a random bot, a naive policy) and changing rules until the numbers said the game had decisions in it. Record the win rates when you ship, and re-measure before retuning.

Pattern

Findings worth reusing

A machine opponent that is cheap and decent

Encircle 2's AI: score every legal move one ply deep (100 per corner difference + 0.25 x area +/- 45 per corner in atari +/- 35 per loose seed inside a shape - distance to seeds and opponent - 80 per corner about to be burned by the wall), then a 2-ply worst case over the player's replies for the top 24 moves. About 3 ms per turn; a switch drops it to 1 ply for measurement.

See also

Linked from

Sources: justinahampton memory (arcade-encircle2, arcade-recourse, experiments-voyages, arcade-measly, freetime-pebble)