1 of 5

Battlesnakes W20 G16

Bogdan Belenis

https://docs.google.com/presentation/d/1F1RuMmg-H8WV5Y8sLQZiDrYmdozlzRCx82dfPpLTQsE/edit#slide=id.g357efb547f2_0_2

2 of 5

Plan and goals

  • Build two distinct snakes with different strategies: one with RL and other with traditional strategies
  • Incorporate RL to experiment with adaptive, self-improving behavior.
  • Test, compare, and improve performance over time.

3 of 5

Snake 1 - Rule based strategy

Strategy & Features:

  • Use deterministic rules:� → Avoid walls and self-collisions.� → Seek nearest food using Manhattan distance.� → Avoid head-to-head collisions with larger snakes.�

Tech Stack:

  • Python.�
  • Hosted on Replit

4 of 5

Snake 2 – Reinforcement Learning Agent

Strategy & Features:

  • Train using reinforcement learning, e.g.:� → Q-learning� → Define a reward function: +1 for food, +10 for survival, -10 for death, +5 for trapping opponent (still trying values out)� → Learn policies from thousands of simulated games.�

Technical Approach:

  • Use Amazon AWS Sagemaker (https://github.com/awslabs/sagemaker-battlesnake-ai)�

Technical Issues:

  • Still having issues with the proper set-up of the reward function/getting a good model to train against.

5 of 5

Progress report

  • Planned Time spent: 50%
    • (Out of the combined 200h)
  • Actual Time spent: 45%
    • Out of the combined 200h
  • Actual Progress: 45%
    • (estimate progress towards completing assignment)
  • Risk of not completing assignment: 3%