Reports · 2026-09-19

A structured setup prior wins 72 to 84 percent against uniform setups

Structured prior against uniform setups, per-seed contrast

Structured prior against uniform setups, per-seed contrast0.000.250.500.75greedy0.43 n=200rollout0.63 n=200expectimax 16w d20.67 n=200null (uniform v uniform)-0.03 n=200
Structured prior against uniform setups, per-seed contrast
RowValueLowHighn
greedy0.430.3390.521200
rollout0.630.5510.709200
expectimax 16w d20.670.5890.751200
null (uniform v uniform)-0.033-0.1430.078200
Per-seed contrast of the structured side over 200 seeds with a 95% interval; the null cell covers zero.

The sampler (Setup::structured in the engine, its rules tabulated with one-line reasons in the server's docs/setups.md) keeps the Flag on the back two rows, bombs its open neighbours with probability 0.85 each, keeps front-row Bombs out of the six lake-free lanes, puts at least four Scouts forward and three Miners back, separates the Marshal from the General and parks the Spy within two squares of the General. Everything inside the constraints stays random. Every registry policy now accepts a setup parameter, uniform by default, so this report's matchups differ only in where the forty pieces start.

Move policyStructured effective95% WilsonPer-seed contrast95% interval
greedy0.7150.669 to 0.7570.4300.339 to 0.521
rollout0.8150.774 to 0.8500.6300.551 to 0.709
expectimax 16 worlds, depth 20.8350.795 to 0.8680.6700.589 to 0.751
null: uniform against uniform0.4840.435 to 0.533minus 0.033minus 0.143 to 0.078

The brief expected the gain to grow for the players that attack early. The measured gradient runs the other way: greedy, the early attacker, gains the least, and the two searching players gain more the stronger they are. A good setup is not only a defence against the seven-ply loss; it is a material and positional head start that search converts more reliably than a one-ply player does.

Diversity

A setup source that collapses to a few arrangements is exploitable however well it scores, so the registrations report diversity beside the score. Over 10,000 samples per source (setupstats seeds 0 to 9,999): the uniform draw spreads the Flag uniformly over all forty squares (5.32 bits); the prior puts it on the back row in 74.7% of setups and the second row in 25.3%, any column, for 4.14 bits of entropy, above the 3 bits the approach page requires. The Flag has no adjacent Bomb in 57.1% of uniform setups and 0.3% of structured ones; the shares with zero, one, two and three adjacent Bombs are 57.1%, 35.6%, 6.8% and 0.5% uniform against 0.3%, 6.2%, 32.5% and 49.4% structured (a further 11.4% of structured setups have four, and the uniform share with four rounds to zero).

Uniform setups

3
3
3
3
3
2
2
2
2
2
3
3
3
2
3
3
3
2
2
2
3
3
3
3
2
2
2
3
2
3
2
2
2
2
3
3
3
2
2
2

Spy: percent of setups with the piece on each square, front row at the top, back row at the bottom.

Uniform draws over 10,000 samples spread every piece type evenly over the four home rows.

The structured prior

3
4
3
3
3
3
3
4
3
3
3
4
3
4
3
3
3
4
4
3
2
2
2
2
2
2
2
3
2
2
1
1
1
1
1
1
1
1
1
1

Spy: percent of setups with the piece on each square, front row at the top, back row at the bottom.

Structured draws over 10,000 samples keep the Flag on the back two rows, Scouts forward and Miners back.

Row shares back to front over the same 10,000 structured samples: the Flag 75/25/0/0, Bombs 37/34/22/8, Scouts 12/12/36/40, Miners 38/41/10/11, Spy 11/22/34/32, Marshal and General 0/30/34/36 each, and every other type within two points of 24/23/25/28. The uniform source is flat at 25% per row for every type, as the left heatmap shows.

Early endings

The exploratory motive for this study was the game that ends before it starts: on 1,200 unregistered games with uniform setups, 8.9% ended within 20 plies. Here the null cell reproduces that rate, 29 of 400 games (7.2%), split evenly between the two identical contestants. In the three treatment cells 16, 29 and 25 games (4.0%, 7.2% and 6.2%) ended within 20 plies, and every one of them was lost by the uniform side: seventy early games, seventy uniform losers. The prior never loses the opening; it only stops losing it as often as uniform loses everything else.

What this changes

The approach page's promotion rule is met on every clause that is mine to execute: the contrast is above zero at 95% for all three policies and the Flag-square entropy is 4.14 bits. Whether structured becomes the default setup of every registry policy is the user's call, because the default changes the meaning of every later registration; the parameter is in place either way, and uniform remains the default today. The next study of the approach, selection by self-play, now has its baseline and its sampler.

Replays from the library, seed 0 from both seats of each cell: greedy, structured as Red, greedy, structured as Blue, rollout, structured as Red, rollout, structured as Blue, expectimax, structured as Red, expectimax, structured as Blue. The two expectimax games end in 22 plies on average: watch the uniform side's Flag.

Run records: greedy, rollout, expectimax, null.

Reproduction

Registrations experiments/5d4a4b4f-3d46-4d75-8354-2e2492377063.toml, experiments/73c92dcd-e644-4cee-8995-883d7c9fb0ff.toml, experiments/27203f9a-4dc1-434d-b04a-7bd7af0f72a1.toml and experiments/2511aae8-dff0-4534-919e-abe3e434d69b.toml. Server commit f64c784, research commit 79af9a4. Commands, from the repository root:

cd server && cargo run --release -p armies-arena --bin matchup -- --red 'greedy-structured=greedy:{"setup":"structured"}' --blue 'greedy-uniform=greedy:{"setup":"uniform"}' --games 400 --seed 0 --rules training --threads 8 --moves --out ../research/runs/setup-prior/greedy.json
cd server && cargo run --release -p armies-arena --bin matchup -- --red 'rollout-structured=rollout:{"setup":"structured"}' --blue 'rollout-uniform=rollout:{"setup":"uniform"}' --games 400 --seed 0 --rules training --threads 8 --moves --out ../research/runs/setup-prior/rollout.json
cd server && cargo run --release -p armies-arena --bin matchup -- --red 'expectimax-structured=expectimax:{"samples":16,"depth":2,"setup":"structured"}' --blue 'expectimax-uniform=expectimax:{"samples":16,"depth":2,"setup":"uniform"}' --games 400 --seed 0 --rules training --threads 8 --moves --out ../research/runs/setup-prior/expectimax.json
cd server && cargo run --release -p armies-arena --bin matchup -- --red 'greedy-uniform-a=greedy:{"setup":"uniform"}' --blue 'greedy-uniform-b=greedy:{"setup":"uniform"}' --games 400 --seed 0 --rules training --threads 8 --moves --out ../research/runs/setup-prior/null.json
cd research && python3 scripts/paired_contrast.py runs/setup-prior/expectimax.json
cd research && python3 scripts/setup_stats.py

Wall time about two minutes for the four cells on 8 threads, run sequentially. The archived rollout and expectimax runs shared the machine with other agents, which inflates their per-move clocks but not the deterministic scores; the records note the alone-measured timings. Each record carries the SHA-256 of its archived JSON.