Skip to content
Snippets Groups Projects
Commit f0d9afeb authored by Erik Nygren's avatar Erik Nygren
Browse files

fixed formatting

parent 0766f7ed
No related branches found
No related tags found
1 merge request!168153 bug fixes multi speed
Pipeline #1891 passed
......@@ -339,7 +339,7 @@ class RailEnv(Environment):
agent.malfunction_data['malfunction'] -= 1
# Broken agents are stopped
self.rewards_dict[i_agent] += step_penalty # * agent.speed_data['speed']
self.rewards_dict[i_agent] += step_penalty * agent.speed_data['speed']
self.agents[i_agent].moving = False
action_dict[i_agent] = RailEnvActions.DO_NOTHING
......@@ -404,14 +404,14 @@ class RailEnv(Environment):
else:
# TODO: an invalid action was chosen after entering the cell. The agent cannot move.
self.rewards_dict[i_agent] += invalid_action_penalty
self.rewards_dict[i_agent] += step_penalty #* agent.speed_data['speed']
self.rewards_dict[i_agent] += step_penalty * agent.speed_data['speed']
self.rewards_dict[i_agent] += stop_penalty
agent.moving = False
continue
else:
# TODO: an invalid action was chosen after entering the cell. The agent cannot move.
self.rewards_dict[i_agent] += invalid_action_penalty
self.rewards_dict[i_agent] += step_penalty #* agent.speed_data['speed']
self.rewards_dict[i_agent] += step_penalty * agent.speed_data['speed']
self.rewards_dict[i_agent] += stop_penalty
agent.moving = False
continue
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment