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
c129ab97
Commit
c129ab97
authored
5 years ago
by
Erik Nygren
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of gitlab.aicrowd.com:flatland/flatland
parents
d2df8f91
257b3fc4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
flatland/envs/observations.py
+0
-2
0 additions, 2 deletions
flatland/envs/observations.py
flatland/envs/rail_env.py
+0
-8
0 additions, 8 deletions
flatland/envs/rail_env.py
with
0 additions
and
10 deletions
flatland/envs/observations.py
+
0
−
2
View file @
c129ab97
...
...
@@ -266,7 +266,6 @@ class TreeObsForRailEnv(ObservationBuilder):
other_agent_same_direction
=
0
other_agent_opposite_direction
=
0
num_steps
=
1
while
exploring
:
# #############################
...
...
@@ -378,7 +377,6 @@ class TreeObsForRailEnv(ObservationBuilder):
]
"""
if
last_isTarget
:
observation
=
[
0
,
other_target_encountered
,
...
...
This diff is collapsed.
Click to expand it.
flatland/envs/rail_env.py
+
0
−
8
View file @
c129ab97
...
...
@@ -214,22 +214,14 @@ class RailEnv(Environment):
if
action
==
RailEnvActions
.
DO_NOTHING
and
agent
.
moving
:
# Keep moving
# Changed MOVE_FORWARD to DO_NOTHING
#action_dict[iAgent] = RailEnvActions.DO_NOTHING
action
=
RailEnvActions
.
MOVE_FORWARD
if
action
==
RailEnvActions
.
STOP_MOVING
and
agent
.
moving
:
#action_dict[iAgent] = RailEnvActions.DO_NOTHING
# CHanged DO_NOTHING to STOP_MOVING
# action = RailEnvActions.STOP_MOVING
agent
.
moving
=
False
self
.
rewards_dict
[
iAgent
]
+=
stop_penalty
if
not
agent
.
moving
and
action
==
RailEnvActions
.
MOVE_FORWARD
:
# Only allow agent to start moving by pressing forward.
#(action == RailEnvActions.MOVE_LEFT or
# action == RailEnvActions.MOVE_FORWARD or
# action == RailEnvActions.MOVE_RIGHT):
agent
.
moving
=
True
self
.
rewards_dict
[
iAgent
]
+=
start_penalty
...
...
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