Skip to content
Snippets Groups Projects
Commit 2d8e4556 authored by hagrid67's avatar hagrid67
Browse files

fixed reward/penalty tests - malfunction step penalty was being applied twice

parent ed76c8ec
No related branches found
No related tags found
1 merge request!311implemented performance enhancements by adrian egli
Pipeline #5020 failed
......@@ -742,7 +742,8 @@ class RailEnv(Environment):
# full step penalty in this case
if agent.malfunction_data['malfunction'] > 0:
self.motionCheck.addAgent(i_agent, agent.position, agent.position)
self.rewards_dict[i_agent] += self.step_penalty * agent.speed_data['speed']
# agent will get penalty in step_agent2_cf
#self.rewards_dict[i_agent] += self.step_penalty * agent.speed_data['speed']
return
# Is the agent at the beginning of the cell? Then, it can take an action.
......
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