Bomberjam is an artificial intelligence programming challenge.

Write your bot using one of six languages (C#, Go, Java, JavaScript, Python and PHP) and fight against other players to reach the first place in the leaderboard.

Download the starter kit from GitHub
(You need to be signed into GitHub to download the build artifacts)

May the best bot win!

Players control a bot using the programming language of their choice. Four bots fight in a 2D grid. The bot with the highest score wins. One player can get points by destroying blocks, hitting another player and being the last player alive.

  1. Sign in with your GitHub account
  2. Download the latest starter kit on GitHub
  3. Learn the game mechanics and write your bot
  4. Upload your bot source code as a single zip file
  5. We will compile your bot and tell you if something went wrong
  6. We will periodically schedule games and update your score

Get started

bomberjam.zip
├── engine/bomberjam.exe (Windows)
├── engine/bomberjam (Linux & MacOS)
│
└── starters/
  ├─ CSharp/MyBot.csproj [...]
  ├─ Go/MyBot.go [...]
  ├─ Java/MyBot.java [...]
  ├─ JavaScript/MyBot.js [...]
  └─ PHP/MyBot.php [...]
  └─ Python3/MyBot.py [...]

The engine/ folder contains the game engine for the OS of your choice. Each starter contains a MyBot.* entrypoint file that must not be renamed.

For each starter, you will also find a run_game.bat and run_game.sh files that allows you to simulate a game. These scripts look like this:

> bomberjam.exe --output replay.json "dotnet MyBot.dll" "java MyBot" "node MyBot.js" "python MyBot.py"

An install.sh script may be included to install build dependencies suchs as Node.js packages.

The game engine spawns a process for each bot and communicates with them over standard input and standard output.

Each tick (turn), your bot will receive the current state of the game over standard input. Standard output must be used to send the action (move, plant a bomb or do nothing) within one second.

Use the online viewer to visualize the game from the generated JSON file.

How it works

We use Ubuntu 20.04 Docker containers to compile / package your bot as well as running the games. It means that your code must be compatible with Ubuntu 20.04. The container comes with .NET 5, .NET Core 3.1, Go 1.16.3, Node.js 12, Java 8, Python 3.8 and PHP 8.0 pre-installed.

When you submit a bot, we try to recognize its language using the MyBot.* entrypoint file. This is why this file cannot be renamed. Once the language is recognized, the packaging phase begins. During this phase, you'll have access to internet.

  • Any install.sh script is executed
  • C# and Java code is compiled
  • A run.sh script is created, containing the command to run your bot, such as python3 MyBot.py
  • Everything is zipped and stored for later use

When a game is scheduled, our servers will download and unzip the packaged bots. Internet and any network access are unavailable during the game. The game engine will spawn a process for each bot, using the run.sh script created during the packaging phase. Each bot process is contained in an isolated environment with limited CPU and memory (1GB) so one bot cannot interfere with another.