WARNING Your environment contains multiple teams, but PPOTrainer dosent support adversarial games

Hi everyone , When trying to train my agent as a self play I get the following error at the prompt, how can I solve this ? thanks in advance :slight_smile:

WARNING [trainer.py:240] Your environment contains multiple
teams, but PPOTrainer doesn’t support adversarial games. Enable self-play to
train adversarial games.

Hi,
Does your trainer configuration behavior name match your agent’s behavior name? I’ve run into this myself and have seen that error. Please look through the python console logs again. There should be another warning.

Yes , it is match and other error message

2021-03-17 09:20:20 WARNING [trainer.py:240] Your environment contains multiple
teams, but PPOTrainer doesn’t support adversarial games. Enable self-play to
train adversarial games.
2021-03-17 09:20:39 INFO [subprocess_env_manager.py:220] UnityEnvironment worker
0: environment stopping.
2021-03-17 09:20:39 INFO [trainer_controller.py:187] Learning was interrupted. P
lease wait while the graph is generated.
2021-03-17 09:20:39 WARNING [rl_trainer.py:174] Trainer has multiple policies, b
ut default behavior only saves the first.
2021-03-17 09:20:39 WARNING [rl_trainer.py:152] Trainer has multiple policies, b
ut default behavior only saves the first.
2021-03-17 09:20:39 INFO [model_serialization.py:130] Converting to results\test
17\Agent Controller\Agent Controller-974.onnx
2021-03-17 09:20:39 INFO [model_serialization.py:142] Exported results\test17\Ag
ent Controller\Agent Controller-974.onnx
2021-03-17 09:20:39 INFO [torch_model_saver.py:116] Copied results\test17\Agent
Controller\Agent Controller-974.onnx to results\test17\Agent Controller.onnx.
2021-03-17 09:20:39 INFO [trainer_controller.py:81] Saved Model

I had similar problem, adding self play attributes under yhe yaml helped.

self_play:
      save_steps: 50000
      team_change: 100000
      swap_steps: 2000
      window: 10
      play_against_latest_model_ratio: 0.5
      initial_elo: 1200.0

Can you post your training configuration, your agent behavior names, and team ids?

After making a few changes, I started getting the behavior name does not match error, is there a special place where I should throw the trainer.yaml file? and how can I activate self play

6945476--816722--behaviour.PNG


the identation is wrong it should be something like

tho im not sure about the “Space” you have there, i suggest updating to AgentController

NOTE - im just a random guy trying to help, not a unity staff member or anything

Sorry i dont understand link that you send dont open

thats odd, i will try posting it here

6947981–817175–example.txt (902 Bytes)