Links

Quick Start Guide

A guide to setting up, developing, and submitting an agent.

Step 1: Clone the Repo

The Bomberland repo contains starter kits with examples on how to build your agent.
To clone:
gh repo clone CoderOneHQ/bomberland
Or download from:
You'll also need the base-compose.yml and docker-compose.yml files in the root folder.

Step 2: Install Docker

Step 3: Start the game server

Make sure Docker is running. From the root directory of your starter kit (where base-compose.yml and docker-compose.yml are located), run in your terminal:
docker-compose up --abort-on-container-exit --force-recreate
It may take a few minutes to run the first time.
This will build the game server, and connect your starter agent. Since Bomberland is a 2-player environment, the game server will wait for a second agent to connect before starting.

Step 4: Join the game as a human player

In either a Firefox or Chrome browser, open the game client from:
You should see the following setup menu:
Select 'Agent' as your role, leave 'Agent Id' as agentA and click 'Connect'.
Use the following keys to play as the Wizard:
  • Click a unit to control it
  • / / / - arrows to move the unit
  • SPACE - place a bomb
  • Click a bomb to detonate it
If you got here without any errors - congratulations you're all set up! 🥳
Below are additional tips for developing your agent.

Step 5: Choose agents to connect

Specify agent-a and agent-b in docker-compose.yml to choose which agents to play against each other:
agent-b:
extends:
file: base-compose.yml
# update next line with a service in base-compose.yml to change agent
service: typescript-agent-dev
environment:
- GAME_CONNECTION_STRING=ws://game-server:3000/?role=agent&agentId=agentB&name=python3-agent
- FWD_MODEL_CONNECTION_STRING=ws://fwd-server-b:6969/?role=admin
depends_on:
- game-server
- fwd-server-b
networks:
- coderone-tournament
Add a --build flag in your docker-compose up command whenever you make a change to the docker-compose.yml or base-compose.yml files. i.e.: docker-compose up --abort-on-container-exit --force-recreate --build

Step 6: Change environment variables

Environment settings such as tick rate, map size, etc can be changed by adding them under environment in docker-compose.yml:
game-server:
extends:
file: base-compose.yml
service: game-server
ports:
- 3000:3000
environment:
- ADMIN_ROLE_ENABLED=0
- AGENT_ID_MAPPING=agentA,agentB
- INITIAL_AMMUNITION=3
- INITIAL_HP=3
- PRNG_SEED=1234
- SHUTDOWN_ON_GAME_END_ENABLED=1
- TELEMETRY_ENABLED=1
- TICK_RATE_HZ=10
- TRAINING_MODE_ENABLED=0
- WORLD_SEED=1234
networks:
- coderone-tournament
See ⚙️ Environment Flags for a full list of available settings.
Remember to add the --build flag!
docker-compose up --abort-on-container-exit --force-recreate --build

Step 7: Game state

On each game tick, your agent will receive a JSON packet containing environment state information, e.g.:
{
"agents": {
"a": {
"agent_id": "a",
"unit_ids": [
"c",
"e",
"g"
]
},
"b": {
"agent_id": "b",
"unit_ids": [
"d",
"f",
"h"
]
}
},
"unit_state": {
...
},
See 🎮 Game State Definitions for a list of all the information available to your agent.

Step 8: Submitting an agent

To submit your agent to the tournament server, you will need to push your Docker image to a public registry and upload your link to the Submissions page.