Probability-Based Targeting in Battleship
Use math to find ships faster — how probability density maps turn guessing into science.
Every Battleship player develops an intuition for “good” and “bad” shots. Probability-based targeting replaces intuition with mathematics, ensuring you always fire at the square most likely to contain an enemy ship. This guide explains the concept from the ground up.
The Core Idea
At any point in a Battleship game, some squares are more likely to hide ships than others. A density map (also called a heat map) quantifies this by counting, for each square, how many valid ship placements pass through it. The square with the highest count is your best shot.
Building a Density Map — Step by Step
Step 1: List the Unsunk Ships
At the start of the game, all five ships are unsunk:
| Ship | Length |
|---|---|
| Carrier | 5 |
| Battleship | 4 |
| Cruiser | 3 |
| Submarine | 3 |
| Destroyer | 2 |
Step 2: For Each Ship, Count Valid Placements
For the Carrier (length 5), consider every possible horizontal and vertical placement on the 10×10 grid. A horizontal Carrier can start in columns A–F (6 options) across 10 rows = 60 horizontal placements. A vertical Carrier can start in rows 1–6 (6 options) across 10 columns = 60 vertical placements. Total: 120 placements on an empty board.
Now remove any placement that passes through a known miss. If you’ve missed at E5, every Carrier placement that includes E5 is invalid.
Step 3: For Each Square, Sum Across All Ships
Repeat Step 2 for each of the five ships, then add up the valid-placement counts for each square. A square that many Carrier placements pass through and many Destroyer placements pass through will have a high density.
Step 4: Fire at the Highest-Density Square
The square with the highest total count is your mathematically optimal shot.
Example — Early Game Density
On a completely empty board with no information, the density map looks like a hot center and cool edges:
Relative density (simplified, all ships combined):
A B C D E F G H I J
1 8 11 14 16 17 17 16 14 11 8
2 11 15 19 22 23 23 22 19 15 11
3 14 19 24 28 29 29 28 24 19 14
4 16 22 28 32 34 34 32 28 22 16
5 17 23 29 34 36 36 34 29 23 17
6 17 23 29 34 36 36 34 29 23 17
7 16 22 28 32 34 34 32 28 22 16
8 14 19 24 28 29 29 28 24 19 14
9 11 15 19 22 23 23 22 19 15 11
10 8 11 14 16 17 17 16 14 11 8
The highest-density squares are E5, E6, F5, and F6 — the dead center of the board. This is why strategy guides recommend starting in the center.
Updating the Map After Each Shot
Every shot changes the density map:
- Miss: All placements passing through that square are removed, reducing density in surrounding squares.
- Hit: A hit increases density in adjacent squares (ships extend from hit squares) and removes all empty-square placements from that cell.
- Sinking: Removes the sunk ship entirely from the calculation, often dramatically reshaping the map.
This iterative updating is called Bayesian reasoning — you continuously refine your beliefs about ship locations based on new evidence.
Hunt Mode vs. Target Mode Density
Hunt Mode
During hunt mode, your density map reflects all unsunk ships equally. You fire at the globally highest-density square.
Target Mode
When you score a hit, the density map shifts dramatically. Adjacent squares spike in density because the hit ship must extend in one direction. Smart target-mode play fires at the highest-density adjacent square first.
Consider a hit at E5 with no other information:
| Adjacent square | Relative density spike |
|---|---|
| D5 (left) | High (many horizontal ships pass through D5–E5) |
| F5 (right) | High (same reasoning) |
| E4 (up) | High (many vertical ships pass through E4–E5) |
| E6 (down) | High (same reasoning) |
If E4 is already a miss, E4 gets zero density, and the remaining three squares split the probability.
Practical Tips for Human Players
Exact density calculations require tracking hundreds of placements — impractical during a live game. But you can approximate:
- Center bias. Early in the game, favor center squares. The density math confirms this.
- Open-cluster priority. Large blocks of unchecked squares have higher density than narrow strips. If a 5×3 rectangle is still open, it’s a better hunting ground than a scattered set of isolated squares.
- Adjacent-hit priority. After a hit, the four adjacent squares are by far the highest density on the entire board. Always check them next.
- Endgame narrowing. When few squares remain, the density map becomes simple enough to compute mentally. If only a 3-square ship is left and you see exactly one 3-square gap on the board, fire there.
Probability Targeting and Parity
Probability targeting and parity shooting are complementary:
- Parity halves the search space.
- Probability ranking orders the remaining squares optimally.
Used together, you fire at the highest-density parity square each turn — the best of both worlds.
How Computers Use Probability Targeting
Top Battleship AI algorithms implement full probability targeting:
- Generate all valid configurations of the remaining fleet.
- Count how many configurations include a ship at each square.
- Fire at the highest-count square.
- Update after each hit/miss.
These algorithms average roughly 42 shots to sink all ships, compared to human averages of 60–75 shots. While you can’t match a computer’s precision, even approximate probability thinking shaves 10–20 shots off your average.
Summary Table
| Technique | Avg. shots to win | Improvement over random |
|---|---|---|
| Pure random | ~96 | Baseline |
| Checkerboard parity | ~65 | ~32% |
| Parity + center bias | ~55 | ~43% |
| Full probability density | ~42 | ~56% |
Every step up the ladder requires more mental effort but yields measurable gains. Even implementing the first two levels — parity and center bias — puts you well ahead of the average player.
Play With the Odds in Your Favor
Apply probability thinking in a live Battleship game.
Play Battleship Free