Skip to content

Stannislav/battleships

 
 

Repository files navigation

battleships

Framework for running Python battleships AIs

Getting Started

  1. Ensure you have python2, pip, and virtualenv installed.
  2. Update config to match the live server address.
  nano config
  1. Run the setup script.
  ./setup
  1. Run a local server.
  ./run-server
  1. Open your server's webpage.
  open http://localhost:8080
  1. Make a copy of the demo code
  cp demo.py myentry.py
  1. Update the TEAM_NAME variable in your entry. It should be something unique.
  2. Modify you entry until it works as you like. Testing the entry by submitting it to your local server.
  ./submit myentry.py
  1. When you're ready, submit your entry to the live server.
  ./submit live myentry.py

You can resubmit as many times as you like and your entry will compete with all other entries submitted. Once everyone has finished the scores will be cleared and every entry will play every other entry.

We recommend you write unit tests for your AI (example in ```demo_tests.py``` - run with ```./run-tests```) but since you won't - change ```config``` and set GAMES_TO_RUN to 1 and OVERRIDE to 1. This will allow you to re-submit your AI to the local server and have it play only a single game. This will make it easier to parse your print statements/etc.

About

Framework for running Python battleships AIs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 85.4%
  • Python 13.0%
  • Other 1.6%