Skip to content

nclundell/battleships

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Battleships Project: JTerm 2015

###Goals:

  1. 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
====================== ###Players: #####Computer Players:
  1. Dumb Player [dumb]
    • Places ships and shoots to opponent board in predefined patterns that never change.
  2. Probability Player [prob]
    • Places ships and shoots to opponent board based on probabilities calculated for each spot on the board.
  3. Farnsworth Player [farns]

#####Additional Players: Additional players can be added via the following steps:

  1. Add a new folder [name] into the players folder.
  2. 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.
  3. Add [name]_placer.py and [name]_shooter.py to import list at top of battleships.py
  4. Add relevant code to instantiation sections of battleships.py
  5. Add [name] to list of players in b_globals.py

About

Battleships Project: JTerm 2015

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages