DNDS
Search…
💭
FAQ

🎮 Game Environment

  • What happens if my Agent makes an invalid move?
    If you 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.
    You will not be penalized for invalid moves (standing still and doing nothing is enough of a penalty given the pace of the game!).
  • The game keeps hanging when my Agent code hits errors
    Try using ⌘+C (Mac) or CTRL+C (Windows) in the terminal to end the game early.
    Use --watch mode when editing your Agent script. This will allow you to edit your code and see the results in the game in real-time.
  • 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)?
    The game runs at 10Hz (i.e. agents are polled for a move once every 0.1s). So a situation where there is a competition for the same resource is only possible if two agents compute at the same clock speed. Note also that due to agents running in separate processes, there is extra slicing of CPU time and context switching delays introduced by the OS. This makes the order of commands less predictable and competing conditions less likely.
    In the event that it does happen - the order of execution of agent commands in the game tick is random.
  • Why is my agent able to walk through exploding bombs unharmed?
    Players are damaged by exploding bombs only on the turn/game tick that the bombs explode on. Visually, this means that players may be seen walking through explosion plumes without being harmed.
  • Is there a simple way to run the game one step at a time?
    There is currently no simple way to do this at the moment 😢
  • How do I change the default settings for the game environment?
    On the first run the game will generate default config file config.json and store in the OS-specific configuration directory.
    Default config looks like this:
    1
    {
    2
    "headless": false,
    3
    "interactive": false,
    4
    "start_paused": true,
    5
    "wait_end": 5,
    6
    "max_iterations": 3000,
    7
    "tick_step": 0.10
    8
    }
    9
    ​
    Copied!
    Config notes
    In your local development environment you have access to all config options, such as number of iteration the game runs (max_iterations) or game update time step (tick_step). However, this options are fixed in the tournament and cannot be modified so please don't rely on this values.
  • Where are the game files located? Can I modify them?
    If you have installed the Game Environment via the pip install recommended method, the game files (e.g. config.json, game.py etc) will be located in the OS-specific configuration directory.
    If using a virtual environment, the path might look something like this: venv/lib/<python-version>/site_packages/coderone/
    This is your local installation so feel free to modify it if you wish.

🛠️ Known Errors/Issues

  • The game_state my agent receives is not up-to-date
    You might experience a limitation in the rate of update between your Agent and the game environment. I.e. you may send an action at tick_number = 1, but your agent does not receive the updated game_state until tick_number = 2.
    To resolve this, check out the topic '🎲 Checking whether the game state has been updated' in the tips and tricks section
  • I get an invalid pointer error
    The Python library used for graphics has some known issues. If you experience a game crash with an error like:
    1
    munmap_chunk(): invalid pointer
    2
    Aborted (core dumped)
    Copied!
    Add the following option to your config.json (saved in your OS-specific configuration directory):
    1
    "no_text": false,
    Copied!
    This options disables all texts in the game which resolves library crashes.

⏬ Installation

  • I get errors during installation related to missing pymunk packages
    This is due to a new pymunk package release and has been fixed in the provided game release. If you are still seeing this issue, please make sure you have followed the setup instructions.
    If you are still facing issues, please try the following:
    1
    pip install pymunk==5.7.0
    Copied!
  • I get the following error: RuntimeError: The current Numpy installation <...> fails to pass a sanity check due to a bug in the windows runtime.
    Try the following solution:
    1
    **pip install numpy==1.19.3**
    Copied!
Last modified 2mo ago