You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have some correspondence between components and agents: MoveActors work with MovingAgent, Attackors work with AttackingAgent, HealthState works with HealthAgent, Observers work with ObservingAgents (more generally). We ought to consider some kinds of correspondence between done conditions and the agent type.
Alternatively, we can assign a mapping between the done condition and the agents to which it applies.
The text was updated successfully, but these errors were encountered:
For example, suppose there are two teams, each with a target. The game will end when one of the teams takes out its target. The TargetDestroyedDone calculates the done condition for all agents. So we have to split it in the following way:
def get_all_done(self, **kwargs):
attackers_done = all([
self.target_done.get_done(agent)
for agent in self.agents.values()
if agent.id.startswith('A') and isinstance(agent, Agent)
])
defenders_done = all([
self.target_done.get_done(agent)
for agent in self.agents.values()
if agent.id.startswith('D') and isinstance(agent, Agent)
])
return attackers_done or defenders_done
We have some correspondence between components and agents: MoveActors work with MovingAgent, Attackors work with AttackingAgent, HealthState works with HealthAgent, Observers work with ObservingAgents (more generally). We ought to consider some kinds of correspondence between done conditions and the agent type.
Alternatively, we can assign a mapping between the done condition and the agents to which it applies.
The text was updated successfully, but these errors were encountered: