[ANNOUNCEMENT] Release Flatland 2.0


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.

Whats New

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 1/2 needs 2 time steps to move to the next cell.
    • Fast Passenger Train: Speed 1
    • Slow Commuter Train: Speed 1/2
    • Fast Freight Train: Speed 1/3
    • Slow Freight Train: Speed 1/4
  • 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_rail_generator and 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 info returned 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 info returned by 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.

Submission scoring

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


1 Like

Could you please update the hypertext links? It seems to me that they are not working.

Is the Flatland 2.0 software still compatible with the Round 1 task (for our internal development purposes)?

hi @jonsafari

Yes you can still make the round 1 task by setting the stochastic probability to 0 and not setting any specific velocity (This will result in speed of all trains to be 1.)

You can also still use the complex_rail_generator and complex_schedule_generator which will produce Round 1 tasks.

Best regards,

1 Like


Thanks for pointing this out. I updated the links now :slight_smile: