diff --git a/README.rst b/README.rst index e745462fb67cae58f04d8e7af31f35d629d35263..60e8276427c5cce82a01047755a9677d878c3da1 100644 --- a/README.rst +++ b/README.rst @@ -1,5 +1,5 @@ ======== -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> diff --git a/flatland/core/env_observation_builder.py b/flatland/core/env_observation_builder.py index 848b184f7c99b991ebda3a62aad607ca1b718d86..ac5bfd8b867fed728de79fc2f2270381fdde04af 100644 --- a/flatland/core/env_observation_builder.py +++ b/flatland/core/env_observation_builder.py @@ -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) diff --git a/flatland/envs/rail_env.py b/flatland/envs/rail_env.py index 3171838ccbafec66b89c7603715da5041cf7e1c6..bb754ea9e21a8b785efa92c557569611ed13e504 100644 --- a/flatland/envs/rail_env.py +++ b/flatland/envs/rail_env.py @@ -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()