What are the odds of a hit in Battleship?
Our ten-ship fleet occupies 4 + 2×3 + 3×2 + 4×1 = 20 squares out of 100. Draw a square uniformly at random and the chance of hitting is one in five, however the ships are arranged. That calculation doesn't rank the corner against the centre.
Take the known squares out of the draw
- First shot misses. All 20 decks remain, with 99 squares to choose from. The next random shot hits with probability 20/99, about 20.2%.
- First shot wounds a ship. There are 19 intact decks in 99 squares. But at least one side neighbour contains more of that ship. Choosing among four neighbours in the middle gives at least a one-in-four chance.
- First shot sinks a boat in a corner. Ships cannot touch. Cross out the boat and its three neighbours. That leaves 19 decks in 96 candidates, about 19.8%.
A single-square boat elsewhere on the edge rules out five neighbours; in the interior it rules out eight. Later in the game some of these may already be marked. Count each square just once.