You have probably met Solitaire Battleship in a newspaper or puzzle book. A square grid hides a whole fleet — a battleship, a couple of cruisers, some destroyers, a scatter of single-cell submarines. Around the edges sit numbers: each row and each column tells you how many ship cells it contains. Your job is to place every ship so that all the counts come out exactly right, with no two ships touching, not even diagonally.
Most of the time you reason it out: a row that needs zero ships clears a whole strip, a column that's already full blocks the rest. Step by step the fleet falls into place.
But that comfortable feeling of "the numbers force it" has a limit. When the easy deductions run out, you are left searching — and that search is exactly where the puzzle stops being a pastime and becomes one of the hardest kinds of problem in all of computer science.
Comments
Loading comments...