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
c53baa0b
Commit
c53baa0b
authored
5 years ago
by
spmohanty
Browse files
Options
Downloads
Patches
Plain Diff
Remove unused imports and stray print statements
parent
2c91e486
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
my_observation_builder.py
+0
-5
0 additions, 5 deletions
my_observation_builder.py
with
0 additions
and
5 deletions
my_observation_builder.py
+
0
−
5
View file @
c53baa0b
...
@@ -8,10 +8,7 @@ import numpy as np
...
@@ -8,10 +8,7 @@ import numpy as np
from
flatland.core.env
import
Environment
from
flatland.core.env
import
Environment
from
flatland.core.env_observation_builder
import
ObservationBuilder
from
flatland.core.env_observation_builder
import
ObservationBuilder
from
flatland.core.env_prediction_builder
import
PredictionBuilder
from
flatland.core.env_prediction_builder
import
PredictionBuilder
from
flatland.core.grid.grid4_utils
import
get_new_position
from
flatland.core.grid.grid_utils
import
coordinate_to_position
from
flatland.envs.agent_utils
import
RailAgentStatus
,
EnvAgent
from
flatland.envs.agent_utils
import
RailAgentStatus
,
EnvAgent
from
flatland.utils.ordered_set
import
OrderedSet
class
CustomObservationBuilder
(
ObservationBuilder
):
class
CustomObservationBuilder
(
ObservationBuilder
):
...
@@ -35,7 +32,6 @@ class CustomObservationBuilder(ObservationBuilder):
...
@@ -35,7 +32,6 @@ class CustomObservationBuilder(ObservationBuilder):
# The instantiations which depend on parameters of the Env object should be
# The instantiations which depend on parameters of the Env object should be
# done here, as it is only here that the updated self.env instance is available
# done here, as it is only here that the updated self.env instance is available
self
.
rail_obs
=
np
.
zeros
((
self
.
env
.
height
,
self
.
env
.
width
))
self
.
rail_obs
=
np
.
zeros
((
self
.
env
.
height
,
self
.
env
.
width
))
print
(
"
Env Width :
"
,
self
.
env
.
width
,
"
Env Height :
"
,
self
.
env
.
height
)
def
reset
(
self
):
def
reset
(
self
):
"""
"""
...
@@ -48,7 +44,6 @@ class CustomObservationBuilder(ObservationBuilder):
...
@@ -48,7 +44,6 @@ class CustomObservationBuilder(ObservationBuilder):
# Get the transition map value at location _x, _y
# Get the transition map value at location _x, _y
transition_value
=
self
.
env
.
rail
.
get_full_transitions
(
_y
,
_x
)
transition_value
=
self
.
env
.
rail
.
get_full_transitions
(
_y
,
_x
)
self
.
rail_obs
[
_y
,
_x
]
=
transition_value
self
.
rail_obs
[
_y
,
_x
]
=
transition_value
print
(
"
Responding to obs_builder.reset()
"
)
def
get
(
self
,
handle
:
int
=
0
):
def
get
(
self
,
handle
:
int
=
0
):
"""
"""
...
...
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