Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Flatland
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
yoogottamk
Flatland
Commits
441f7493
Commit
441f7493
authored
5 years ago
by
spiglerg
Browse files
Options
Downloads
Patches
Plain Diff
Update gettingstarted.rst
parent
cbae0ff4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/gettingstarted.rst
+5
-5
5 additions, 5 deletions
docs/gettingstarted.rst
with
5 additions
and
5 deletions
docs/gettingstarted.rst
+
5
−
5
View file @
441f7493
...
@@ -146,7 +146,7 @@ of handle 'handle'.
...
@@ -146,7 +146,7 @@ of handle 'handle'.
A RailEnv environment can then be created as usual:
A RailEnv environment can then be created as usual:
.. code-block: python
.. code-block:
:
python
env = RailEnv(width=7,
env = RailEnv(width=7,
height=7,
height=7,
...
@@ -162,9 +162,9 @@ num_agent agents, their initial orientation (0=North, 1=East, 2=South, 3=West),
...
@@ -162,9 +162,9 @@ num_agent agents, their initial orientation (0=North, 1=East, 2=South, 3=West),
and the position of their targets.
and the position of their targets.
For example, the following custom rail map generator returns an empty map of
For example, the following custom rail map generator returns an empty map of
size (height, width), with no agents (regardless of num_agents)
size (height, width), with no agents (regardless of num_agents)
:
.. code-block: python
.. code-block:
:
python
def custom_rail_generator():
def custom_rail_generator():
def generator(width, height, num_agents=0, num_resets=0):
def generator(width, height, num_agents=0, num_resets=0):
...
@@ -184,9 +184,9 @@ It is worth to note that helpful utilities to manage RailEnv environments and th
...
@@ -184,9 +184,9 @@ It is worth to note that helpful utilities to manage RailEnv environments and th
related data structures are available in 'envs.env_utils'. In particular,
related data structures are available in 'envs.env_utils'. In particular,
envs.env_utils.get_rnd_agents_pos_tgt_dir_on_rail is fairly handy to fill in
envs.env_utils.get_rnd_agents_pos_tgt_dir_on_rail is fairly handy to fill in
random (but consistent) agents along with their targets and initial directions,
random (but consistent) agents along with their targets and initial directions,
given a rail map (GridTransitionMap object) and the desired number of agents
given a rail map (GridTransitionMap object) and the desired number of agents
:
.. code-block: python
.. code-block:
:
python
agents_position, agents_direction, agents_target = get_rnd_agents_pos_tgt_dir_on_rail(
agents_position, agents_direction, agents_target = get_rnd_agents_pos_tgt_dir_on_rail(
rail_map,
rail_map,
num_agents)
num_agents)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment