Flatland 2.0 Release
The new version of Flatland Rail Environment is finally here. You can install it through
pip install -U flatland-rl
There are many changes under the hood so make sure to familiarize yourself with the new repository before updating your code and starting a first submission.
Flatland is evolving to reflect trasportation systems challenges more realisticly. Therefore, two major constraints from real-world transportation systems where added and the railway network layout was moved closer to real network layouts. Here are the major changes:
Multi-Speed: Agents now travel at different speeds. For the scoring we will only be using 4 different speed levels. Speeds are represented in fractions and indication what fraction of a cell an agent can move at any time step. For example an agent with speed
2time steps to move to the next cell.
- Fast Passenger Train: Speed
- Slow Commuter Train: Speed
- Fast Freight Train: Speed
- Slow Freight Train: Speed
- Fast Passenger Train: Speed
- Stochastic Events: There are stochastic events introduced through a poisson point process which stop agents at random intervalls for varying durations. These stops simulate different incidents in railway networks such as delays and malfunctions. They are one of the main reasons why re-scheduling needs to be done in real time to keep traffic flowing without generating major delays.
Sparse Railway Network: The number of available ressources (cells with rails) has been reduced in this version with the new
sparse_schedule_generator. This reflects the density of traffic on railway networks and increases the difficulty of planning ahead.
- Schedule/Rail Generators: We updated the way levels are generated and seperated the tasks into generating the rail (rail_generator) and the schedule/tasks for agents (schedule_generator). You can find all relevant information here.
What this means for you
The changes will affect the way your controller has to interact with the environment. Make sure the take the following into account:
- Your controller needs to monitor the state of the network during the roll out of each episode.
- Agents can only make decisions upon cell entry (Fraction position smaller than
epsilon), thus your controller only needs to decide for agents who are entering a new cell. What agents need to take an action in the next steps are indicated in the
inforeturned by the
step()function. More info here.
- If you use RL agents make sure the include the correct states and actions. This is not handled automatically by the env as we want to provide full information. See here
- Agents that are broken will signal this and provide information about malfunction duration (also in the
step()). These agents resume travel once they are fixed automatically.
- Important: The new more complex levels and the introduction of multi-speed and stochasticity mean that we can no longer guarantee feasibility of each instance. Your aim is still to get as many trains as possible to their final destination.
We are currently working on improvements of the
sparse_rail_generator() in order to finalize the scoring function for the next round. This means that submissions will start soon and there will be another announcement and an update on the Flatland landing page.
Submission format will be very similar to Round 1, you can assume the following constraints for the submission scoring:
- Stochastic Events: Only a small fraction of agents will be affected by malfunctions (~10%)
Level dimension: The level dimensions will be very simlilar to Round 1.
(x_dim, y_dim) <= (200,200)
- Multi Speed: The different speeds will be as stated above.
Have fun with this new Flatland version!
The Flatland Team