The first possible strategy for building a computer opponent is to make shots totally at random.Īs expected, the results of firing random volleys produces very poor results. The first player to sink his opponent’s fleet (hitting every location covered with part of a boat) wins the game. In these diagrams, misses are depicted by grey crosses and hits by red squares with grey crosses. We’ll start with a description of the simplified method of play:Īfter each player has hidden his fleet, players alternate taking shots at each other by specifying the coordinates of the target location.Īfter each shot, the opponent responds with either a call HIT! or MISS! indicating whether the target coordinates have hit part of a boat, or open water.Īn example of a game in progress is show on the left. Of length 5, but actually it could be the sinking of a battleship of length 4, and part of a cruiser of length 3) If there are five ‘hits’ in a row, a naive player might consider this to be the successful destruction of an aircraft carrier (In fact, some players consider this a strategy to confuse an opponent by obfuscating the true layout of ships. Note: even though ships cannot overlap, there is nothing in the rules to say they cannot touch. The exact types and number of ships varies by rule, but for this posting, I’m using ships of lengths: 5, 4, 3, 3, 2 (which results in 17 possible targets out of the total of 100 squares).Ī couple of example layouts are shown below: Players ’hide’ ships of mixed length horizontally or vertically (not diagonally) without any overlaps.
![battle ship simulator battle ship simulator](https://i.ytimg.com/vi/crQfvGxi-54/maxresdefault.jpg)
(See early postings for analysis of Chutes & Ladders,īattleship is a classic two person game, originally played with pen and paper. I’m going to continue my analysis of classic card and board games by looking at the game of Battleship.