Battleship is a search problem, and method beats luck by about twenty shots. Firing at random takes 75 shots on average to sink the whole fleet; a hunt-and-target method takes about 58; counting where the remaining ships can still fit takes about 55. For your own fleet, the edges are the best place against this computer: a fleet laid along the sides costs the strongest level 16 extra shots.
The game here follows the notebook rules: a 10×10 grid and ten ships — one four-decker, two three-deckers, three two-deckers and four one-deckers, twenty cells in all. You shoot first, and a hit earns another shot.
A shooting method can be measured by how many shots it needs to sink a whole randomly placed fleet. Each line below was simulated 50,000 times against the computer's own way of placing ships:
| Method | Average shots | Median |
|---|---|---|
| Random cells | 75.0 | 75 |
| Hunt at random, then chase the hit along its axis | 58.2 | 58 |
| Same, chasing plus a chequerboard search (ignore one-deckers while a longer ship is afloat) | 57.0 | 57 |
| Same, with a net as coarse as the longest ship afloat | 56.6 | 57 |
| Probability counting: shoot where the most placements of the remaining ships fit | 55.3 | 56 |
The jump from random shooting to any method that chases its hits is seventeen shots; everything after that is refinement worth one to three shots. That is still a lot: in a game between two good players a couple of shots decide who sinks the last ship first.
For comparison, the computer levels on this site need 62.2 (Easy), 58.1 (Hard) and 55.2 (Expert) shots on average, 50,000 games each.
While you have no hit to follow, you are looking for a ship you cannot see. A net is a set of cells chosen so that every ship of a given length must cover at least one of them. On a chequerboard — every second cell — no ship of length two or more can slip through, and it costs half the board.
A coarser net is better while the big ships are still out. Cells on every fourth diagonal catch any four-decker with just 25 shots; once the four-decker is down, switch to every third diagonal for the three-deckers, then to the chequerboard. The one-deckers are left for last: no net catches them cheaply, and by then most of the board is crossed out anyway.
One trap here: a net sized by the smallest ship afloat is useless in this fleet, because four one-deckers keep the smallest ship at length one for nearly the whole game, and a net of step one is the whole board. Size the net by the largest ship you are still looking for.
A hit is worth the most when it is followed in the fewest shots. Three positions cover every case:
When the axis is clear, keep going in one direction until you miss, then come back to the other end. Once a ship is sunk, check what is left in the fleet: if the four-decker is gone, a run of three hits is complete and there is nothing to chase further.
The strongest method does not ask “where have I not shot yet” but “in how many ways could the remaining ships cover this cell”. On an empty board a central cell can be covered by 36 different placements of the fleet's ships and a corner by only 16. Every miss removes placements; every hit makes the placements through it much more likely. Shoot the cell with the most.
Nobody counts all of that at the table, but the habit is easy to borrow, especially late in the game: look at what is left afloat and find where each ship can still lie. On a well-peppered board a three-decker often has only two or three possible berths. Shoot the cell they share.
Against each computer level, the methods above give these chances of winning (you shoot first; both fleets placed at random):
| Your method | vs Easy | vs Hard | vs Expert |
|---|---|---|---|
| Random cells | 9% | 4% | 2% |
| Hunt and chase | 68% | 52% | 40% |
| Chequerboard search + chase | 73% | 57% | 45% |
| Net by the longest ship + chase | 74% | 58% | 46% |
| Probability counting | 78% | 63% | 51% |
Shooting first is worth about one and a half points: two equally strong methods split games roughly 51.5 to 48.5 in favour of whoever starts.
Your layout matters as much as your shooting, and here the answer is clear. A computer that counts placements aims at the middle, where most placements fit; a ship pressed against the side of the board has fewer ways to be there and is found later. We simulated the strongest computer level against several layouts:
| Your layout | Expert needs, on average | Your chance of winning* |
|---|---|---|
| Every ship touching the edge of the board | 71.6 shots | 96% |
| Every ship in the top half (rows 1–5) | 68.7 shots | 93% |
| Big ships on the edge, one-deckers anywhere | 64.1 shots | 81% |
| Random, as the game places it | 55.2 shots | 51% |
| No ship touching the edge | 49.3 shots | 28% |
* With probability counting on your side. The same order holds against Easy and Hard.
The usual advice is not to line your whole fleet along the sides, because a human opponent who notices will sweep the edges. That is good advice against a person. The computer here does not remember your past games and never adapts, so against it the edge layout simply wins more. The worst thing you can do is the opposite: a fleet bunched in the middle is found fastest of all.
On every level the computer sees exactly what you would see in its place — misses, hits, sunk ships and the list of ships afloat. It never looks at your layout, and it places its own fleet the same way on every level.
To beat Expert reliably, do both things above: count where ships fit when you shoot, and put your own fleet on the edges. Together they turn an even game into roughly 24 wins out of 25.
Search on a net sized by the largest ship you are still looking for, chase every hit along its axis, and late in the game shoot where the remaining ships can still fit. In simulation this takes about 55–57 shots to sink a fleet, against 75 for random shooting.
Against a computer that counts probabilities, along the edges of the board. Here a fleet with every ship touching the edge costs the strongest level 71.6 shots on average instead of 55.2. Against a human who knows you, vary it: an edge-only layout becomes predictable.
It matters less than it seems. With the way ships are placed here, every cell holds a ship in 18–21% of games; only the corners are slightly colder. What matters is that the first shots belong to a net.
On a 10×10 board with a twenty-deck fleet, a good method sinks everything in about 55–58 shots; nine games in ten fall between about 46 and 64. Random shooting needs about 75.
Not in this version, which follows the classic notebook rules: ships may not touch even at a corner. That is why the cells diagonal to a hit, and the ring around a sunk ship, are water for certain.
Yes, here: after a hit you keep shooting until you miss. The computer plays by the same rule.
Partly. Even the best method varies by about twenty shots from game to game, so luck decides close games. But method is worth about the same twenty shots on average, so over many games the better searcher wins clearly.
Yes. Against Easy and Hard a hunt-and-chase method already wins more than half the games. Against Expert, probability counting plus a fleet laid along the edges wins about 96% of games in simulation.