FAQ

๐Ÿ› ๏ธ Troubleshooting

If you experience any errors/issues, please check if a solution has already been documented before. If not, please report them in our #๐Ÿ›-bug-reports channel or raise an issue on our public repo here.

docker-compose runs old containers and services

You will need to rebuild and restart your containers. Try:

docker-compose down
docker-compose build
docker-compose up --abort-on-container-exit

`docker.errors.DockerException: Error while fetching server API version: {'Connection Aborted.', ConnectionRefusedError(61, 'Connection refused'))`

The Docker CLI is unable to reach the Docker Daemon. Try checking that your Docker is up and running.

ERROR: The Compose file './docker-compose.yml' is invalid because: Unsupported config option for services.agent-b: 'extends'

This might be because you are using an older version of docker-compose which does not support the keyword extends. You will need to update docker-compose to version 1.27+. More info on the issue here and info on how to upgrade here.

The game_state my agent receives is not up-to-date

You might experience a difference in the rate of update between your Agent and the game environment. I.e. you may send an action at tick_number = 1, but the game_state does not update with this action until tick_number = 2.

throw new Error("No agents were instantiated probably due to invalid world configuration")

This is likely because you are using a WORLD_SEED that is invalid (i.e. game is trying to generate a map that breaks some pre-defined rules). Try using another WORLD_SEED. Examples of broken WORLD_SEED's include 5555 and 9999.

๐Ÿ’ฅGeneral

How do I change what agents are playing?

You can connect a second agent or switch out any connected agent by changing the services agent-a and agent-b in the docker-compose.yml file provided in the starter kits.

By default, agent-a is commented out. Un-comment this block to connect a second version of your agent to the game server.

base-compose.yml contains some default services that you can switch out either agent-a or agent-b for (e.g. for fwd model agents). If you want to create your own, you will need to create your own Dockerfile (more docs on this here).

You may need to re-build the image after editing base-compose.yml. I.e. run:docker-compose up --abort-on-container-exit --build

agent-a:
extends:
file: base-compose.yml
# update next line with a service in base-compose.yml to change agent
service: python3-agent-dev # e.g. change to 'python3-agent' to test production build
environment:
- GAME_CONNECTION_STRING=ws://game-server:3000/?role=agent&agentId=agentA&name=python3-agent
- FWD_MODEL_CONNECTION_STRING=ws://fwd-server-a:6969/?role=admin
depends_on:
- game-server
- fwd-server-a
networks:
- coderone-tournament

How do I use other programming languages?

You will need to create your own starter kit (you can use the Python and TypeScript versions as references) and ensure your agent's packets to the game server conform with the JSON schema under ValidAgentPacketdescribed in:

If you have any issues, please reach out on Discord.

What resources will be available for my agent during tournament and scrim matches?

It will be safe to assume the following default runtime resources will be available:

--cpus=2
--cpu-period=100000
--memory=1024m

See the Docker documentation here for a more verbose explanation of the above values:

How do I replay a game?

Download your JSON replay file and upload it here.

Can I access the game server outside of Docker?

Yes, we can provide you with the game server binary upon request. Reach out to @ModMail on Discord.

How can I suppress the game logs sent by the server?

You can suppress some of the logs (e.g. tick counting) by setting the flag TELEMETRY_ENABLED to 0 (more info on changing environment flags here).

You can also configure your docker-compose file to log server output (documentation here).

What do the labels fwd in the docker-compose files refer to?

This refers to the forward model and forward agent starter kit. More information available here.

What do the labels dev in the docker-compose files refer to?

Servers labelled dev mount your host volume to the container. When changes are made to your agent, they will be reflected once you restart the agent container, without needing to rebuild the image. Servers without the dev label are best for testing your production/submission-ready build.

Is there an easy way to restart the game without having to exit and rebuild the containers?

You can add a restart policy to the game-server service in docker-compose (docs here). Alternatively, you can run the game using docker-compose up --abort-on-container-exit so that you will not need to exit the containers before restarting them.

๐ŸŽฎ Game Environment

What happens if my Agent makes an invalid move?

If your Agent tries to make an invalid move (e.g. moving outside the boundary of the map, placing bombs when you have no ammo, trying to move onto a tile with a block etc.), the game environment will reject that action and your Agent will do nothing instead.

If both Agents try and occupy the same spot (or explode the same block), which Agent ends up in the spot (or takes the points) on the same tick?

Actions are processed in the order that the agent packets are received, even if they occur within the same tick. Therefore, a situation where there is a competition for the same resource is only possible if two agents send actions at the exact same time, which is impossible (or at least very, very unlikely).

Why is my agent able to walk through blasts unharmed?

Agents have an invulnerability period lasting 5 ticks after they lose 1 HP. Walking through a blast or fire during this time will not incur any further damage.

Is there a simple way to run the game one step at a time?

Yes, check out the administrator feature here.

Can I change the tick rate, starting variables etc?

Yes, check the documentation here.

In what order does the game server resolve events?

The game server will resolve events in the following order:

  1. Resolve all placements

  2. Resolve all detonations

  3. Resolve all agent movements (up/down/left/right)

Is there a list of all the keys and values accessible from game_state?

Yes, the most up-to-date and best source of truth will be the validation scheme (link).

Contents
๐Ÿ› ๏ธ Troubleshooting
docker-compose runs old containers and services
`docker.errors.DockerException: Error while fetching server API version: {'Connection Aborted.', ConnectionRefusedError(61, 'Connection refused'))`
ERROR: The Compose file './docker-compose.yml' is invalid because: Unsupported config option for services.agent-b: 'extends'
The game_state my agent receives is not up-to-date
throw new Error("No agents were instantiated probably due to invalid world configuration")
๐Ÿ’ฅGeneral
How do I change what agents are playing?
How do I use other programming languages?
What resources will be available for my agent during tournament and scrim matches?
How do I replay a game?
Can I access the game server outside of Docker?
How can I suppress the game logs sent by the server?
What do the labels fwd in the docker-compose files refer to?
What do the labels dev in the docker-compose files refer to?
Is there an easy way to restart the game without having to exit and rebuild the containers?
๐ŸŽฎ Game Environment
What happens if my Agent makes an invalid move?
If both Agents try and occupy the same spot (or explode the same block), which Agent ends up in the spot (or takes the points) on the same tick?
Why is my agent able to walk through blasts unharmed?
Is there a simple way to run the game one step at a time?
Can I change the tick rate, starting variables etc?
In what order does the game server resolve events?
Is there a list of all the keys and values accessible from game_state?