pycolab game engine.
A highly-customisable gridworld game engine with some batteries included. Make your own gridworld games to test reinforcement learning agents!
Play some games!
If you're new, why not try playing some games first? For the full colour experience on most UNIX-compatible systems:
- crack open a nice, new, modern terminal (iterm2 on Mac, gnome-terminal or xterm on linux). (Avoid screen/tmux for now---just the terminal, please.)
- set the terminal type to
xterm-256color(usually, you do this by typing
export TERM=xterm-256colorat the command prompt).
- run the example games! One easy way is to cd to just above the
pycolab/library directory (that is, cd to the root directory of the git repository or the distribution tarball, if you're using either of those) and run python with the appropriate
PYTHONPATHenvironment variable. Example command line for
PYTHONPATH=. python -B pycolab/examples/scrolly_maze.py.
Okay, install some dependencies first.
If that didn't work, you may need to obtain the following software packages that pycolab depends on:
- Python 2.7, or Python 3.4 and up. We've had success with 2.7.6, 3.4.3, and 3.6.3; other versions may work.
- Numpy. Our version is 1.13.3, but 1.9 seems to have the necessary features.
- Scipy, but only for running one of the examples. We have 0.13.3.
pycolab is extensively documented and commented, so the best ways to understand how to use it are:
- check out examples in the
- read docstrings in the
For docstring reading, the best order is probably this one---stopping whenever you like (the docs aren't going anywhere...):
- the docstring for the
- the docstrings for the classes in
Those two are probably the only bits of "required" reading in order to get an
idea of what's going on in
examples/. From there, the following reading may be
plot.py: how do game components talk to one another---and how do I give the agent rewards and terminate episodes?
human_ui.py: how can I try my game out myself?
MazeWalker, a pixel that can walk around but not through walls and obstacles.
Drapethat works in tandem with
MazeWalkerto construct a scrolling top-down maze world.
Gluttons for documentation punishment may want to read
protocols/scrolling.py: how game components talk to one another about scrolling in particular.
Don't forget that you can always read the tests, too. These can help demonstrate by example what all the various components do.
This is not an official Google product.
We just thought you should know that.