added scenario self stop, agent setup, action masking in PPO

This commit is contained in:
2023-01-14 10:01:37 +01:00
parent 4f1044b87e
commit 692b932302
6 changed files with 50 additions and 27 deletions
@@ -134,6 +134,7 @@ class BaseComponent(ABC):
def reset(self):
"""Reset any portion of the state managed by this component."""
world = self.world
self.n_agents = world.n_agents
all_agents = world.agents + [world.planner]
for agent in all_agents:
agent.state.update(self.get_additional_state_fields(agent.name))