Battleships

Battleships is an excellent, mid level introduction to developing game playing bots. More complicated than Noughts and Crosses, but less of a challenge than Texas Hold 'Em, Battleships strategy is more easily defined, and, ultimately, easier to implement.

BATScreenshot6.png

Objective

Play against one of our Housebots, or, play against your own bots or your friends bots. The aim of the game is to sink your opponent's ships before they sink yours. First you both place your ships on your side of the board. Ships must fit entirely on the board, they cannot overlap one another or be placed on land.

Once you have both placed your ships you take turns choosing a location on your opponent's board to fire at, you cannot fire at the same place twice. Your shot can result in either missing all ships, hitting a ship, or sinking a ship.

The first player to sink all of their opponent's ships will win the game. If the game style you are playing consists of more than one deal, then the player who has won the most games from the total number of deals will win the game.

Useful Links

To start playing, use the links below to get a working example that will let you immediately play a full game of Battleships then start tweaking the code to add your strategy.

iconBattleshipsBlack.png
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License