This is a Snake entry for the BattleSnake programming competition in Victoria BC, written in Python.
Forked from the Python starter snake provided by sendwithus.
This AI client uses the bottle web framework to serve requests and the gunicorn web server for running bottle on Heroku. Dependencies are listed in requirements.txt.
2018/02/17 - Will get an optimal direction from a* for the given target, and then look ahead at that move and the other possible moves to evaluate which is best. It also now tracks the length of other snakes and will eat to try to be largest. Now will properly prioritize head neighbor locations of snakes that are smaller than it when it is near so it can try to eat them. Working on agressive hunting behaviour when it is the largest snake.
2018/02/13 - Switches between following own tail to kill time if health is above threshold and seeking nearest food if health is below threshold.
2018/02/13 - Will seek closest food. Generally will avoid snake bodies and outer wall on each move.
2018/02/10 - Currently runs in a circle. No pathfinding or avoidance behaviour.
-
Clone repo to your development environment:
git clone git@github.com:username/battlesnake-python.git
- Install dependencies using pip:
pip install -r requirements.txt
- Run local server:
python app/main.py
- Test client in your browser: http://localhost:8080.
- Create a new Heroku app:
heroku create [APP_NAME]
- Deploy code to Heroku servers:
git push heroku master
- Open Heroku app in browser:
heroku open
or visit http://APP_NAME.herokuapp.com.
- View server logs with the
heroku logs
command:
heroku logs --tail
Contact me tyrel.hiebert@gmail.com or contact sendwithus battlesnake@sendwithus.com, @send_with_us.