From cfe7d2457c1e2b4e344d0ab4fecfbf4b00768a44 Mon Sep 17 00:00:00 2001
From: u214892 <u214892@sbb.ch>
Date: Fri, 7 Jun 2019 16:54:25 +0200
Subject: [PATCH] code cleanup

---
 flatland/envs/observations.py | 2 --
 flatland/envs/rail_env.py     | 8 --------
 2 files changed, 10 deletions(-)

diff --git a/flatland/envs/observations.py b/flatland/envs/observations.py
index 908df432..5cc3f26d 100644
--- a/flatland/envs/observations.py
+++ b/flatland/envs/observations.py
@@ -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,
diff --git a/flatland/envs/rail_env.py b/flatland/envs/rail_env.py
index c98b1689..7694bb20 100644
--- a/flatland/envs/rail_env.py
+++ b/flatland/envs/rail_env.py
@@ -215,22 +215,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
 
-- 
GitLab