Skip to content
es-na-battlesnakePublic

About

Team snakes

Topics

Resources

Code of conduct

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

ES NA Battlesnakes Deploy CodeQL

Battlesnakes created by a small team of GitHub Enterprise Support Engineers as a learning and team-building exercise.

Adding snakes

  1. Add snake directory within snakes
  2. Make new program config in supervisord.conf choosing a new port. Currently we have snakes in two languages (Ruby and Go)
    • Ruby snakes run on ports 4567+
    • Go snakes run on 8080+

Running snakes

Codespaces

  1. Run script/server to launch all snakes
  2. Make port public as needed to access from outside

Docker

  1. docker build -t battlesnake .
  2. docker run -p 4567:4567 -d battlesnake

Testing snakes

Beyond language and snake-specific testing, we also run simulated games to get quick feedback on how snakes are performing.

Running Simulations

Option 1: Local Development (Simplest - No Docker)

# Direct process execution - fastest iteration
./script/run_local_sim 5 wrapped

Requires: 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 wrapped

Requires: 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

Continuous Improvement

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:

Infrastructure

Development environment:

Deployment environment:

CI/CD:

Deployment 🚀

To deploy a change to this repository, follow the general process laid out below:

  1. Create a new branch and pull request with your changes
  2. Observe CI to ensure it is passing
  3. Get an approval from from the required codeowners
  4. Run .deploy on your pull request to deploy your changes to production
  5. If you branch deployment completes successfully, merge your pull request!

To roll back a deployment to the last main version, run .deploy main.

About

Team snakes

Topics

Resources

Code of conduct

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages