Switching between brains

Back then, I had a setup of an agent consisting of 2 different brains, using a script to “toggle” between appropriate behaviours.

Recently, I updated the ml-agents library to r3 and realised that Brain is no longer a scriptable objects. I am not sure I understand how to implement my model in the new setup. I have added 2 separate Behaviour Parameters components but that doesn’t seem right. Should I “toggle” the Behaviour Parameters components as well, and how? Or should I implement the model differently?

Any suggestion is welcome. Thanks!

There is an example with what you described.

In: ML-Agents/Examples/WallJump/Scripts/WallJumpAgent.cs
Look for the function Configure agent

That example contains all the logic for that.

SetModel(“SmallWallJump”, noWallBrain);

1 Like

Thank you! I will look into it.