Skip to content
Snippets Groups Projects
Commit 172ad243 authored by spiglerg's avatar spiglerg
Browse files

Update README.rst

parent 8a6e86ff
No related branches found
No related tags found
No related merge requests found
...@@ -46,6 +46,7 @@ Online Docs ...@@ -46,6 +46,7 @@ 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/>`_ 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/>`_
The documentation includes a few tutorials in http://flatland-rl-docs.s3-website.eu-central-1.amazonaws.com/gettingstarted.html.
Run Notebooks with Examples with one Click Run Notebooks with Examples with one Click
------------------------------------------ ------------------------------------------
...@@ -81,12 +82,6 @@ The docs have a lot more details about how to interact with this codebase. ...@@ -81,12 +82,6 @@ The docs have a lot more details about how to interact with this codebase.
python make_docs.py python make_docs.py
Features
--------
TODO
Installation Installation
============ ============
...@@ -115,6 +110,27 @@ Once you have a copy of the source, you can install it with :: ...@@ -115,6 +110,27 @@ Once you have a copy of the source, you can install it with ::
$ python setup.py install $ python setup.py install
Basic Usage
============
Basic usage of the RailEnv environment used by the Flatland Challenge ::
import numpy as np
import time
from flatland.envs.generators import complex_rail_generator
from flatland.envs.rail_env import RailEnv
from flatland.utils.rendertools import RenderTool
env = RailEnv(width=7, height=7, rail_generator=complex_rail_generator(nr_start_goal=10, nr_extra=1, min_dist=8, max_dist=99999, seed=0), number_of_agents=2)
env_renderer = RenderTool(env, gl="PILSVG")
for step in range(100):
obs, all_rewards, done, _ = env.step({0:np.random.randint(0, 5), 1:np.random.randint(0, 5)})
print("Rewards: ", all_rewards, " [done=", done, "]")
env_renderer.renderEnv(show=True, frames=False, show_observations=False)
time.sleep(0.3)
Jupyter Canvas Widget Jupyter Canvas Widget
--------------------- ---------------------
......
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