/bs

a really bad snake AI implementation written for the uvic battlesnake comp. The last commit is particularly bad, but it worked decently well.

Primary LanguagePython

bs

This AI client uses the bottle web framework for route management and response building, and the gunicorn web server for running bottle on Heroku.

Dependencies are listed in requirements.txt.

Deploy

Running the AI locally

Clone this repo

Create new virtualenv (using virtualenvwrapper) and install dependencies:

> mkvirtualenv battlesnake-python
> workon battlesnake-python
> pip install -r requirements.txt

Run the server locally:

> ./run
Bottle v0.12.8 server starting up (using WSGIRefServer())...
Listening on http://localhost:8080/
Hit Ctrl-C to quit.

Test client in your browser: http://localhost:8080

Deploying to Heroku

Create a new Heroku app:

heroku create [APP_NAME]

Push code to Heroku servers:

git push heroku master

Open Heroku app in browser.

heroku open

Or go directly to: http://APP_NAME.herokuapp.com

You can also view liveserver logs with the heroku logs command:

heroku logs --tail