Optimal Battleship · detail

The Classic Fleet

Seventy strategies raced against one pace on the real 10×10 board, each scored on random boards and on the hardest board a search could find against it.

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

This page goes behind section 3 of the essay, on the real game: a 10×10 board with a carrier (5 cells), a battleship (4), two 3s and a 2. There are about 15 billion ways to hide that fleet, far too many to score one by one, so every worst case here comes from a search and is an upper bound.

We raced 70 strategies against one pace: the finishing times of the best strategy we found, on 32,000 random boards. The best strategy found needs 47.3 shots on average. On the hardest board a search found against it, it needs 48.3 shots on average and wins at most 43.9% of races, the best worst case of the 70.

Smart 3-parity, from the essay's card, needs 47.8 shots and wins 47.4% of races on random boards and ≤ 37.6% on its worst board found. Every strategy that beats the pace on random boards falls to ≤ 26.3%; the heat map, one of the fastest at 44.8 shots and 57.1%, falls to ≤ 4.2%. The 5×5, 10×10 and large-board pages cover the three-ship games.

1The yardstick: one pace, two numbers

The game is a race: both players fire one shot per round, and the first to sink the whole fleet wins (a finish in the same round counts half). Shots are answered “miss” or “hit”, and a sink announces the ship's size only; every strategy here uses only those announcements.

