Battlesnakes created by a small team of GitHub Enterprise Support Engineers as a learning and team-building exercise.
- Add snake directory within
snakes - Make new program config in
supervisord.confchoosing a new port. Currently we have snakes in two languages (Ruby and Go)- Ruby snakes run on ports 4567+
- Go snakes run on 8080+
- Run
script/serverto launch all snakes - Make port public as needed to access from outside
docker build -t battlesnake .docker run -p 4567:4567 -d battlesnake
Beyond language and snake-specific testing, we also run simulated games to get quick feedback on how snakes are performing.
Option 1: Local Development (Simplest - No Docker)
# Direct process execution - fastest iteration
./script/run_local_sim 5 wrappedRequires: Ruby, Go, battlesnake CLI installed locally. See Simulation Environment Guide.
Option 2: Docker-based (Matches CI)
# Full Docker setup - matches production
./script/continuous_improve --runs 20
# Quick Docker test
./script/quick_sim 10 wrappedRequires: Docker installed and running.
Option 3: GitHub Actions (Automated)
- Workflow runs every 6 hours automatically
- Manual trigger available in Actions tab
- Results posted to tracking issue
The repository includes automated tools for continuous snake improvement:
- Automated Workflow: Runs simulations every 6 hours via GitHub Actions
- Local Testing: Multiple options for quick iteration (see above)
- Performance Tracking: Results stored and tracked via GitHub Issues
📚 Documentation:
Development environment:
Deployment environment:
- Azure Container Instances
- Azure Traffic Manager
- Azure Log Analytics
CI/CD:
To deploy a change to this repository, follow the general process laid out below:
- Create a new branch and pull request with your changes
- Observe CI to ensure it is passing
- Get an approval from from the required codeowners
- Run
.deployon your pull request to deploy your changes to production - If you branch deployment completes successfully, merge your pull request!
To roll back a deployment to the last main version, run .deploy main.