Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
marl-flatland
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
manavsinghal157
marl-flatland
Commits
bc9dca31
Commit
bc9dca31
authored
4 years ago
by
Egli Adrian (IT-SCI-API-PFI)
Browse files
Options
Downloads
Patches
Plain Diff
FastTreeObs working
parent
b911088d
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
run.py
+3
-0
3 additions, 0 deletions
run.py
with
3 additions
and
0 deletions
run.py
+
3
−
0
View file @
bc9dca31
...
@@ -9,6 +9,7 @@ from flatland.envs.predictions import ShortestPathPredictorForRailEnv
...
@@ -9,6 +9,7 @@ from flatland.envs.predictions import ShortestPathPredictorForRailEnv
from
flatland.evaluators.client
import
FlatlandRemoteClient
from
flatland.evaluators.client
import
FlatlandRemoteClient
from
flatland.evaluators.client
import
TimeoutException
from
flatland.evaluators.client
import
TimeoutException
from
utils.dead_lock_avoidance_agent
import
DeadLockAvoidanceAgent
from
utils.deadlock_check
import
check_if_all_blocked
from
utils.deadlock_check
import
check_if_all_blocked
from
utils.fast_tree_obs
import
FastTreeObs
from
utils.fast_tree_obs
import
FastTreeObs
...
@@ -81,6 +82,8 @@ while True:
...
@@ -81,6 +82,8 @@ while True:
nb_agents
=
len
(
local_env
.
agents
)
nb_agents
=
len
(
local_env
.
agents
)
max_nb_steps
=
local_env
.
_max_episode_steps
max_nb_steps
=
local_env
.
_max_episode_steps
policy
=
DeadLockAvoidanceAgent
(
local_env
)
tree_observation
.
set_env
(
local_env
)
tree_observation
.
set_env
(
local_env
)
tree_observation
.
reset
()
tree_observation
.
reset
()
observation
=
tree_observation
.
get_many
(
list
(
range
(
nb_agents
)))
observation
=
tree_observation
.
get_many
(
list
(
range
(
nb_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