How to Win at Battleship

Slate's Culture Blog
May 16 2012 7:48 PM

How to Win at Battleship

1337211559937

Universal Studios hopes to rake in millions of dollars this weekend with the release of its new action film Battleship, and sales of the classic board game are expected to get a nice boost, too. As readers may recall, the  game play is simple: Each player arranges five ships—an aircraft carrier, battleship, cruiser, submarine, and destroyer—on a ten-by-ten grid of squares and attempts to “sink” his opponent’s ships by calling out the squares where he believes his enemy’s ships are hiding. Most players approach the game as essentially one of chance, targeting squares at random and hoping for a “hit.” But is there a better strategy? If a friend challenges you to a nostalgic game of Battleship this weekend, is there a way to increase the chances that your fleet will emerge victorious?

There is. Nick Berry, a technology consultant and president of DataGenetics, a data mining company based in Seattle, has meticulously laid out several strategies that will improve your chances of sinking your opponent’s ships before she sinks yours. These methods are battle-tested: Berry created computer algorithms to employ his strategies in hundreds of millions of simulations so he could calculate their respective success rates.

Berry started by assessing the strategy most players intuit, which he refers to as Hunt/Target. The computer begins in Hunt mode—that is, firing at random until it hits a ship. When it has a hit, it focuses fire on the adjacent squares. Once the ship is sunk, the computer reverts back to Hunt mode until it hits another target. In Berry’s simulations, it took an average of 66 moves to sink an opponent’s battleship. It’s a serviceable approach, but there’s still a lot of random guessing involved. 

battleship

Advertisement

To improve upon the Hunt/Target method, Berry devised a tactic that combines Hunt mode with the concept of mathematical parity. Think of it this way: Imagine if the board were color-coded like a checkerboard, with white and blue squares. Even the smallest ship—the destroyer—covers two squares, and would therefore have to rest on both a white and a blue square. Fire only at blue squares and you will eventually hit every ship at least once. This method effectively allows you to reduce the number of targets on the board by half when you’re in Hunt mode. (When you register a hit you enter Target mode, and both blue and white squares are in play until you sink the ship.) This strategy yields a slightly better average than regular Hunt/Target mode: an average of 65 moves to sink your opponent’s fleet.

Berry’s most efficient approach to Battleship uses a probability density function, which takes into consideration the different ways the ships can fit across the board. Here, Berry’s algorithm considers all of the possible configurations of the five ships and calculates a probability that any given square is occupied by a ship. At the outset of the game, obviously, the ships could be anywhere—there isn’t much difference in the probabilities for each square. But as the game progresses, you eliminate more and more squares from the board, and also reduce the number of possible configurations—the five-square aircraft carrier can’t be hiding in a four-square stretch of sea. A human player can’t realistically calculate the probabilities for each square as accurately as Berry’s model, but she can keep in mind the underlying strategy here. By considering the length of each ship that remains on the board and aiming for the area of the board that has the highest probability of containing those ships, you greatly improve your hit rate. When Berry’s computer used this approach, he reduced the average number of moves per game to 44 moves.

Of course, Battleship remains a game of chance. When I spoke with Berry, he pointed out that there’s no approach that will allow man or machine to win every time out. As a testament to the game’s random nature (and surely to some human error), my small sampling of three games using Hunt/Target, Hunt/Target with parity, and an attempt at using probability density yielded games lasting 38, 41, and 55 moves respectively. I won two out of three times.

Berry, who spent 10 years working in Microsoft’s Casual Game division (which now produces the Xbox) enjoys analyzing classic board games. You can find his strategies for Risk, Candyland, and Chutes & Ladders—the former two are also being turned into feature films—on his blog.

Aisha Harris is a Slate staff writer.

TODAY IN SLATE

Politics

Blacks Don’t Have a Corporal Punishment Problem

Americans do. But when blacks exhibit the same behaviors as others, it becomes part of a greater black pathology. 

I Bought the Huge iPhone. I’m Already Thinking of Returning It.

Scotland Is Just the Beginning. Expect More Political Earthquakes in Europe.

Lifetime Didn’t Think the Steubenville Rape Case Was Dramatic Enough

So they added a little self-immolation.

Two Damn Good, Very Different Movies About Soldiers Returning From War

Medical Examiner

The Most Terrifying Thing About Ebola 

The disease threatens humanity by preying on humanity.

Students Aren’t Going to College Football Games as Much Anymore, and Schools Are Getting Worried

The Good Wife Is Cynical, Thrilling, and Grown-Up. It’s Also TV’s Best Drama.

  News & Politics
Weigel
Sept. 20 2014 11:13 AM -30-
  Business
Business Insider
Sept. 20 2014 6:30 AM The Man Making Bill Gates Richer
  Life
Quora
Sept. 20 2014 7:27 AM How Do Plants Grow Aboard the International Space Station?
  Double X
The XX Factor
Sept. 19 2014 4:58 PM Steubenville Gets the Lifetime Treatment (And a Cheerleader Erupts Into Flames)
  Slate Plus
Slate Picks
Sept. 19 2014 12:00 PM What Happened at Slate This Week? The Slatest editor tells us to read well-informed skepticism, media criticism, and more.
  Arts
Brow Beat
Sept. 19 2014 4:48 PM You Should Be Listening to Sbtrkt
  Technology
Future Tense
Sept. 19 2014 6:31 PM The One Big Problem With the Enormous New iPhone
  Health & Science
Bad Astronomy
Sept. 20 2014 7:00 AM The Shaggy Sun
  Sports
Sports Nut
Sept. 18 2014 11:42 AM Grandmaster Clash One of the most amazing feats in chess history just happened, and no one noticed.