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

The Juice

Ford’s Big Gamble

It’s completely transforming America’s best-selling vehicle.

Should the United States Grant Asylum to Victims of Domestic Violence?

The Apple Watch Will Make Everyone Around You Just a Little Worse Off

This Was the First Object Ever Designed

Don’t Expect Adrian Peterson to Go to Prison

In much of America, beating your kids is perfectly legal. 

Moneybox

How the Apple Watch Will Annoy Us

A glowing screen attached to someone else’s wrist is shinier than all but the blingiest jewels.

Music

A Little Bit Softer Now, a Little Bit Softer Now …

The sad, gradual decline of the fade-out in popular music.

Is Everyone Going to Declare Independence if Scotland Does It? 

I Tried to Write an Honest Profile of One of Bollywood’s Biggest Stars. It Didn’t Go Well.

Trending News Channel
Sept. 12 2014 11:26 AM Identical Twins Aren’t Really Identical
  News & Politics
Politics
Sept. 12 2014 7:24 PM Come and Take It Libertarians fight for people whose property was seized by the police.
  Business
Moneybox
Sept. 12 2014 5:54 PM Olive Garden Has Been Committing a Culinary Crime Against Humanity
  Life
Outward
Sept. 12 2014 3:32 PM Yes, Those Straight Guys Who Wed for Rugby Tickets Are Mocking Marriage. What’s New?
  Double X
The XX Factor
Sept. 12 2014 4:05 PM Life as an NFL Wife: “He's the Star. Keep Him Happy.”
  Slate Plus
Behind the Scenes
Sept. 12 2014 5:55 PM “Do You Know What Porn Is?” Conversations with Dahlia Lithwick’s 11-year-old son.
  Arts
Brow Beat
Sept. 14 2014 7:10 PM Watch Michael Winslow Perform Every Part of “Whole Lotta Love” With Just His Voice
  Technology
Future Tense
Sept. 12 2014 3:53 PM We Need to Pass Legislation on Artificial Intelligence Early and Often
  Health & Science
New Scientist
Sept. 14 2014 8:38 AM Scientific Misconduct Should Be a Crime It’s as bad as fraud or theft, only potentially more dangerous.
  Sports
Sports Nut
Sept. 12 2014 4:36 PM “There’s No Tolerance for That” Pete Carroll and Jim Harbaugh say they don’t abide domestic abuse. So why do the Seahawks and 49ers have a combined six players accused of violence against women?