skip to navigation
skip to content

rgkit 0.4.1

Robot Game Testing Kit

Latest Version: 0.5.3

Please see this link for the instructions to the game.

Here are some excellent tools made by fellow players!

Robot Game was originally started by Brandon Hsiao.

Package Installation


The easiest way to install the kit is with pip. From the terminal, run:

pip install rgkit

Or if you want the development version:

pip install git+

Note: This will install rgkit system-wide. It is recommended to use virtualenv to manage development environments.


Installing with virtualenv requires the following steps:

mkdir my_robot
cd my_robot
virtualenv env
source env/bin/activate
pip install rgkit

You can also manually install directly from the source folder. Make a local copy of the git repository or download the source files. Then, using the terminal, run the following from the root directory of the source code:

python install

Note: This will install rgkit system-wide. It is recommended to use virtualenv to manage development environments.

Running the game

After installing the package, the script is executable from the command line (if you’re using virtualenv, remember to activate the environment). There are two entry points provided: rgrun and rgmap. The general usage of run is:

usage: rgrun [-h] [-m MAP] [-c COUNT] [-A] [-q] [-H | -T | -C]
             [--game-seed GAME_SEED]
             [--match-seeds [MATCH_SEEDS [MATCH_SEEDS ...]]] [-r]
             player1 player2

Robot game execution script.

positional arguments:
  player1               File containing first robot class definition.
  player2               File containing second robot class definition.

optional arguments:
  -h, --help            show this help message and exit
  -m MAP, --map MAP     User-specified map file.
  -c COUNT, --count COUNT
                        Game count, default: 1, multithreading if >1
  -A, --animate         Enable animations in rendering.
  -q, --quiet           Quiet execution.
                        -q : suppresses bot stdout
                        -qq: suppresses bot stdout and stderr
                        -qqq: supresses all rgkit and bot output
  -H, --headless        Disable rendering game output.
  -T, --play-in-thread  Separate GUI thread from robot move calculations.
  -C, --curses          Display game in command line using curses.
  --game-seed GAME_SEED
                        Appended with game countfor per-match seeds.
  --match-seeds [MATCH_SEEDS [MATCH_SEEDS ...]]
                        Used for random seed of the first matches in order.
  -r, --random          Bots spawn randomly instead of symmetrically.

So, from a directory containing, you can run a game against the default robot and suppress GUI output with the following command:

rgrun -H

Developing in the source directory:

rgkit is packaged as a module, so you can just checkout the module directory and import/run as usual.

|--- rgkit
|    |---
|    |---
|    |---
|    |--- ...
|    |---

Running the game

To run the game with the source configured this way, use the terminal and execute the following from the inner rgkit folder (i.e., in the same directory as

python /path/


Once installed, you should only need the rg module (which is itself optional) to develop your own robots. The package can be imported like any other module:

import rg

class Robot:
    def act(self):
        return ['guard']
File Type Py Version Uploaded on Size
rgkit-0.4.1.tar.gz (md5) Source 2014-06-16 24KB