We drop context (where the opponent shoots and which of your ships it has hit; see the essay's section 1), so a strategy can be scored against its opponent's finishing times alone, the pace. Here the pace is the best strategy found on 32,000 random boards: every legal layout equally likely (ships straight, inside the board, not overlapping, possibly touching), each game in a random rotation or reflection.

The pace averages 47.3 shots (median 46); 90% of its games end between 33 and 65. A single game wins the share of pace games that take longer, plus half of those that tie (Figure 3, top): 77.7% at 40 shots, 51.2% at 46, 33.5% at 50 and 11.8% at 60. Near the middle, each extra shot costs 4.4 to 4.9 percentage points of win rate, “points” for short.

Why one fixed opponent? Against its own finishing times any strategy wins half its races on average, and a random shooter (about 95 shots) wins exactly half on every board. A fixed pace makes strategies comparable; since nobody knows yet how a strong player should hide this fleet, the opponent hides at random.

Each strategy gets two numbers: its win rate on random boards, on the pace's own boards (standard error about 0.2 points), and its worst case, the win rate on the hardest board a search found against it.

One caveat: the best strategy races its own finishing times, so its ≤ 43.9% measures flatness rather than speed. Two checks speak for it: on its worst board found it needs 48.3 shots, fewer than any other strategy needs on its own worst board found (51.0 at best). Against an earlier, faster pace (the classic-board self-play loop's, 46.2 shots), an earlier search held it to ≤ 41.0%, and three other strategies to ≤ 25%, ≤ 33.9% and ≤ 35.2%.

Three hunts come from the essay's introduction, the opening. The checkerboard fires at random cells of one color, 3-parity at random cells of one set of every-third diagonals, then the next, and the heat map at the cell the most remaining ship placements could cover. The first two finish the plainest way (fire next to a hit, extend a line of two); the heat map just counts again after every shot.

3All 70 strategies

Figure 2 puts every strategy on one chart, colored by what playing it takes. There are 26 pencil-and-paper rules, 10 that add one count of where ships still fit, 18 that need a computer, 11 heat-map hunters, 2 computed mixtures of rules and 3 self-play machines. Table 1 lists the strongest of each kind and the reference hunts.

Figure 2
Average against worst on the classic board
Machine (self-play)Pencil and paperPencil and paper plus one countNeeds a computerHeat-map hunter (needs a computer)Computed mixture of rules
40%50%60%0%10%20%30%40%as fast as the pace3-parity, heat-map finishing (needs a computer): 47.5% on random boards, ≤ 33.7% on its worst board found (computer)3-parity, heat-map finishing, cells next to misses shot later (light): 47.7% on random boards, ≤ 34.2% on its worst board found (computer)3-parity, heat-map finishing, cells next to misses shot later (strong): 47.9% on random boards, ≤ 34.2% on its worst board found (computer)Checkerboard, heat-map finishing (needs a computer): 38.6% on random boards, ≤ 28.1% on its worst board found (computer)Checkerboard, heat-map finishing, cells next to misses shot later (light): 38.9% on random boards, ≤ 29.6% on its worst board found (computer)Checkerboard, heat-map finishing, cells next to misses shot later (strong): 39.4% on random boards, ≤ 27.2% on its worst board found (computer)3-parity in halves, jump in 35% of games, big ships: the densest every-fourth-diagonal set, computer finishing: 48.5% on random boards, ≤ 35.4% on its worst board found (computer)3-parity in halves, jump in 35% of games, big ships: the set with the fewest cells they could still occupy, the 2 hunted first on cells a big ship could also cover, computer finishing: 49.0% on random boards, ≤ 36.5% on its worst board found (computer)3-parity rule, checkerboard by fewest shot neighbors, lazy endgame (a random every-fourth-diagonal set), computer finishing: 50.3% on random boards, ≤ 22.4% on its worst board found (computer)3-parity rule, checkerboard by fewest shot neighbors, big ships: the set with the fewest cells they could still occupy, the 2 hunted first on cells a big ship could also cover, computer finishing: 50.9% on random boards, ≤ 23.5% on its worst board found (computer)3-parity in halves, jump in 35% of games, big ships: the densest every-fourth-diagonal set, computer finishing (tempered): 48.4% on random boards, ≤ 34.3% on its worst board found (computer)3-parity in halves, jump in 35% of games, big ships: the set with the fewest cells they could still occupy, the 2 hunted first on cells a big ship could also cover, computer finishing (tempered): 49.0% on random boards, ≤ 35.1% on its worst board found (computer)3-parity rule, checkerboard by fewest shot neighbors, big ships: the set with the fewest cells they could still occupy, the 2 hunted first on cells a big ship could also cover, computer finishing (tempered): 50.7% on random boards, ≤ 23.9% on its worst board found (computer)3-parity, big ships: densest cell of the densest 3-parity set: 46.7% on random boards, ≤ 36.2% on its worst board found (computer)3-parity, big ships: densest cell of the densest every-fourth-diagonal set: 46.7% on random boards, ≤ 36.6% on its worst board found (computer)3-parity, computer counts the big-ship endgame: 47.0% on random boards, ≤ 37.2% on its worst board found (computer)Checkerboard, big ships: densest cell of the densest every-fourth-diagonal set: 38.9% on random boards, ≤ 30.8% on its worst board found (computer)Checkerboard, computer counts the big-ship endgame: 39.2% on random boards, ≤ 30.9% on its worst board found (computer)Variant of smart 3-parity's first version: big ships on the densest every-fourth-diagonal set: 46.5% on random boards, ≤ 36.2% on its worst board found (pencil plus one count)3-parity in halves, jump in 35% of games, big ships: the densest every-fourth-, then every-fifth-diagonal set: 46.6% on random boards, ≤ 36.2% on its worst board found (pencil plus one count)3-parity rule, checkerboard by fewest shot neighbors, big ships: the densest every-fourth-, then every-fifth-diagonal set: 48.8% on random boards, ≤ 28.5% on its worst board found (pencil plus one count)3-parity in halves, never jump, big ships: the densest every-fourth-, then every-fifth-diagonal set: 46.9% on random boards, ≤ 35.0% on its worst board found (pencil plus one count)3-parity in halves, jump in 35% of games, big ships: the densest every-fourth-diagonal set, the 2 hunted first on cells a big ship could also cover: 46.8% on random boards, ≤ 36.5% on its worst board found (pencil plus one count)3-parity rule, checkerboard by fewest shot neighbors, big ships: the densest every-fourth-diagonal set, the 2 hunted first on cells a big ship could also cover: 48.7% on random boards, ≤ 27.9% on its worst board found (pencil plus one count)3-parity, big ships: random cells of the densest 3-parity set: 45.7% on random boards, ≤ 35.7% on its worst board found (pencil plus one count)3-parity, big ships: random cells of the densest every-fourth-diagonal set: 45.6% on random boards, ≤ 36.0% on its worst board found (pencil plus one count)Checkerboard, big ships: random cells of the densest every-fourth-diagonal set: 38.0% on random boards, ≤ 29.7% on its worst board found (pencil plus one count)Checkerboard, big ships: random cells of the densest 3-parity or every-fourth-diagonal set: 38.0% on random boards, ≤ 30.0% on its worst board found (pencil plus one count)3-parity (opening), the same rule searched a second time: 44.9% on random boards, ≤ 34.8% on its worst board found (pencil and paper)Checkerboard (opening), the same rule searched a second time: 35.7% on random boards, ≤ 27.4% on its worst board found (pencil and paper)3-parity rule, fixed orientation and sweep, lazy endgame (a random every-fourth-diagonal set): 47.7% on random boards, ≤ 26.9% on its worst board found (pencil and paper)3-parity rule, random orientation, fixed sweep, lazy endgame (a random every-fourth-diagonal set): 47.8% on random boards, ≤ 26.4% on its worst board found (pencil and paper)3-parity rule, checkerboard by fewest shot neighbors, lazy endgame (a random every-fourth-diagonal set): 48.3% on random boards, ≤ 28.4% on its worst board found (pencil and paper)3-parity rule, checkerboard by fewest shot neighbors (hits break ties), lazy endgame (a random every-fourth-diagonal set): 48.3% on random boards, ≤ 29.2% on its worst board found (pencil and paper)3-parity rule, checkerboard weighted by where a 2 fits, lazy endgame (a random every-fourth-diagonal set): 47.2% on random boards, ≤ 32.0% on its worst board found (pencil and paper)3-parity rule, random checkerboard order, lazy endgame (a random every-fourth-diagonal set): 46.1% on random boards, ≤ 33.9% on its worst board found (pencil and paper)3-parity in halves, never jump, lazy endgame (a random every-fourth-diagonal set): 46.5% on random boards, ≤ 34.3% on its worst board found (pencil and paper)First version of smart 3-parity with the lazy endgame (a random every-fourth-diagonal set): 46.2% on random boards, ≤ 35.9% on its worst board found (pencil and paper)3-parity in halves, jump in 40% of games, lazy endgame (a random every-fourth-diagonal set): 46.1% on random boards, ≤ 35.9% on its worst board found (pencil and paper)3-parity in halves, jump in half the games, lazy endgame (a random every-fourth-diagonal set): 46.0% on random boards, ≤ 35.4% on its worst board found (pencil and paper)3-parity in halves, always jump, lazy endgame (a random every-fourth-diagonal set): 45.7% on random boards, ≤ 27.7% on its worst board found (pencil and paper)The opening's 3-parity with the lazy endgame (first search): 45.3% on random boards, ≤ 35.9% on its worst board found (pencil and paper)The opening's 3-parity with the lazy endgame (second search): 45.4% on random boards, ≤ 35.7% on its worst board found (pencil and paper)3-parity in halves, jump in 35% of games, checkerboard kept for the big ships: 43.9% on random boards, ≤ 33.1% on its worst board found (pencil and paper)3-parity rule, random checkerboard order, checkerboard kept for the big ships: 43.9% on random boards, ≤ 31.4% on its worst board found (pencil and paper)3-parity in halves, jump in 35% of games, 3-parity set kept until the 4 sinks: 46.4% on random boards, ≤ 35.5% on its worst board found (pencil and paper)3-parity rule, checkerboard by fewest shot neighbors, 3-parity set kept until the 4 sinks: 48.3% on random boards, ≤ 29.0% on its worst board found (pencil and paper)Smart 3-parity, first version (the 2 hunted anywhere on its color): 46.8% on random boards, ≤ 36.5% on its worst board found (pencil and paper)3-parity in halves, jump in 35% of games, big ships: the set with the fewest cells they could still occupy, the 2 hunted first on cells a big ship could also cover: 47.1% on random boards, ≤ 36.3% on its worst board found (pencil and paper)3-parity rule, checkerboard by fewest shot neighbors, big ships: the set with the fewest cells they could still occupy, the 2 hunted first on cells a big ship could also cover: 48.8% on random boards, ≤ 27.9% on its worst board found (pencil and paper)Checkerboard, densest cell first: 55.0% on random boards, ≤ 8.0% on its worst board found (heat-map hunter)3-parity, densest cell first: 55.8% on random boards, ≤ 24.0% on its worst board found (heat-map hunter)Particle-filter hunter: 56.4% on random boards, ≤ 8.4% on its worst board found (heat-map hunter)Three-ship heat map, big ships: random cells of the densest 3-parity or every-fourth-diagonal set: 56.3% on random boards, ≤ 3.3% on its worst board found (heat-map hunter)Three-ship heat map, computer counts the big-ship endgame: 57.5% on random boards, ≤ 3.3% on its worst board found (heat-map hunter)Three-ship heat map weighted by the self-play hider, big ships: random cells of the densest 3-parity or every-fourth-diagonal set: 56.8% on random boards, ≤ 1.5% on its worst board found (heat-map hunter)Three-ship heat map weighted by the self-play hider, big ships: densest cell of the densest 3-parity or every-fourth-diagonal set: 57.8% on random boards, ≤ 1.5% on its worst board found (heat-map hunter)Three-ship heat map weighted by the self-play hider, computer counts the big-ship endgame: 58.0% on random boards, ≤ 1.5% on its worst board found (heat-map hunter)Three-ship heat map, heat-map endgame: 57.5% on random boards, ≤ 3.3% on its worst board found (heat-map hunter)Three-ship heat map on the better checkerboard color: 56.2% on random boards, ≤ 2.5% on its worst board found (heat-map hunter)Rule mixture (a weighted die over four rules): 47.8% on random boards, ≤ 38.1% on its worst board found (mixture of rules)Rule mixture, second version: 48.5% on random boards, ≤ 36.9% on its worst board found (mixture of rules)Fastest rule playable by hand (3-parity rule, checkerboard by fewest shot neighbors): 48.9% on random boards, ≤ 28.1% on its worst board found (pencil and paper)3-parity (opening): 45.0% on random boards, ≤ 34.1% on its worst board found (pencil and paper)Checkerboard (opening): 35.7% on random boards, ≤ 27.5% on its worst board found (pencil and paper)Smart 3-parity (the one on the card): 47.4% on random boards, ≤ 37.6% on its worst board found (pencil and paper)Heat map: 57.1% on random boards, ≤ 4.2% on its worst board found (heat-map hunter)Best strategy found: the {3,3,2} self-play mixture, replayed: 50.0% on random boards, ≤ 43.9% on its worst board found (machine)Earlier version of the best strategy: 52.7% on random boards, ≤ 20.0% on its worst board found (machine)Classic-board self-play mixture: 52.3% on random boards, ≤ 26.3% on its worst board found (machine)Best strategy found(its own pace)Smart 3-parity3-parity (opening)Checkerboard (opening)Fastest rule by handClassic-boardself-play mixtureEarlier version ofthe best strategyHeat mapWin rate on random boards →Worst board found (at most) →
Each dot is one strategy. Right: win rate against the best strategy's finishing times on 32,000 random boards. Up: win rate on the worst board a search found, an upper bound. The best strategy's own point is against its own pace. The opening's two plain hunts were each searched twice, so each shows as two nearby dots. Every dot right of the dashed line falls to 26.3% or less. Differences under about a point are within the noise of the search.

Average and worst case trade off. All 16 strategies that beat the pace on random boards hold 26.3% or less on their worst board found, the best of them the classic-board self-play mixture. The heat-map hunters are the fastest (55 to 58% on random boards) and the most exploitable (worst cases ≤ 1.5% to ≤ 24.0%). Only the best strategy pairs the pace's average with a worst case above 40%.

The strongest rules, by hand or by computer, sit between 35 and 38%. Computer finishing buys speed, not safety: after a hit, the computer fires where most of the ways the ships could explain the hits overlap. With it smart 3-parity's first version wins 49.0% on random boards, 2 points more than without, yet holds the same ≤ 36.5%. The rule mixture, a weighted die over four rules set by a linear program, is the best strategy not built by self-play (≤ 38.1%) but needs a computer and plays the heat map in about 9% of games.

Table 1
Selected strategies, best worst case first
StrategyKindShotsWin rate, random boardsWorst board foundShots there
Best strategy foundMachine (self-play)47.350.0%≤ 43.9%48.3
Rule mixtureComputed mixture of rules48.147.8%≤ 38.1%51.2
Smart 3-parityPencil and paper47.847.4%≤ 37.6%51.0
3-parity, computer counts the big-ship endgameNeeds a computer48.847.0%≤ 37.2%51.8
First version of smart 3-parity, big ships on the densest every-fourth-diagonal set, the 2 hunted first on cells a big ship could also coverPencil and paper plus one count48.146.8%≤ 36.5%51.1
First version of smart 3-parity with computer finishingNeeds a computer47.549.0%≤ 36.5%51.2
3-parity (opening)Pencil and paper49.345.0%≤ 34.1%52.6
Fastest rule playable by handPencil and paper47.348.9%≤ 28.1%54.6
Checkerboard (opening)Pencil and paper51.435.7%≤ 27.5%54.3
Classic-board self-play mixtureMachine (self-play)46.452.3%≤ 26.3%55.8
3-parity, densest cell firstHeat-map hunter (needs a computer)45.855.8%≤ 24.0%55.9
Earlier version of the best strategyMachine (self-play)46.452.7%≤ 20.0%58.8
Heat mapHeat-map hunter (needs a computer)44.857.1%≤ 4.2%66.3
Three-ship heat map weighted by the self-play hiderHeat-map hunter (needs a computer)44.658.0%≤ 1.5%69.1
Kind: what playing it takes, as in Figure 2. Shots: average on the 32,000 random boards; a rule that plays in a fixed orientation plays all eight rotations and reflections of each. Worst board found: an upper bound, rounded up. Shots there: the average on that board (the true worst case is at least this slow). Each strategy's own descents used 0.37 to 0.78 million games (the heat map's 0.39 million), not counting cross-play; smart 3-parity's value comes from a fourth, confirming descent (0.25 million more; section 7). The best strategy's 50.0% is its own pace.

4Speed against blind spots

Against a fixed pace a game's share of wins depends only on its length (Figure 3, top), so a blind spot shows up as extra shots. Figure 3 (bottom) sets random boards against the worst board found.

The best strategy needs 1.1 more shots there, smart 3-parity 3.2, 3-parity 3.3 and the checkerboard 2.9. The classic-board self-play mixture (9.4) and the earlier version of the best strategy (12.4) start about a shot faster than the best strategy and lose it all; the heat-map hunters need 10 to 24 more.

Figure 3
Speed on random boards, and what a hider can take away
One game of that length: its win rate against the pace40404545505055556060656570700%50%100%Win rate of a single game against the pace, by its lengthA 40-shot game wins 77.7% of races77.7%A 46-shot game wins 51.2% of races51.2%A 50-shot game wins 33.5% of races33.5%A 60-shot game wins 11.8% of races11.8%Average shots:random boardsworst board foundBest strategy foundBest strategy found: 47.3 shots on random boards (50.0%)Best strategy found: 48.3 shots on its worst board found (≤ 43.9%)+1.1Smart 3-paritySmart 3-parity: 47.8 shots on random boards (47.4%)Smart 3-parity: 51.0 shots on its worst board found (≤ 37.6%)+3.2Rule mixtureRule mixture: 48.1 shots on random boards (47.8%)Rule mixture: 51.2 shots on its worst board found (≤ 38.1%)+3.13-parity (opening)3-parity (opening): 49.3 shots on random boards (45.0%)3-parity (opening): 52.6 shots on its worst board found (≤ 34.1%)+3.3Checkerboard (opening)Checkerboard (opening): 51.4 shots on random boards (35.7%)Checkerboard (opening): 54.3 shots on its worst board found (≤ 27.5%)+2.9Fastest rule by handFastest rule by hand: 47.3 shots on random boards (48.9%)Fastest rule by hand: 54.6 shots on its worst board found (≤ 28.1%)+7.3Classic-board self-play mixtureClassic-board self-play mixture: 46.4 shots on random boards (52.3%)Classic-board self-play mixture: 55.8 shots on its worst board found (≤ 26.3%)+9.4Earlier version of the best strategyEarlier version of the best strategy: 46.4 shots on random boards (52.7%)Earlier version of the best strategy: 58.8 shots on its worst board found (≤ 20.0%)+12.4Heat mapHeat map: 44.8 shots on random boards (57.1%)Heat map: 66.3 shots on its worst board found (≤ 4.2%)+21.5Three-ship heat map weighted by the self-play hiderThree-ship heat map weighted by the self-play hider: 44.6 shots on random boards (58.0%)Three-ship heat map weighted by the self-play hider: 69.1 shots on its worst board found (≤ 1.5%)+24.5Shots to sink the whole fleet
Top: the win rate of a single game of a given length, the share of the pace's 32,000 games that take longer plus half of those that tie. Bottom: average shots on random boards (open circle) and on the worst board found (filled), measured by the search; the number is the difference. Colors as in Figure 2. A strategy's win rate averages this curve over all its games, so it is not the value at its average length.

Figure 4 shows the whole spread for five of these strategies, from 8,000 new games on each one's worst board found; their averages agree with the search's within a quarter of a shot. On its worst board, every one of the heat map's 8,000 games took 60 to 75 shots; even 60 shots beats only 12% of the pace's games.

Figure 4
How long each strategy takes
Best strategy foundClassic-board self-play mixtureSmart 3-parityHeat mapCheckerboardThe pace (the best strategy found on random boards)
Random boards
204060801000%5%10%15%The pace: the best strategy found on random boardsBest strategy found: 47.3 shots on average, 50.0% against the paceClassic-board self-play mixture: 46.4 shots on average, 52.3% against the paceSmart 3-parity: 47.8 shots on average, 47.4% against the paceHeat map: 44.8 shots on average, 57.1% against the paceCheckerboard: 51.4 shots on average, 35.7% against the paceShots to sink the whole fleetShare of games ending at that shot
Worst board found against each
204060801000%5%10%15%The pace: the best strategy found on random boardsBest strategy found: 48.2 shots on average, ≤ 44.2% against the paceClassic-board self-play mixture: 55.5 shots on average, ≤ 26.8% against the paceSmart 3-parity: 51.3 shots on average, ≤ 36.9% against the paceHeat map: 66.2 shots on average, ≤ 4.3% against the paceCheckerboard: 54.3 shots on average, ≤ 27.6% against the paceShots to sink the whole fleetShare of games ending at that shot
Show the data as a table
StrategyBoardsAverage shotsMedianMiddle 80% of gamesWin rate against the paceGames
Best strategy foundRandom boards47.34636–6150.0%32,000
Best strategy foundWorst board found48.24840–56≤ 44.2%8,000
Classic-board self-play mixtureRandom boards46.44635–5952.3%32,000
Classic-board self-play mixtureWorst board found55.55841–66≤ 26.8%8,000
Smart 3-parityRandom boards47.84737–6047.4%256,000
Smart 3-parityWorst board found51.35041–64≤ 36.9%8,000
Heat mapRandom boards44.84433–5857.1%256,000
Heat mapWorst board found66.26663–70≤ 4.3%8,000
CheckerboardRandom boards51.45339–6235.7%256,000
CheckerboardWorst board found54.35543–64≤ 27.6%8,000
The share of each strategy's games that end at each shot, smoothed over five neighboring shots. Left: the benchmark's 32,000 random boards (smart 3-parity, the heat map and the checkerboard play each in all eight rotations and reflections). Right: the hardest board the search found against each strategy, a different board for each, 8,000 new games (smart 3-parity and the heat map play it in all eight rotations and reflections, 1,000 games each). The gray area is the pace, the best strategy's games on random boards. The heat map is the fastest on random boards and by far the slowest on its worst board found; the best strategy's games shift the least. Win rates from these new games are within 0.7 points of the search's.

Figure 5 shows six of the worst boards found.

Figure 5
Worst boards found
ships of the worst board foundshading: ways the five ships could cover the cell on an empty board (10 at a corner to 34 in the middle)
ABCDEFGHIJ12345678910
Best strategy found: ≤ 43.9%, about 48.3 shots
ABCDEFGHIJ12345678910
Smart 3-parity: ≤ 37.6%, about 51.0 shots
ABCDEFGHIJ12345678910
Fastest rule by hand: ≤ 28.1%, about 54.6 shots
ABCDEFGHIJ12345678910
Classic-board self-play mixture: ≤ 26.3%, about 55.8 shots
ABCDEFGHIJ12345678910
Heat map: ≤ 4.2%, about 66.3 shots
ABCDEFGHIJ12345678910
Three-ship heat map weighted by the self-play hider: ≤ 1.5%, about 69.1 shots
The hardest board the search found against six strategies, with each one's win rate there (an upper bound) and its average shots on that board. The shading is geometry only: edge and corner cells can be covered by fewer ship placements. The heat-map hunters lose on clusters, in a corner for the heat map and in the middle for the weighted three-ship heat map; the fastest rule by hand loses where its fixed hunt for the 2 looks last. The classic-board self-play mixture, though randomized, also loses on an edge-packed board. The best strategy's hardest board is more spread out, though it has two ships on the left edge; smart 3-parity's puts the 2 in a corner, where its order for the 2 looks last (section 7).

5The best strategy found, in depth

The best strategy found is not built for the classic fleet at all. It is a snapshot of the 10×10 {3,3,2} self-play mixture (two 3-cell ships and a 2-cell ship) from the essay's section 2 and the 10×10 page. Its 743 fixed hunts (hunts with no dice) win 49.95% on their worst three-ship layout against their own pace. Each game draws one hunt by weight and a random rotation or reflection; the hunt plays its own three-ship game, in which the carrier and the battleship are water:

# before the game
h ← one of the 743 fixed hunts, by weight
turn the board: a random rotation or reflection
# h plays its own game: two 3s and a 2;
# the 4 and the 5 are water
repeat until the fleet is sunk:
    if the announcements prove a big ship:
        # "sunk, size 4 or 5", hits no small
        # ship can explain, or 8 hits with
        # small ships afloat
        finisher: extend the line of hits
                  until every hit is
                  explained by a sink
        rewind h to just before its first
        shot at that ship; that cell now
        reads "miss"
    else if a 3 or the 2 is afloat:
        c ← the cell h asks for
        if c is known, or no ship afloat fits:
            answer h from memory  # no shot
        else:
            fire at c; tell h "miss", "hit"
            or "sunk"
    else:                    # big ships only
        fire at the cell the most placements
        of the remaining big ships could
        cover                     # heat map

The finisher only extends lines of hits. The rewind is total: every choice the hunt made after its first shot at that big ship is erased, and cells it asks for again cost nothing. The program needs about 6 GB of memory and plays about 8 games a second on six threads.

Figure 6 shows a rewind in the essay's typical 46-shot game (its third replay, in section 3, steps through every shot). At shots 30 to 32 the hunt hits E6, D6 and C6 without a sink. With one 3 afloat, a 3 covering all three hits would have been announced sunk, so a big ship has been hit. The finisher sinks the carrier at G6, and the hunt is rewound to just before E6, which now reads “miss”.

Figure 6
Sunk, then forgotten: the rewind in a real game
hitmisssunk shipthis step's cells
ABCDEFGHIJ12345678910
After shot 32. The hunt hits E6, D6 and C6 in a row (outlined), with no sink: no small ship explains that.
ABCDEFGHIJ12345678910
After shot 34. The finisher hits F6 and sinks the carrier at G6.
ABCDEFGHIJ12345678910
What the hunt remembers. Its own shots up to 29, plus E6 answered “miss” from memory. C6, D6, F6 and G6 are gone.
Three moments of one game on a random board. The same happens to the battleship at shots 35 to 39: the hunt hits C1, E1 and D1, the finisher sinks it at F1, and the hunt is rewound to just before C1. The last 3 falls at shot 46. With the big ships erased from its memory, the small-ship hunt stays on the path its three-ship game would take.

Where do its 47.3 shots go? Per game, the small-ship hunt keeps 34.3 and a rewind later erases 8.5 (5.8 of them hits on the big ships). The finisher fires 2.8 and the final heat-map hunt 1.7; another 3.7 choices are answered from memory.

Only 38% of its shots on random boards go to the hottest cell of a full-fleet heat map. The finisher's shots go there 84% of the time and the final hunt's 87%, but the small-ship hunt's only 33%.

The small-ship hunt finds the big ships itself (Table 2): in 2,000 replayed pace games it made the first hit on the carrier in 89.7% of games and on the battleship in 87.4%. A 4 or a 5 crosses every set of every-third diagonals, where the hunt spends most of its search shots. Of its pure hunting shots (a 3 afloat, no hit waiting), 72.0% land on the one set that fits that game best; that set is picked after the fact, and random shooting scores 46.4%.

Table 2
Where the best strategy's shots go
Random boards (2,000 games)Its worst board found (1,000 games)
First hit on the carrier made by the small-ship hunt89.7%96.9%
First hit on the battleship made by the small-ship hunt87.4%94.7%
Games that need the final heat-map hunt18.9%8.4%
Small-ship hunt shots per game42.545.6
Finisher shots per game2.82.1
Final heat-map hunt shots per game1.80.5
Total shots per game47.148.2
The first 2,000 pace games, replayed shot by shot, against 1,000 games on its worst board found. Small-ship hunt shots include those a rewind later erases. Estimates from these samples.

Why it holds up

Inside its private game each hunt follows exactly its path on that three-ship layout alone (7,999 of 8,000 checked games do, or stop early along it). The mixture's win rate holds on every three-ship layout, averaged over rotations and reflections, so with a random orientation a hider can aim only at where the 4 and the 5 sit relative to the hunt. On one hard board the small ships alone scored 37% to 69% across the eight orientations.

The best strategy's own worst board found (Figure 5, first board) puts the 2 in a corner and a 3 against each of two edges. The big ships cost it less there than on random boards: the small-ship hunt makes the first hit on the carrier in 97% of games and on the battleship in 95%, and the final hunt runs in only 8%. Its 1.1 extra shots come from the small-ship hunt itself, 3.1 more per game, though its hunting shots stay on one set as often as ever (75.8%).

Rewinding is the key design choice. The earlier version of the best strategy used the same hunts but, after each big ship, rebuilt the hunt's picture of the small ships from the whole game so far. It also lacked the free “miss” on cells no ship afloat could occupy (about 0.2 points in an earlier test). It is a shot faster on random boards (46.4 shots, 52.7%) but holds only ≤ 20.0% on its worst board found.

Our working explanation, an inference rather than a measurement: after a rebuild every hunt restarts from a state of knowledge its own game never reaches, so the hunts converge on one picture that the three-ship guarantee does not cover.

What was tried and dropped

Tested against an earlier pace, some with a faster, approximate version of the program, so only direction and rough size carry over:

6Why self-play on the full fleet stalled

We ran the self-play loop of the essay's section 2 on the full fleet for 473 hours. Its linear program held one fixed placement of the 4 and the 5 for each of the 1.9 million three-ship layouts (one board in 7,800), plus the 2,706 hard boards its search found. That search never moved the small ships, tried the same 200 big-ship placements every round and used one orientation, so it could reach only about 48 million boards, 0.32% of the 15.0 billion.

The loop looked converged and was not. In its last 22 rounds its own score over the boards it knew read 42.2 to 43.1%, while each round's fresh hard boards held it to 19.0 to 27.6%. Gains per hour of compute fell from 0.37 points to 0.006. These values are against the loop's own pace at the time, not this page's.

A 6×6 test with every board scorable shows the same trap. With a fleet of 4, 3, 3 and 2 cells (633,432 boards) and the same design, the loop's own score read 49% while its true worst case was 26%. Adding the 400 hardest boards each round, found by an exact search, lifted the truth only to 40.1%, still rising. With every board in the linear program, 6×6 {3,3,2} closes normally at 49.6%, and {4,3,2}, which also has a 4, at 49.0%.

On this page's yardstick the classic-board self-play mixture needs 46.4 shots, wins 52.3% on random boards and holds ≤ 26.3% on its worst board found (Figure 5). That board lines the top and left edges: battleship A1–D1, carrier D2–H2, the 2 at F1–G1 above it, and the 3s down columns A and B. The best strategy avoids the trap by giving the linear program a game it can list completely.

7Rules a person can play

Smart 3-parity is the best simple rule we found for the three-ship game, plus a sweep for the big ships. Its full recipe follows, as on the essay's card. Rows and columns are numbered 0 to 9; a live cell is an unshot cell on a straight unshot run long enough for the smallest big ship afloat.

# before the game
D ← row + column, or row − column + 9
    # each cell's diagonal, 0–18;
    # direction at random
a ← (a six-sided die) − 1
A ← cells whose D leaves remainder a
    when divided by 6
B ← cells whose remainder differs from a by 3
jump ← true in 35% of games
    # 1–7 on a 20-sided die
F ← the four every-fourth-diagonal sets of
    one direction, chosen at random
# each shot
if a hit is not yet explained by a sink:
    if two or more such hits line up:
        fire at a random unshot cell
        extending the line
    else: fire at a random unshot neighbor
          of a hit
else if a 3 is afloat:
    if jump and one 3 is sunk and B has
       unshot cells:
        fire at a random unshot cell of B
    else: fire at a random unshot cell of A,
          then of B
else if the 2 is afloat:
    color ← the checkerboard color fired at
            more (chosen once, then kept)
    H ← the half, A or B, on that color
    fire at a random unshot cell of that
    color next to at least one unshot cell,
    taking first the cells outside H that
    touch an unshot cell of the other half,
    then those in H, then the rest
else:                    # the 4 and/or the 5
    if no set is chosen, or it has no live
       cell left:
        choose the set with the fewest live
        cells (at least one) among the six
        every-third-diagonal sets, the four
        sets of F and, with only the 5 left,
        the ten every-fifth-diagonal sets
    fire at a random live cell of the chosen set

On “sunk, size k”, the ship is taken to be k unexplained hits in a line through the cell just shot. The lazy endgame replaces the last step: pick one set of F at random before the game, then fire at its live cells, then at any live cell.

Hunting the 2 in that order is the one idea we tested from the large-board model that held up here. A cell outside H next to an unshot cell of the other half catches the 2 both across that half and off both halves, so firing there first saves 0.33 shots, worth 0.66 points on random boards. Two other ideas lost worst case: searching part of B instead of the 35% jump, up to 2.1 points; sweeping B in long runs, 0.6 to 1.1, as B has three or four short diagonals. Reading the big ships (alternate A and B once a sunk 4 or 5 crossed both) led the benchmark search at ≤ 38.5% but fell to ≤ 36.3% in the stronger one.

Is it the best rule a person can play? We found none better. In a stronger search of the five closest rules on 34 hard boards (Table 3), its first version, hunting the 2 anywhere on its color, came out on top, level with a variant. The revised card, given the same search twice and a third descent, holds ≤ 36.8% on 109 boards that include those 34, against ≤ 35.9% for the first version, which it beats on 73 of them.

Table 3
The best rules a person can play, searched harder
RuleBenchmark searchStronger searchShots on that boardAverage shots
Smart 3-parity (the card)≤ 37.6%≤ 36.8%51.347.8
Smart 3-parity with the lazy endgame–≤ 36.4%51.448.0
First version (the 2 hunted anywhere on its color)≤ 36.5%≤ 36.1%51.248.2
First version, the 2 hunted first on cells a big ship could also cover≤ 36.3%≤ 35.9%51.348.1
First version with the lazy endgame≤ 35.9%≤ 35.4%51.448.3
First version, lazy endgame, jump in 40% of games≤ 35.9%≤ 35.0%51.548.3
The opening's 3-parity with the lazy endgame (first entry)≤ 35.9%≤ 35.4%52.349.2
The same rule (second entry)≤ 35.7%≤ 35.0%52.449.2
Worst board found in each search (upper bounds, rounded up). The stronger search started fresh confirmed descents from the 870 boards any benchmark search had started from or ended on, then scored the first two rows on 109 common boards and the others on 34 of them, 64,000 games each (standard error about 0.1 point); on the 109 the first version reads ≤ 35.9%. The lazy-endgame card had no benchmark search. Shots on that board are its average there; average shots come from the benchmark's random boards. The descents' own 64,000-game finals read lower on the same boards for two rows (first version ≤ 35.9%, first 3-parity entry ≤ 35.2%). The two 3-parity entries, measured separately, differ by 0.34 points on the same board, about 2.5 standard errors, so read gaps under half a point as ties.

With the lazy endgame the first version is as safe as the opening's 3-parity with the same endgame, and a shot faster (48.3 against 49.2 shots), so the halves and the jump buy speed without costing safety. The full endgame adds 0.7 points on the common boards, and 0.4 to the revised card (≤ 36.8% against ≤ 36.4%, at 47.8 against 48.0 shots).

How often should you jump? With the lazy endgame (Figure 7, first version), always jumping is clearly punished (≤ 27.7%), never jumping costs a little (≤ 34.3%), and jumping in a third to half of games does best. The values at 35, 40 and 50% are within noise: the curve says to mix, not exactly how often. The essay's section 4 shows why: a hider can punish either pure plan, not both.

Figure 7
How often to jump
26%28%30%32%34%36%38%0%25%50%75%100%neveralwaysfirst version, full endgame ≤ 36.5%Never jump, lazy endgame: ≤ 34.3% (benchmark search), 46.5% on random boards, 48.2 shots≤ 34.3%First version of smart 3-parity with the lazy endgame: ≤ 35.9% (benchmark search), 46.2% on random boards, 48.3 shotsFirst version of smart 3-parity with the lazy endgame: ≤ 35.4% in the stronger search≤ 35.9%Jump in 40% of games, lazy endgame: ≤ 35.9% (benchmark search), 46.1% on random boards, 48.3 shotsJump in 40% of games, lazy endgame: ≤ 35.0% in the stronger search≤ 35.9%Jump in half the games, lazy endgame: ≤ 35.4% (benchmark search), 46.0% on random boards, 48.4 shots≤ 35.4%Always jump, lazy endgame: ≤ 27.7% (benchmark search), 45.7% on random boards, 48.5 shots≤ 27.7%Share of games that jump to half B after the first 3 sinksWorst board found (at most) →
Worst board found for the first version of smart 3-parity with the lazy endgame, by how often it jumps (benchmark search, filled dots). The open rings are the stronger search, run only at 35% (≤ 35.4%) and 40% (≤ 35.0%). Upper bounds, rounded up. The dashed line is the first version with the full endgame.

The big-ship endgame matters too. With none (the rule keeps sweeping its checkerboard color), the first version falls from ≤ 35.9% (lazy endgame) to ≤ 33.1%; the lazy endgame lifts the opening's 3-parity from ≤ 34.1% to ≤ 35.9%. A computer counting where the big ships fit takes 3-parity to ≤ 37.2%, within noise of the card.

The fastest rule a person can play matches the best strategy's speed (47.3 shots, 48.9%) but holds only ≤ 28.1%. It sweeps half A and then half B diagonal by diagonal from one corner, never jumps, and hunts the 2 on cells with the fewest shot neighbors first. Its worst board (Figure 5) puts the 2 mid-board between the 3s, probably because fixed priorities can be aimed at. On the three-ship board, 99% of the 500 worst layouts for a related hunt for the 2 (fewest missed neighbors first) had the 2 off the edges, against 21% at random.

What does simplicity cost? Against the best strategy, smart 3-parity needs 0.6 more shots on random boards and wins 2.6 points fewer races there. On the worst boards found the gap is about 6 points, an estimate from two similar searches, not a bound.

8Heat maps and the three common hunts

The essay's opening covers the heat map's races with the checkerboard and 3-parity, and its worst board. On random boards it also beats smart 3-parity in 59.7% of races and the best strategy in 57.1%, but every heat-map hunter is predictable, and the search finds where each looks last (Figure 5).

The three-ship heat maps, which count placements of the two 3s and the 2 only, lose on the right edge (≤ 2.5% to ≤ 3.3%). Weighted by where the {3,3,2} self-play hider puts its ships, the three-ship heat map loses on a central cluster (≤ 1.5%), probably because it looks late wherever that hider rarely goes.

Luck with the 2 decides much of 3-parity's speed. Its first set meets the 2 in two games out of three, and then it finishes in 44.1 shots on average, against 59.8 shots when the first set misses the 2. Against the best strategy's pace that is 58.1% of races against 18.5%.

The worst boards of 3-parity and the checkerboard look ordinary, with no corner or edge packed, and cost them only about 3 shots (Figure 3): what hurts them is speed, not a blind spot.

9What is still open

Sources and caveats

Every number on this page is computed by this page's builder from its data extracts (rows.json, pace.json, stages.json, killtime.json, best.json, boards.json, hand_rules.json, opening.json, stall.json, current_best.json). They were taken from the classic benchmark's results (all 71 rows: 69 searched strategies plus two average-only variants of the earlier version, not shown, one of which uses information the rules do not give), the revised smart 3-parity's runs (the same pace, boards and search, a third descent, and the stronger search of section 7 with its first version on 109 common boards), its variants study, its 32,000 pace games, the stronger-search summary for five rules a person can play (six entries), the 8,000-game runs on each worst board (Figure 4), 2,000 + 1,000 exact replays of the best strategy, and the benchmark, replay and self-play review documents. A few facts (the full-fleet loop's coverage and reach, the 6×6 test's size, the tournament's game counts, the strategy's memory and speed, the per-orientation spread, the outside check, the tried-and-dropped results, the worst layouts for the hunt for the 2, the rule mixture's weights) are read from those documents directly and checked against the cited line. The essay's sources hold the reference list.

Exact

Estimated

Upper bounds

Earlier yardstick and other conventions

Computed for this page

← Back to Optimal Battleship