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
35cc3bc4
Commit
35cc3bc4
authored
5 years ago
by
Erik Nygren
Browse files
Options
Downloads
Patches
Plain Diff
removed debug print
parent
fd1651b0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/flatland_2_0_example.py
+0
-3
0 additions, 3 deletions
examples/flatland_2_0_example.py
flatland/envs/rail_generators.py
+1
-2
1 addition, 2 deletions
flatland/envs/rail_generators.py
with
1 addition
and
5 deletions
examples/flatland_2_0_example.py
+
0
−
3
View file @
35cc3bc4
import
time
import
numpy
as
np
from
flatland.envs.observations
import
TreeObsForRailEnv
,
GlobalObsForRailEnv
...
...
@@ -115,7 +113,6 @@ for step in range(500):
# reward and whether their are done
next_obs
,
all_rewards
,
done
,
_
=
env
.
step
(
action_dict
)
env_renderer
.
render_env
(
show
=
True
,
show_observations
=
False
,
show_predictions
=
False
)
time
.
sleep
(
10
)
frame_step
+=
1
# Update replay buffer and train agent
for
a
in
range
(
env
.
get_num_agents
()):
...
...
This diff is collapsed.
Click to expand it.
flatland/envs/rail_generators.py
+
1
−
2
View file @
35cc3bc4
...
...
@@ -581,8 +581,7 @@ def sparse_rail_generator(num_cities=5, min_node_dist=20, node_radius=2,
inner_connection_points
,
outer_connection_points
,
connection_info
=
_generate_node_connection_points
(
node_positions
,
node_radius
,
max_inter_city_rails_allowed
,
tracks_in_city
)
print
(
inner_connection_points
)
print
(
outer_connection_points
)
# Connect the cities through the connection points
_connect_cities
(
node_positions
,
outer_connection_points
,
connection_info
,
city_cells
,
rail_trans
,
grid_map
)
...
...
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