Optimal Battleship · detail

Three Ships on 10×10

How a self-play mixture was built and checked on a board too big to solve, why no hand-written rule matches it, and how rules from the large-board model fare on a real board.

A detail page of Optimal Battleship · data as of 24 October 2026

This page looks closer at the 10×10 board with the {3,3,2} fleet (two 3-cell ships and a 2-cell ship), the board of the essay's section 2, between the nearly solved 5×5 board and the classic game. What happens when the board grows without limit has its own page.

The self-play mixture, a lottery over nearly a thousand fixed hunts, wins 49.95% of races on its worst layout against its own pace (the spread of its own finishing times), checked over all 240,669 distinct layouts; the best counter-hunts we found gain only 0.5 to 0.7 points. No hand-written rule wins half its races head-to-head against an earlier snapshot of it, and the best rule a person can play wins at most 47.0% against the finished mixture when each side hides where the other does worst.

1The board, and why exact methods stop

Terms, as in the essay:

  • Race: both players fire one shot per round; the first to sink the whole fleet wins, a same-round finish counting half. Win rate: the share of races won; differences are in points (percentage points).
  • Layout: one way of hiding the fleet. Pace: the finishing times a strategy is scored against. Worst case: the win rate on the worst layout, against the pace.
  • Fixed hunt: a hunt with no dice. Mixture: a lottery over fixed hunts, drawn in secret before the game; the self-play mixture is the one section 2 builds.
  • Best reply: the strategy that wins the most races against a given one; its gain over 50% is the exploitability. Near-perfect player: on 5×5, a strategy brought close to perfect play by exact computation.
  • Head-to-head: both fleets hidden the way the reference player hides its own.
  • Hand-written rules: the checkerboard, 3-parity (every third diagonal first), the heat map (the cell the most remaining ship positions cover), and variants.

There are 1,924,020 ways to hide the fleet on 10×10 (straight, inside the board, not overlapping, touching allowed), or 240,669 distinct layouts counting rotations and reflections as one: about 240 times as many as on 5×5, but still few enough to list.

A fixed hunt is a decision tree, so its finishing time on every layout can be computed exactly and stored, one byte per layout. Any mixture of stored hunts can then be scored exactly against any pace on every layout, and its worst layout is known, not searched for: the hider's side is exact.

The hunter's side is not. An exact best reply is a dynamic program over every state of knowledge: 181 million states and about 100 GB of memory already on 5×5, out of reach above it, so new hunts come from a search. With the classic fleet's 15 billion or so layouts, even the hider's side must be searched (the classic page).

2Self-play with a moving pace

With an exact hider and no exact best reply, we used the essay's self-play loop, a form of column generation (each new hunt adds a column to a linear program):

pool ← a few fixed hunts
pace ← a starting pace
repeat:
    # one linear program, pace held fixed:
    # mixture = best win rate on the worst
    #   layout against the pace;
    # q = the hider's lottery over layouts
    #   that hurts mixture most
    mixture, q ← linear program over pool
    # found by search, not exactly
    h ← a hunt that beats mixture against q
    if no such hunt is found: stop
    add h to pool
    pace ← halfway to mixture's finishing times

The linear program chooses the hunts' weights. Each of the 240,669 distinct layouts gives one constraint: the mixture's win rate against the pace on that layout (averaged over rotations and reflections, since each game plays its hunt in a random one) must be at least v, which the program maximizes, to within 0.005 points.

The search. A new hunt is a decision tree built against the hider's lottery (below) and the pace. While many layouts remain it fires at the cell the most lottery-weighted layouts cover. Once at most 5 to 400 remain (usually 100), it plans the rest for the best chance to win the race, exactly except that each step weighs only the two best-covering cells. A second kind looks two moves ahead; together they add about three hunts per round.

The hider's lottery. The linear program's own layout weights sit on few layouts and jump between rounds (on 5×5, aiming at them collapsed the run to 0.40% on its worst layout against a near-perfect player). The search aims instead at regret matching, a standard iterative method for zero-sum games, run for a thousand iterations per round; its answer spreads weight widely and moves smoothly. Below, the mixture's hider is the average of these lotteries over all 2,000 rounds.

