Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. We are looking for feedback on the experimental Unity Safe Mode which is aiming to help you resolve compilation errors faster during project startup.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Switching between brains

Discussion in 'ML-Agents' started by TnTonly, Jul 27, 2020.

  1. TnTonly

    TnTonly

    Joined:
    Oct 12, 2018
    Posts:
    4
    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!
     
  2. elieceralejandromv

    elieceralejandromv

    Joined:
    Jul 13, 2020
    Posts:
    8
    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);
     
    TnTonly likes this.
  3. TnTonly

    TnTonly

    Joined:
    Oct 12, 2018
    Posts:
    4
    Thank you! I will look into it.
     
unityunity