Skip to main content

Gym interface for pycolab games.

Project description

Gym PyColab

gym interface for pycolab games.

Extraterrestrial Marauders

Extraterrestrial Marauders

$ pip install gym-pycolab



Inherit from gym_pycolab.PyColabEnv to make a gym.Env version. Also see for more examples.

import gym_pycolab
from gym import spaces

class MyGameEnv(gym_pycolab.PyColabEnv):
    """A pycolab game env."""

    def __init__(self,
        super(MyGameEnv, self).__init__(

    def make_game(self):
        return my_game

    def make_colors(self):
        return {'#': (0, 0, 255)}

env = MyGameEnv()
state = env.reset()
state, reward, done, info = env.step(0)

Games and Envs

Includes most of the pycolab example games (with gym.make(game) or gym_pycolab.{game}Env(...)):

Running an Example

Rendering the ExtraterrestrialMarauders-v0 with random actions:

$ python -m gym_pycolab.pycolab_games --game extraterrestrial_marauders


Development is started with pipenv.

$ pipenv install
$ pipenv shell


$ python -m gym_pycolab.pycolab_env_test

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for gym-pycolab, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size gym-pycolab-1.0.0.tar.gz (6.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page