The pace starts from the heat map's finishing times and moves halfway toward the mixture's own each round; in practice the program scores against a short forecast of where it is heading, which equals the pace once the loop settles. The goal: a mixture that wins half its races against itself on every layout.

The run started on 25 August 2026 and finished its 2,000th round on 15 September. The pool grew to 5,968 hunts, 964 of them weighted in the final mixture, but the weight is lopsided: the heaviest hunt carries 13.9%, the 10 heaviest about half.

The stop line never fired: the run ended at its 2,000-round budget, with counter-hunts still gaining about half a point (section 3) and both curves in Figure 1 still creeping (the deeper counter-hunt's gain fell from 0.76 to 0.73 points over the last 160 rounds).

Figure 1
How the loop converged
Worst layoutAverage over random layoutsCounter-hunt, shallow searchCounter-hunt, deeper search
Win rate against the finished mixture's pace4008001,2001,6002,00049.4%49.6%49.8%50.0%after 387 roundsafter 1,153 roundsWorst layoutAverage over random layoutsAfter 407 rounds: 49.41%After 2,000 rounds: 49.95%49.41%49.95%worst layoutaverage
Gain of the best counter-hunt found (points)4008001,2001,6002,0000+0.5+1.0+1.5Counter-hunt gain, shallow searchDeeper search after 407 rounds: +1.45 pointsDeeper search after 463 rounds: +1.29 pointsDeeper search after 1,839 rounds: +0.76 pointsDeeper search after 1,871 rounds: +0.76 pointsDeeper search after 1,901 rounds: +0.75 pointsDeeper search after 1,931 rounds: +0.74 pointsDeeper search after 1,961 rounds: +0.74 pointsDeeper search after 1,991 rounds: +0.73 pointsDeeper search after 2,000 rounds: +0.73 points+0.52+0.73shallow searchdeeper searchRounds of the self-play loop
Top: 49 snapshots of the mixture, each raced against one fixed yardstick, the finished mixture's finishing times on random layouts. Solid: the win rate on the snapshot's worst layout (49.41% after 407 rounds, 49.95% at the end). Dashed: the average over random layouts, which ends at exactly 50% because the last snapshot is the yardstick itself. Note the zoomed scale: the curves span only 0.6 points. Bottom: what the best counter-hunt found gains against each snapshot, a lower bound on exploitability; line: shallow search, dots: nine deeper searches (after 407 and 463 rounds, and seven times in the last 160). All values are exact over every layout. Snapshots start at round 407, when the run moved to a workstation. Dashed verticals mark the snapshots after 387 and 1,153 rounds; the text quotes those against their own pace, a different yardstick.

Three versions of the mixture (worst case against its own pace; hunts weighted):

  • After 387 rounds: 49.75%; 300 hunts. The essay's chart and section 5.
  • After 1,153 rounds: 49.95% (49.82% on Figure 1's yardstick); 743 hunts. Inside the best classic strategy (the classic page).
  • Finished, after 2,000 rounds: 49.95%; 964 hunts. The replays and sections 3, 4 and 6.

3How we know it is close

Flat is not fast: a player who fires at random also wins half its races against itself on every layout, so we checked from outside.

Counter-hunts. A probe is one fixed hunt built by the same search against the mixture's hider and pace. Against the finished mixture the best probe gains 0.52 points with a shallow search (exact planning once 30 layouts remain) and 0.73 with a deeper one (once 100 remain), down from 1.27 and 1.45 after 407 rounds.

A probe changes only the hunt, so these are lower bounds on exploitability. On the hiding side the linear program checks: no layout holds the mixture below about 49.95% (49.948% against its own finishing times), so clever hiding gains only about 0.05 points. A reply that changes both was not searched for; the exploitability is known only from below.

A board where the answer is known. On 5×5 the same loop, never shown a near-perfect player, built a mixture that wins 48.5% head-to-head against one and 48.4% on its worst layout, both exact; the near-perfect player keeps 51.3% on its own worst layout against the mixture's pace. The loop lands within about 1.5 points of near-perfect play (the 5×5 page).

Duels. On random layouts the finished mixture beats 3-parity in 53.6% of races and the checkerboard in 61.1%; head-to-head, 54.0% and 61.4%. On random layouts it needs 39.0 shots on average, 3-parity 41.1 and the checkerboard 42.7. The middle of 3-parity's distribution is close (about 39 shots against 38); it loses in the tail, when the 2 slips between its diagonals.

4What the mixture does

Where it hides. Under random hiding a corner cell holds a ship only 3.8% of the time and a cell two in from the edges up to 9.6% (the center 9.5%), since fewer ship positions fit over an edge: that is the heat map's blind spot. The mixture's hider spreads the fleet almost evenly, 7.7% to 8.4% per cell, edges slightly above the middle (Figure 2).

How it opens. Its first shot is spread over 92 cells, none above 3.5%. Then it commits: each hunt in one of 8 rotations and reflections is a plan, 7,712 in all; after one shot a median of 9 remain consistent, and in 869 of 1,000 games on random layouts one plan is left after a median of 5 shots. The randomness is spent early, which is harmless because the hider has already committed.

Figure 2
Where the mixture fires and where its hider hides
ABCDEFGHIJ123456789103.53.53.53.5
First shot. Spread over 92 cells; strongest = 3.5%.
ABCDEFGHIJ123456789108.27.7
The mixture's hider. Each cell holds a ship 7.7% to 8.4% of the time.
ABCDEFGHIJ123456789103.89.6
Random hiding. From 3.8% in a corner to 9.6%; same scale as the middle board.
Left: the finished mixture's first shot (stronger color = more likely). Its four likeliest cells, at 3.5% each, are the four its hider fills least (7.7%). Middle: before any shot, the chance that each cell holds a ship when the mixture's hider hides the fleet. Right: the same when every layout is equally likely, computed for this page from all 1,924,020 layouts. Middle and right share one scale.

Every third diagonal, halves mixed. Before its first hit it puts 88% of its search shots on one of the six sets of every-third diagonals, and it mixes the set's dark-square and light-square halves: 56% of those shots land in the half it fires at more (random order: 59%; a half-first sweep: nearly 100%). Both shares are taken on the set and half that fit the shots best, so even random shooting scores well above a third (47% to 52%) and a half. It opens like the large-board model's plain plan.

After the first sink, 67% of its hunting shots stay on the set; the plain plan would keep all of them there until the set is swept. While hunting, only 14% of its shots hit the heat map's hottest cell (while finishing a ship, 79%): under its own hider the heat map is nearly flat, with 41% of hunting shots on cells within 5% of the hottest cell's value.

Replays. On 2,000 replayed games with fleets from its hider (a sample; the exact average is 39.0 shots), it needs 38.8 shots on average; the middle 80% take 26 to 55. The layout that takes it longest on average needs 41.8 shots (exact): both 3s run down column B, one cell in from the edge, with the 2 beside the lower one (B2–B4, B8–B10, C9–C10).

On that layout most hunts finish in 22 to 37 shots, but a minority need 45 to 93 (in 200 sampled games: median 34, sample average 40.9). Figure 3 shows why: in the slow game the drawn hunt's diagonals miss the 2 entirely, and it sinks only at shot 65.

Figure 3
Two games on the mixture's slowest layout
ABCDEFGHIJ12345678910123456789101112161734
34 shots (the median game). The set crosses all three ships; sinks at shots 16, 17 (the 2) and 34.
ABCDEFGHIJ12345678910123456789101112142165
65 shots (about one game in ten on this layout is this slow or slower). The set misses the 2; the 3s sink at shots 14 and 21, the 2 only at 65.
Two replays of the finished mixture on the layout that takes it longest on average, both drawn in the same orientation (the second game was played in a reflected orientation and is reflected back). Shaded: the set of every-third diagonals the drawn hunt swept with its first ten shots. Numbers: the first 12 shots and the shot that sank each ship.

5Hand-written rules on this board

The essay's chart for this board, Figure 4 here, races hand-written rules against the snapshot after 387 rounds. Across: head-to-head (accurate). Up: the win rate against its pace on the rule's worst layout, from a quick pass with a fixed number of games per layout; a minimum over many noisy estimates reads low, so the heights are approximate.

Figure 4
Average against worst on 10×10, three ships
Self-play mixtureRule you can play by handRule that needs a computerFires at the densest cell (needs a computer)
Win rate on its worst layout38%42%46%50%0%10%20%30%40%50%3-parity, heat-map finishing: head-to-head 46.8%, worst layout 37.8%3-parity, heat-map finishing, cells next to misses shot later (light): head-to-head 46.9%, worst layout 37.6%3-parity, heat-map finishing, cells next to misses shot later (strong): head-to-head 47.1%, worst layout 37.3%Checkerboard, heat-map finishing: head-to-head 39.9%, worst layout 31.9%Checkerboard, heat-map finishing, cells next to misses shot later (light): head-to-head 40.1%, worst layout 31.7%Checkerboard, heat-map finishing, cells next to misses shot later (strong): head-to-head 40.3%, worst layout 30.8%3-parity played by hand: head-to-head 46.5%, worst layout 37.2%Checkerboard played by hand: head-to-head 38.9%, worst layout 30.1%3-parity, densest cell first: head-to-head 48.6%, worst layout 23.8%Checkerboard, densest cell first: head-to-head 45.1%, worst layout 9.5%Heat map: head-to-head 48.2%, worst layout 8.9%Self-play mixture, after 387 rounds (own pace): head-to-head 50.0%, worst layout 49.75% (own pace)Smart 3-parity, three-ship core: head-to-head 47.7%, worst layout 38.6%3-parity, heat-mapfinishing (3 variants)Checkerboard,heat-map finishing(3 variants)3-parity by handCheckerboard by hand3-parity,densest cell firstCheckerboard,densest cell firstHeat mapSelf-play mixture (own pace)Smart 3-parity,three-ship coreHead-to-head vs. the mixture after 387 rounds
Every win rate races the self-play mixture after 387 rounds: across, head-to-head; up, on each strategy's worst layout, from a quick pass (approximate). The mixture's own point (49.75%) is against its own pace, so it shows flatness, not speed. Each '3 variants' label names a cluster of three gray points, listed in Table 1. Dashed lines: 50%.

No rule wins half its races. The fastest fire at the densest cell, 3-parity densest first (48.6%) and the heat map (48.2%), and both collapse on their worst layouts, to 23.8% and 8.9%. The heat map's worst packs all three ships into the top-left corner: D1–F1, A2–C2 and the 2 in the corner beside them.

Randomized 3-parity keeps about 37% on its worst layout (37.2% by hand, 37.8% with heat-map finishing) but pays in speed (46.5% to 47.1% head-to-head). The checkerboard family is lower on both.

The highest worst case on the chart belongs to a rule you can play by hand: smart 3-parity's three-ship core (the essay's section 3), at 38.6% on its worst layout and 47.7% head-to-head. It is the adaptive rule of section 6 with a jump in 35% of games and a zone final for the 2: on the checkerboard color fired at more, where a 2 still fits, first the cells outside that color's half (A or B) that touch an unshot cell of the other half, then the rest of its half, then the rest of the color. The zone final adds half a point head-to-head (47.2% before) and leaves the worst case within noise of its earlier 38.5%; that noise, about 1.3 points on a single layout class, also covers its lead over 3-parity with heat-map finishing (37.8%). Never jumping reaches 37.6%, also within that noise, and always jumping 31.2%; each does worst on a different layout, where the other wins about 47% to 48%.

The trade-off sharpens as boards grow. Against each board's self-play mixture, 3-parity by hand beats the heat map's worst case by 21 points on 6×6, 27 on 8×8 and about 28 on 10×10, while the heat map's head-to-head lead shrinks from 6.6 to 4.2 to 1.7 points. These are estimates (the 6×6 one from a pass that had not settled); the 5×5 page has the same chart, exact.

Table 1
Every strategy on the chart
StrategyHead-to-headWorst-layout win rate (approx.)Average shotsNeeds
Self-play mixture, after 387 rounds (own pace)50.0%49.75% (own pace)39.1a computer (self-play)
3-parity, densest cell first48.6%23.8%40.3a computer
Heat map48.2%8.9%39.7a computer
Smart 3-parity, three-ship core47.7%38.6%39.9pencil and paper
3-parity, heat-map finishing, cells next to misses shot later (strong)47.1%37.3%41.0a computer
3-parity, heat-map finishing, cells next to misses shot later (light)46.9%37.6%41.1a computer
3-parity, heat-map finishing46.8%37.8%41.1a computer
3-parity played by hand46.5%37.2%41.2pencil and paper
Checkerboard, densest cell first45.1%9.5%40.3a computer
Checkerboard, heat-map finishing, cells next to misses shot later (strong)40.3%30.8%42.1a computer
Checkerboard, heat-map finishing, cells next to misses shot later (light)40.1%31.7%42.2a computer
Checkerboard, heat-map finishing39.9%31.9%42.3a computer
Checkerboard played by hand38.9%30.1%42.7pencil and paper
Head-to-head: against the mixture after 387 rounds, both fleets hidden the way its hider hides them (the mixture's own row is 50% by definition). Worst layout: from the quick pass, approximate; the mixture's own value is against its own pace and certified. Average shots: under the same hider. Cells next to misses shot later: the heat-map finisher delays cells beside a miss; strong and light say how much. The two densest-cell-first rules commit to one diagonal direction and were scored on one representative of each layout class, so their worst-layout values depend on orientation and are rougher still. Highlighted: the self-play mixture, the hand-played 3-parity of the essay's opening, and smart 3-parity's three-ship core with its zone final, scored later with the same pass.

6Rules from the model, on 10×10

The large-board page builds its plans on three sets of cells: A and B, the halves of one set of every-third diagonals on dark and on light squares, and C, the other dark squares. The adaptive rule plays that page's adaptive plan on the real board: sweep A, then B while a 3 is afloat, then hunt the 2 on A's checkerboard color. Its variants change the order inside each step or jump early to B.

We raced them against the finished mixture in a harsher measure, the mutual race: the fleet the rule must find sits on the rule's worst layout found, the fleet the mixture must find on the mixture's worst; a copy of the mixture would score 50%. Each rule played 100 games on every layout, then up to 250,000 on its slowest. A harder layout may exist, so the slowest layouts found are lower bounds in shots and the mutual-race values upper bounds (rounded up).

Table 2
Simple rules against the finished mixture
RuleAverage shotsSlowest layout found (shots, at least)Random layoutsMutual race (≤)Needs
Adaptive rule, fixed orientation, corner-to-corner sweep39.4450.048.3%33.6%pencil and paper
Adaptive rule, random rotation or reflection, corner-to-corner sweep39.4446.348.3%40.3%pencil and paper
Adaptive rule, checkerboard by fewest shot neighbors39.3445.348.5%40.4%pencil and paper, counting
Adaptive rule, checkerboard by fewest missed neighbors (hits break ties)39.3345.848.6%39.0%pencil and paper, counting
Adaptive rule, checkerboard weighted by where a 2 fits39.7144.347.8%43.3%pencil and paper, counting
Adaptive rule, random checkerboard order40.1543.447.0%44.7%pencil and paper
Adaptive rule, random order everywhere (never jumps)40.0242.647.3%45.6%pencil and paper
Adaptive rule, jump in 35% of games40.0941.847.1%47.0%pencil and paper
Adaptive rule, jump in half the games40.1242.447.1%46.0%pencil and paper
Adaptive rule, always jump40.2245.846.9%41.5%pencil and paper
3-parity, one fixed diagonal direction41.1142.746.4%42.7%pencil and paper
3-parity played by hand (direction drawn each game)41.1142.746.4%43.3%pencil and paper
Jump in 35% of games, computer finishing39.9942.147.5%46.2%a computer
Jump in 35% of games, heat-map finishing39.8641.947.8%46.4%a computer
Checkerboard by fewest shot neighbors, heat-map finishing39.0947.149.3%32.0%a computer
A different metric from Figure 4 and Table 1: every value races the finished mixture. Average shots: over all layouts, equally likely. Random layouts: both fleets hidden at random. Mutual race: both sides hide where the other does worst; these values are upper bounds, since a harder layout for the rule may exist. Corner-to-corner sweep: diagonals taken in order from one corner. Fewest shot (missed) neighbors: checkerboard cells with the fewest already-shot (missed) neighbors first. Computer finishing: a computer picks the shots that finish a hit ship. Two more variants (jump in 40% of games, a milder computer finisher) appear in Figure 5 and the text. Highlighted: the best simple rule.

Every fix that removes a fixed choice helps. With one orientation and a corner-to-corner sweep the rule wins at most 33.6% of mutual races; a random rotation or reflection lifts it to 40.3%, random checkerboard order to 44.7%, and random order inside each half to 45.6%. Jumping to B after the first 3 sinks, in a secret 35% of games, reaches 47.0%. Randomizing costs about 0.7 shots of average.

A hider can aim at fixed priorities. The fastest rule (checkerboard by fewest shot neighbors, heat-map finishing) needs 39.09 shots and wins 49.3% on random layouts, but at most 32.0% in the mutual race. For a rule that orders its checkerboard by fewest missed neighbors, 99% of its 500 worst layouts hide the 2 in the interior (21% at random). Computer finishing buys speed, not robustness: 0.1 to 0.23 shots, with the mutual race at 46.2% to 46.4%.

Jump in some games, not all. On 10×10 the adaptive rule peaks near the jump rate of the large-board model's best blend (about a third): 47.0% at 35% and 46.6% at 40%, within noise of each other, against 45.6% never and 41.5% always (Figure 5): the same shape, though not the same number. Layout by layout, the 35% rule's finishing times are exactly 65% of the never-jump rule's plus 35% of the always-jump rule's, and a hider can aim at only one of the two weaknesses.

Figure 5
Jumping in some games on 10×10
Checked in full (dots), screen (dashed)
Mutual race on 10×10 (at most)0%25%50%75%100%40%42%44%46%48%10x10 screen: mixed never/always-jump resultsjump in 0%: ≤ 45.6%jump in 35%: ≤ 47.0%jump in 40%: ≤ 46.6%jump in 50%: ≤ 46.0%jump in 100%: ≤ 41.5%≤ 47.0% at 35%≤ 45.6%≤ 41.5%Games in which it jumps
The mutual race against the finished mixture (upper bounds) for the adaptive rule that jumps in the given share of games. Dots: rules checked in full. Dashed line: a cheaper screen that mixes the never-jump and always-jump results (it can differ by up to 0.65 points, most at a 50% jump rate).

The best simple rule stays at least 3 points short of the mixture. With the zone final for the 2 (section 5), it is the core of smart 3-parity on the classic fleet (the classic page).

On their slowest layouts found, these rules keep the large-board model's order: 3-parity and the adaptive rule level, always jumping slowest, jumping in some games fastest (how the model compares).

7What is open, and how to play

Open questions.

How to play 10×10 with this fleet: the adaptive rule with a secret 35% jump and the zone order for the 2, as on the essay's card (47.7% head-to-head and 38.6% on its worst layout in Figure 4's quick pass). For the large board, use one of the large-board page's printable plans.

  1. Set up A and B as in the essay's How to hunt.
  2. With a hit not yet explained by a sink, extend a line of hits; otherwise fire next to a single hit.
  3. Fire at random cells of A, then of B while a 3 is afloat, only where a 3 still fits. When the first 3 sinks, decide in secret whether to jump (35% of games: 1–7 on a twenty-sided die); if so, switch to B at once (back to A if B runs out).
  4. Once both 3s sink, take the checkerboard color fired at more; its half of the set is your half. Where a 2 still fits, fire first at the cells outside your half that touch an unshot cell of the other half, then at the rest of your half, then at the rest of the color.

Replays are exact. Each of 2,200 replayed games ends at the finishing time stored for its hunt and layout (the essay's replay shows four). Replaying the mixture needs its 964 hunts and weights; rebuilding it needs the loop of section 2, the 1,924,020-layout enumeration and a linear-program solver. The last 1,600 or so rounds took about 185 hours on one 8-thread workstation, about 8 minutes per round near the end.

Sources and caveats

Data as of 24 October 2026. Every number on this page is read from the project's result files by the page's build script; light computation (rounding, counts, ratios) is scripted there.

Files used

Exact, sampled, estimated, or a bound

Caveats

← Back to Optimal Battleship