###Goals:
- Simulate Battleship games using artificially intelligent players.
=================== ###Run Battleships: Run Battleships with the following cli command:
python battleships.py [p1_name] [p2_name] [rounds (optional)]
For example, if you wanted to run the Dumb player against the Genetic player for 75 rounds:
python battleships.py dumb genetic 75
Note: Battleships requires Python >= 3.4
====================== ###Defaults:
- Rounds: 50
- Placer: dumb
- Shooter: dumb
- Board Size: 10
- Ship List: Carrier, Battleship, Submarine, Destroyer, Cruiser
-
Dumb Player [dumb]
- Places ships and shoots to opponent board in predefined patterns that never change.
-
Probability Player [prob]
- Places ships and shoots to opponent board based on probabilities calculated for each spot on the board.
-
Farnsworth Player [farns]
- Uses tree-based searching of "heat map" states to get next shots.
- Based on Nate Kohl's "Farnsworth Opponent": http://natekohl.net/files/FarnsworthOpponent.cs
#####Additional Players: Additional players can be added via the following steps:
- Add a new folder [name] into the players folder.
-
Add [name]_placer.py and [name]_shooter.py files into your new folder.
- Default placer or shooter will be used if a file is missing or misnamed.
- Add [name]_placer.py and [name]_shooter.py to import list at top of battleships.py
- Add relevant code to instantiation sections of battleships.py
- Add [name] to list of players in b_globals.py