Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

How to split my NN in two

Discussion in 'ML-Agents' started by mmmbop, Aug 24, 2022.

  1. mmmbop


    Jan 22, 2022
    Hello, how correctly to split NN in several parts?
    I mean, for example, i train my agent for walking ( humanoid example), for he got problem with rotates, so i think i need somehow to divide my nn in 2 : one for walking towards and second for rotate to target, but how to implement this? Or its better to do it in one NN , but algorithm seems to be diffucult for one NN, its too many "IF"'s there, if taget is changed, not move,just arond this axis etc...
    Is there some example how to divide my behavoir and switch between them by condition?
  2. WaxyMcRivers


    May 9, 2016
    The problem should be easy enough for a single NN to handle, it's usually about the data, not the NN.

    There are multiple examples in the ML agents package that you can look at for standard locomotion tasks. There are some pre-built components that are nice to use that will provide useful info to your agent, making the task easier. The food collector example could be a good place to start for simple locomotion based task.

    I definitely recommend newcomers to spend a decent amount of time working through the code, components, and scenes that the mlagents team spent time putting together. They are a good ground truth to reference when preparing to work on your own custom projects.