Skip to content
Snippets Groups Projects
README.rst 4.69 KiB
Newer Older
spmohanty's avatar
spmohanty committed
========
Vaibhav Agrawal's avatar
Vaibhav Agrawal committed
Flatland
spmohanty's avatar
spmohanty committed
========



.. image:: https://gitlab.aicrowd.com/flatland/flatland/badges/master/pipeline.svg
     :target: https://gitlab.aicrowd.com/flatland/flatland/pipelines
     :alt: Test Running
.. image:: https://gitlab.aicrowd.com/flatland/flatland/badges/master/coverage.svg
     :target: https://gitlab.aicrowd.com/flatland/flatland/pipelines
maljx's avatar
maljx committed
     :alt: Test Coverage
Flatland is a toolkit for developing and comparing multi agent reinforcement learning algorithms on grids.
The base environment is a two-dimensional grid in which many agents can be placed. Each agent must solve one or more tasks in the grid world.
In general, agents can freely navigate from cell to cell. However, cell-to-cell navigation can be restricted by transition maps.
Each cell can hold an own transition map. By default the cell doesn't have any restriction of movement defined in its transition map. So the agent can freely move to any neighbor cell.
With other world the agent can move to all eight neighbour cells (go up and left, go up, go up and right, go right, go down and right, go down, go down and left, go left).

The general purpose of the implementation allows to write in very short time many different environments.
Flatland is designed to write environment for Epidemiology research, resource allocation task and planning task for transportation (operation research).
It can be used for many learning task where a two-dimensional grid could be the base of the environment.

Flatland delivers a python implementation which can be easily extended. And it provides different baselines for different environments.
Each environment enables an interesting task to solve. For example, the mutli-agent navigation task for railway train dispatching is a very exciting topic.
It can be easily extended or adapted to airplane landing problem. This can be the basic implementation for many other transportation planning task.
The railway environment has a very restricted transition behaviour. Trains can normally not run backwards and the have to follow rails.
The can only switch cells along rails or the pass a switch in right direction. Thus the navigation behaviour of a train is very restricted.
The planning problem where many agents share same infrastructure becomes mostly to an ordering problem.
Trains have a departing location and a destination where they have to travel to. The agents have to learn to avoid each others or to learn to pass.
Otherwise the can never successfully reach the destinations. In complex situation they have to learn to cooperate otherwise they get stocked in dead-lock situation.
This make the railway planning problem a very complex mulit-agent reinforcement task.

spmohanty's avatar
spmohanty committed

Vaibhav Agrawal's avatar
Vaibhav Agrawal committed
Getting Started
===============

Online Docs
------------

The documentation for the latest code on the master branch is found at  `http://flatland-rl-docs.s3-website.eu-central-1.amazonaws.com/ <http://flatland-rl-docs.s3-website.eu-central-1.amazonaws.com/>`_ 



Generate Docs
--------------
spmohanty's avatar
spmohanty committed

Vaibhav Agrawal's avatar
Vaibhav Agrawal committed
The docs have a lot more details about how to interact with this codebase.  
Vaibhav Agrawal's avatar
Vaibhav Agrawal committed
**TODO**: Mohanty to add atleast a neat outline herefor the contents to the docs here ::
Vaibhav Agrawal's avatar
Vaibhav Agrawal committed
    git clone git@gitlab.aicrowd.com:flatland/flatland.git
    cd flatland
    pip install -r requirements_dev.txt
Vaibhav Agrawal's avatar
Vaibhav Agrawal committed
* On, Linux and macOS ::
Vaibhav Agrawal's avatar
Vaibhav Agrawal committed
    make docs
Vaibhav Agrawal's avatar
Vaibhav Agrawal committed
* On, Windows ::
Vaibhav Agrawal's avatar
Vaibhav Agrawal committed
    python setup.py develop (or)
    python setup.py install
    python make_docs.py
spmohanty's avatar
spmohanty committed
Features
--------

Vaibhav Agrawal's avatar
Vaibhav Agrawal committed
TODO
spmohanty's avatar
spmohanty committed

Vaibhav Agrawal's avatar
Vaibhav Agrawal committed

Installation
Vaibhav Agrawal's avatar
Vaibhav Agrawal committed
============

Stable Release
--------------

To install flatland, run this command in your terminal ::

    pip install flatland-rl
Vaibhav Agrawal's avatar
Vaibhav Agrawal committed
This is the preferred method to install flatland, as it will always install the most recent stable release.
Vaibhav Agrawal's avatar
Vaibhav Agrawal committed
If you don’t have `pip <https://pip.pypa.io/en/stable/>`_ installed, this `Python installation guide <https://docs.python-guide.org/starting/installation/>`_ can guide you through the process.


From Sources
------------
The sources for flatland can be downloaded from the `Gitlab repo <https://gitlab.aicrowd.com/flatland/flatland>`_.

You can clone the public repository ::

    $ git clone git@gitlab.aicrowd.com:flatland/flatland.git

Once you have a copy of the source, you can install it with ::

    $ python setup.py install
    
    
Usage
=====
To use flatland in a project ::
    
    import flatland
Vaibhav Agrawal's avatar
Vaibhav Agrawal committed
    
flatland
========
TODO: explain the interface here
u214892's avatar
u214892 committed
Module Dependencies
===================
.. image:: flatland.svg

spmohanty's avatar
spmohanty committed

spmohanty's avatar
spmohanty committed
Authors
--------
* Sharada Mohanty <mohanty@aicrowd.com>
spiglerg's avatar
spiglerg committed
* Giacomo Spigler <giacomo.spigler@gmail.com>
* Mattias Ljungström
hagrid67's avatar
hagrid67 committed
* Jeremy Watson
Erik Nygren's avatar
Erik Nygren committed
* Erik Nygren <erik.nygren@sbb.ch>
adrian_egli's avatar
adrian_egli committed
* Adrian Egli <adrian.egli@sbb.ch>
Vaibhav Agrawal's avatar
Vaibhav Agrawal committed
* Vaibhav Agrawal <theinfamouswayne@gmail.com>
u214892's avatar
u214892 committed
* Christian Eichenberger <christian.markus.eichenberger@sbb.ch>
maljx's avatar
maljx committed


<please fill yourself in>