Battle Ship Winning Algorithm - Optimal Strategy

226 Views Asked by At

I have an $8 \times 8$ grid. I have three ships that are $4$ long, $3$ long, and $2$ long. Is there an algorithm that can ensure a win every time? Oh! Most importantly, you must know the number of bombs I have: $24$ bombs


I don't know if a generalization would be fruitful, but it might prove interesting; that is, an $n\times n$ grid with $m$ ships of length(s) $k_1, k_2, k_3, \dots, k_m$ each of course being less than or equal to $n$, and a supply of $\beta$ bombs.


n.b. - By "Battle Ship" the OP means "one person dropping bombs on a grid with $m$ hidden ships, being oriented either horizontally or vertically within the grid, and having a supply of $\beta$ bombs."

1

There are 1 best solutions below

0
On

There is no winning strategy. Even for just the $2$-long boat alone, you would need 32 bombs to be sure.

Optimal strategies are also not possible here. You can make optimal strategies for when the opponen't boats are 'randomly' positioned (although even that is only a minor improvement), but a well-playing opponent will compensate that by putting their boats with a higher probability on less beneficial squares, making it a purely chance-based game.