All games
🚢

Imperfect Information

Battleship

Probability-density hunt & target solver.

2 players1 solverHeuristic
HeuristicImport stateBest moveProbabilities
Your shot board
Click cells to record outcomes. Pick a paint mode below first. Clicking a cell that already shows that mark clears it.
1
2
3
4
5
6
7
8
9
10
A
B
C
D
E
F
G
H
I
J
misshitsunk
Suggestion
Probability-density solver — enumerates every legal placement of each remaining ship and counts how often each cell is covered.

Analysing position…

Deep dive

How BoardSolve plays Battleship

Optimal Battleship play has two regimes: a 'hunt' phase where you search the board uniformly, and a 'target' phase that follows up on a hit. BoardSolve unifies both by enumerating every legal placement of the remaining ships consistent with your observations.

Placement enumeration

For each unsunk ship the solver lists every (origin, orientation) that fits the 10×10 board, respects shots you've marked as miss / hit / sunk, and doesn't overlap previously-placed ships of the same configuration.

Summing over all valid joint placements gives a per-cell probability that a ship occupies it — the heatmap shown in the UI. The recommended shot is the argmax, with hits weighted higher during the target phase to prefer cells adjacent to known hits.

Why this beats parity-only heuristics

Pure parity-based hunting (e.g. checkerboard sampling at stride equal to the smallest remaining ship) ignores information from past misses. The density approach uses every observation and dominates parity in expected shots-to-sink across the standard rule sets.

References & further reading

  1. Berry, N. (2011) . DataGeneticsCanonical write-up of the probability-density / heatmap approach BoardSolve implements.
  2. Crombez, L., da Fonseca, G. D. & Gerard, Y. (2020) . FUN 2020, LIPIcsComplexity results and exact algorithms for the placement-consistency problem.
  3. Sevenster, M. (2004) . ICGA Journal 27(3), 142–149