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

History

The Self-Made Man

The story of America’s most pliable, pernicious, irrepressible myth.

The First Case of Ebola in America Has Been Diagnosed in Dallas

The Slatest
Sept. 30 2014 5:23 PM The First Case of Ebola in America Has Been Diagnosed in Dallas

Does Your Child Have “Sluggish Cognitive Tempo”? Or Is That Just a Disorder Made Up to Scare You?

The Supreme Court, Throughout Its History, Has Been a Massive Disappointment

Why Indians in America Are Mad for India’s New Prime Minister

Damned Spot

Now Stare. Don’t Stop.

The perfect political wife’s loving gaze in campaign ads.

Building a Better Workplace

You Deserve a Pre-cation

The smartest job perk you’ve never heard of.

The GOP Senate Candidate in Iowa Doesn’t Want Voters to Know Just How Conservative She Really Is

Parents, Get Your Teenage Daughters the IUD

The XX Factor
Sept. 30 2014 12:34 PM Parents, Get Your Teenage Daughters the IUD
  News & Politics
Politics
Sept. 30 2014 5:19 PM Social Outcasts Republican candidates are retreating from debates on abortion, gay marriage, and contraception.
  Business
Building a Better Workplace
Sept. 30 2014 1:16 PM You Deserve a Pre-cation The smartest job perk you’ve never heard of.
  Life
Education
Sept. 30 2014 1:48 PM Thrashed Florida State’s new president is underqualified and mistrusted. But here’s how he can turn it around.
  Double X
The XX Factor
Sept. 30 2014 12:34 PM Parents, Get Your Teenage Daughters the IUD
  Slate Plus
Behind the Scenes
Sept. 30 2014 3:21 PM Meet Jordan Weissmann Five questions with Slate’s senior business and economics correspondent.
  Arts
Brow Beat
Sept. 30 2014 4:45 PM Steven Soderbergh Is Doing Some Next-Level Work on The Knick
  Technology
Future Tense
Sept. 30 2014 5:47 PM California Gov. Vetoes Bill Requiring Warrant for Police Surveillance Drones
  Health & Science
Bad Astronomy
Sept. 30 2014 7:30 AM What Lurks Beneath the Methane Lakes of Titan?
  Sports
Sports Nut
Sept. 28 2014 8:30 PM NFL Players Die Young. Or Maybe They Live Long Lives. Why it’s so hard to pin down the effects of football on players’ lives.