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

need to update tree observation as well

parent 437e6193
No related branches found
No related tags found
No related merge requests found
...@@ -161,6 +161,7 @@ class TreeObsForRailEnv(ObservationBuilder): ...@@ -161,6 +161,7 @@ class TreeObsForRailEnv(ObservationBuilder):
# Update local lookup table for all agents' positions # Update local lookup table for all agents' positions
self.location_has_agent = {tuple(agent.position): 1 for agent in self.env.agents} self.location_has_agent = {tuple(agent.position): 1 for agent in self.env.agents}
# TODO: Update this to handle number of agents at same location
self.location_has_agent_direction = {tuple(agent.position): agent.direction for agent in self.env.agents} self.location_has_agent_direction = {tuple(agent.position): agent.direction for agent in self.env.agents}
self.location_has_agent_speed = {tuple(agent.position): agent.speed_data['speed'] for agent in self.env.agents} self.location_has_agent_speed = {tuple(agent.position): agent.speed_data['speed'] for agent in self.env.agents}
self.location_has_agent_malfunction = {tuple(agent.position): agent.malfunction_data['malfunction'] for agent in self.location_has_agent_malfunction = {tuple(agent.position): agent.malfunction_data['malfunction'] for agent in
......
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