Skip to content
Snippets Groups Projects
Commit 8de88772 authored by Erik Nygren's avatar Erik Nygren
Browse files

Merge branch 'master' of gitlab.aicrowd.com:flatland/flatland into dqn_on_flatland

parents dceceb86 c81fd51b
No related branches found
No related tags found
No related merge requests found
========
flatland
Flatland
========
......@@ -15,37 +15,76 @@ flatland
Multi Agent Reinforcement Learning on Trains
Getting Started
===============
Generate Docs
--------------
| The docs have a lot more details about how to interact with this codebase.
| **TODO**: Mohanty to add atleast a neat outline herefor the contents to the docs here.
.. code-block:: bash
git clone git@gitlab.aicrowd.com:flatland/flatland.git
cd flatland
pip install -r requirements_dev.txt
The docs have a lot more details about how to interact with this codebase.
* Linux and macOS
**TODO**: Mohanty to add atleast a neat outline herefor the contents to the docs here ::
.. code-block:: bash
git clone git@gitlab.aicrowd.com:flatland/flatland.git
cd flatland
pip install -r requirements_dev.txt
make docs
* On, Linux and macOS ::
make docs
* Windows
.. code-block:: bash
* On, Windows ::
python setup.py develop (or)
python setup.py install
python make_docs.py
python setup.py develop (or)
python setup.py install
python make_docs.py
Features
--------
* TODO
TODO
Installation
============
Stable Release
--------------
To install flatland, run this command in your terminal ::
pip install flatland-rl
This is the preferred method to install flatland, as it will always install the most recent stable release.
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
flatland
========
TODO: explain the interface here
Authors
--------
......@@ -55,5 +94,7 @@ Authors
* Jeremy Watson
* Erik Nygren <erik.nygren@sbb.ch>
* Adrian Egli <adrian.egli@sbb.ch>
* Vaibhav Agrawal <theinfamouswayne@gmail.com>
<please fill yourself in>
......@@ -242,7 +242,7 @@ class TreeObsForRailEnv(ObservationBuilder):
# Start from the current orientation, and see which transitions are available;
# organize them as [left, forward, right, back], relative to the current orientation
for branch_direction in [(orientation + 4 + i) % 4 for i in range(-1, 3)]:
#TODO: check if cell is a curve, then keep branch direction forward instead of left or right
# TODO: check if cell is a curve, then keep branch direction forward instead of left or right
if self.env.rail.get_transition((position[0], position[1], orientation), branch_direction):
new_cell = self._new_position(position, branch_direction)
......
......@@ -905,7 +905,7 @@ class RailEnv(Environment):
def reset(self, regen_rail=True, replace_agents=True):
if regen_rail or self.rail is None:
#TODO: Import not only rail information but also start and goal positions
# TODO: Import not only rail information but also start and goal positions
self.rail = self.rail_generator(self.width, self.height, self.num_resets)
self.fill_valid_positions()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment