In multi-agent configurations, Pathmind will always return an action for all agent each time an action is triggered. This is problematic in scenarios in which only a subset of agents require an action at a given point in time.

To work around this problem, you will need to define a "skip" condition. This allows you to skip certain agents if they do not meet certain criteria.

Step 1: Set the Number of Agents > 1

Doing this will reveal a new field in the Pathmind Helper called "Skip".

Step 2: Define your skip condition

The skip condition must return true (skip) or false (do not skip).

Consider a scenario in which a delivery truck only needs to know it's next destination after arrival. In the screenshot above, a truck is skipped if it is currently in transit.

Step 3: Check debug mode to confirm that your skip condition is properly set up.

Notice that the console output now contains "skip". Check to make sure skip is returning true or false correctly for each agent.

Pathmind:
Step: 1
Agent ID: 0
Observations:
Array: [43.0, 0.0, 0.0, 0.0, 70.0, 0.0, 0.0, 0.0, 70.0, 0.0, 0.0, 0.9999999999999996]
Number of Observations: 12
Reward Variables:
Array: [0.0, 900.1955427073212, 2.068086687094852]
Number of Reward Variables: 3
Last Action: [18.0, 17.0, 9.0, 16.0, 14.0, 0.0]
Skip: true
Done: false
Agent ID: 1
Observations:
Array: [43.0, 0.0, 0.0, 0.0, 70.0, 0.0, 0.0, 0.0, 70.0, 0.0, 0.0, 0.9999999999999996]
Number of Observations: 12
Reward Variables:
Array: [0.0, 900.1955427073212, 2.068086687094852]
Number of Reward Variables: 3
Last Action: [0.0, 12.0, 0.0, 15.0, 5.0, 11.0]
Skip: false
Done: false

Did this answer your question?