pycolab
game engine.A highly-customisable gridworld game engine with some batteries included. Make your own gridworld games to test reinforcement learning agents!
If you're new, why not try playing some games first? For the full colour experience on most UNIX-compatible systems:
xterm-256color
(usually, you do this by typing
export TERM=xterm-256color
at the command prompt).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 PYTHONPATH
environment variable. Example
command line for bash
-like shells:
PYTHONPATH=. python -B pycolab/examples/scrolly_maze.py
.If that didn't work, you may need to obtain the following software packages that pycolab depends on:
pycolab is extensively documented and commented, so the best ways to understand how to use it are:
examples/
subdirectory,.py
files.For docstring reading, the best order is probably this one---stopping whenever you like (the docs aren't going anywhere...):
Engine
class in engine.py
things.py
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
of interest:
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?prefab_parts/sprites.py
: useful Sprite
subclasses, including
MazeWalker
, a pixel that can walk around but not through walls and
obstacles.cropping.py
: how can I generate the illusion of top-down scrolling by
cleverly cropping an observation around a particular moving game element?
(This is a common way to build partial observability into a game.)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.