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

fixed bug in reward function when all agents terminate

parent c2110f62
No related branches found
No related tags found
No related merge requests found
......@@ -180,6 +180,7 @@ class RailEnv(Environment):
self.rewards_dict[iAgent] = 0
if self.dones["__all__"]:
self.rewards_dict = [r + global_reward for r in self.rewards_dict]
return self._get_observations(), self.rewards_dict, self.dones, {}
# for i in range(len(self.agents_handles)):
......
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