Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. 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

Help Wanted Area Limit

Discussion in 'ML-Agents' started by atmuc, Jun 2, 2020.

  1. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,053
    I am using a Pong game to learn ML-Agents. I build my game based on ML-Agents Example Tennis.

    I use multiple Pong Area to train faster. I have 100 Areas in my scene. When I have 25 Areas in my scene I get different results. The cumulative result is higher for 25 Areas training. I used both CPU and GPU training, results are similar. While training, CPU is about %30. FPS is around 4 when using 100 Areas, and around 7 when using 25 Areas.

    I do not use Update method. I used everything in FixedUpdate method. I use Project Settings Overrides like Tennis examples.

    Is it normal to have different results?

    How can I decide on the best Area count?

    How Can I build and run my game for training? Do I have to play it on Editor for training?
     
  2. kahabal

    kahabal

    Joined:
    Nov 19, 2018
    Posts:
    16
    i have the same issue with CPU, not more then 30%, not sure how to overcome it

    > How Can I build and run my game for training? Do I have to play it on Editor for training?

    From Unity, go to File.. Build Settings... decide on your platform and create an executable file.

    then when you want to train from that file, just use

    mlagents-learn <trainer-config-file> --env=<env_name> --run-id=<run-identifier>

    use the full path or the relative path to your env_name and add the exe file in the env_name

    you should find all the infos here: https://github.com/Unity-Technologies/ml-agents/blob/master/docs/Learning-Environment-Executable.md
     
unityunity