Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Flatland
Flatland
Commits
2f7ee5c1
Commit
2f7ee5c1
authored
May 01, 2019
by
Erik Nygren
Browse files
minor changes to rendering
parent
8eec5856
Pipeline
#457
passed with stage
in 2 minutes and 39 seconds
Changes
4
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
examples/training_navigation.py
View file @
2f7ee5c1
...
...
@@ -30,13 +30,13 @@ env = RailEnv(width=20,
rail_generator=complex_rail_generator(nr_start_goal=20, min_dist=10, max_dist=99999, seed=0),
number_of_agents=5)
"""
env = RailEnv(width=20,
height=20,
rail_generator=rail_from_list_of_saved_GridTransitionMap_generator(
['../env-data/tests/circle.npy']),
number_of_agents=1)
"""
env_renderer
=
RenderTool
(
env
,
gl
=
"QT"
)
handle
=
env
.
get_agent_handles
()
...
...
flatland/core/env_observation_builder.py
View file @
2f7ee5c1
...
...
@@ -394,7 +394,7 @@ class TreeObsForRailEnv(ObservationBuilder):
observation
=
observation
+
branch_observation
elif
last_isSwitch
and
self
.
env
.
rail
.
get_transition
((
position
[
0
],
position
[
1
],
direction
),
):
(
branch_direction
+
2
)
%
4
):
new_cell
=
self
.
_new_position
(
position
,
branch_direction
)
branch_observation
=
self
.
_explore_branch
(
handle
,
...
...
flatland/utils/render_qt.py
View file @
2f7ee5c1
...
...
@@ -7,7 +7,7 @@ import numpy as np
class
QTGL
(
GraphicsLayer
):
def
__init__
(
self
,
width
,
height
):
self
.
cell_pixels
=
5
0
self
.
cell_pixels
=
6
0
self
.
tile_size
=
self
.
cell_pixels
self
.
width
=
width
...
...
notebooks/CanvasEditor.ipynb
View file @
2f7ee5c1
...
...
@@ -211,11 +211,11 @@
oEditor
.
env
.
number_of_agents
```
%%%% Output: execute_result
1
0
%% Cell type:code id: tags:
```
python
wid_output
...
...
@@ -260,11 +260,11 @@
%%%% Output: error
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
<ipython-input-2
1
-a40691809d2c> in <module>()
<ipython-input-2
0
-a40691809d2c> in <module>()
----> 1 oEnv.rail.save_transition_map("../flatland/env-data/tests/test-editor.npy")
c:\users\u224870\appdata\local\programs\python\python36\lib\site-packages\flatland_rl-0.1.1-py3.6.egg\flatland\core\transition_map.py in save_transition_map(self, filename)
259
260 """
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment