Following are three short tutorials to help new users get acquainted with how to create RailEnvs, how to train simple DQN agents on them, and how to customize them.
Following are three short tutorials to help new users get acquainted with how
to create RailEnvs, how to train simple DQN agents on them, and how to customize
them.
To use flatland in a project:
To use flatland in a project:
...
@@ -17,6 +19,83 @@ To use flatland in a project:
...
@@ -17,6 +19,83 @@ To use flatland in a project:
Part 1 : Basic Usage
Part 1 : Basic Usage
--------------
--------------
The basic usage of RailEnv environments consists in creating a RailEnv object
endowed with a rail generator, that generates new rail networks on each reset,
and an observation generator object, that is supplied with environment-specific
information at each time step and provides a suitable observation vector to the
agents.
The simplest rail generators are envs.generators.rail_from_manual_specifications_generator
and envs.generators.random_rail_generator.
The first one accepts a list of lists whose each element is a 2-tuple, whose
entries represent the 'cell_type' (see core.transitions.RailEnvTransitions) and
the desired clockwise rotation of the cell contents (0, 90, 180 or 270 degrees).