Multiple Agents with Different Behaviors

I have problem with training multiple agnets at the same time. 4 agents have discrete behavior and 1 agent have continuous behavior. Is it possible to train multiple agents with different behaviors?

Yes. You can train them all simultaneously and if this seems to be unstable you can try using asymmetric self-play.

How can I train simultaneously? E.g. I have an agent A that gets rewarded if it finds food and an Agent B that gets rewarded for “eating” (colliding) Agent A. Scripts are set up, but how do I set up the yaml file and start the learning process (I know how to do it when training only one agent type). Or is this a task for the teams option of ml agents?

Depends on wether your two agents need different policies. If they do, you would just give them distinct behaviour names and add another section with the config params for the second behaviour to the yaml file. Then start training as usual. Models for both policies will be created and named in the form of RunID_BehaviourA, RunID_BehaviourB. Otherwise, you would use self-play if observations, actions and rewards are identical for agents A and B.

2 Likes

Cool, that sounds pretty easy. Will try that right away. Thanks!