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.

Official [Feedback Wanted] Shipping sample(s) with the ML-Agents C# Package

Discussion in 'ML-Agents' started by christophergoy, Mar 11, 2021.

  1. christophergoy

    christophergoy

    Unity Technologies

    Joined:
    Sep 16, 2015
    Posts:
    735
    Hi all,
    We want to inform you that we will ship the 3DBall example as a Sample in the com.unity.ml-agents C# package at version 1.9.0-preview. We want to ask you which samples you’d like to see included moving forward to understand which example environments our users find most useful.

    We want to note that there are a couple of tradeoffs to having more samples or fewer samples:
    1. The more samples we add to the package, the bigger the size of the package will be. This will impact install and download times when installing ml-agents from the package manager. On the other hand, having more samples means people can access more of what ML-Agents offers without cloning the git repository.

    2. Having a smaller set of samples will reduce download and install times but at the cost of having users need to leave the Unity Editor to explore more of what ML-Agents offers.
    Please help us figure what is important to you as our users by responding to this thread.
    Cheers!
    The ML-Agents Team.
     
    Last edited: Mar 30, 2021
  2. mamaorha

    mamaorha

    Joined:
    Jun 16, 2015
    Posts:
    44
    would be nice to see how you tackle turn based games where agent need to take multiple decisions (number of decisions is dynamicly changed based on situation) in 1 turn and be rewarded based on a full turn.
     
  3. TTrope

    TTrope

    Joined:
    Dec 7, 2014
    Posts:
    20
    I'd say the soccer example could cover tons of different uses cases (basic if only one player + goal, self play, coop, etc). However I would not like the samples to add some tags in my project, or have too many assets.
     
    shivani_1 likes this.
  4. Luke-Houlihan

    Luke-Houlihan

    Joined:
    Jun 26, 2007
    Posts:
    267
    Our use of
    ml-agents
    is heavily automated and pulls down the package fresh for every ephemeral training run. My opinion here is biased toward the package being as small as possible but I understand the want/need to keep it easy to use for beginners.

    Is there any way there could be 2 packages? Something like
    ml-agents
    , which contains a few examples and
    ml-agents-lite
    which has only the core necessities?
     
    Last edited: Mar 30, 2021
    AngrySamsquanch likes this.
  5. christophergoy

    christophergoy

    Unity Technologies

    Joined:
    Sep 16, 2015
    Posts:
    735
    Hey @Luke-Houlihan, I understand your concern over package size. Where are you "pulling the package down" from?
     
  6. Luke-Houlihan

    Luke-Houlihan

    Joined:
    Jun 26, 2007
    Posts:
    267
    The default pip repo, PyPi. I suppose I could cache the latest locally and strip the examples but that kind of defeats the purpose.
     
  7. christophergoy

    christophergoy

    Unity Technologies

    Joined:
    Sep 16, 2015
    Posts:
    735
    The samples wouldn't live in PyPi, they would live in the C# package. Sorry if that wasn't clear. I can update the text of the thread
     
  8. Luke-Houlihan

    Luke-Houlihan

    Joined:
    Jun 26, 2007
    Posts:
    267
    Ohh! My bad, I misunderstood that :eek:. Thanks for the clarification!
     
  9. AlainGao

    AlainGao

    Joined:
    Mar 27, 2020
    Posts:
    1
    Hello, I have some request about ML-Agents.
    1. I want to set Behavior Parameters dynamic, so that I can switch mode in running.
    2. Could you add interface to get necessary information from sensors? I want to read RayPerceptionOutput.RayOutput from RayPerceptionSensorComponent2D so that I can dynamic programing, but I found there is no interface.
     
  10. GamerLordMat

    GamerLordMat

    Joined:
    Oct 10, 2019
    Posts:
    121
    Maybe I am just incompetent but I needed like 30 minutes to find the examples on the github site.
    Some kind of quick access over the package manager would be cool, IMO.
    Otherwise bc of Cloud ports and similar applications I personally would minimize the amount of examples in the standard mlagents. I have one Unity Project opened with all the examples; that works just fine for me.

    What I personally also miss is some kind of tutorial which elobarates the implementation details a little bit of the examples. E.g. I still have no clue how exactly the joint forces work in the walker example.

    Otherwise thanks for your work on mlagents, it makes so much fun and motivated me to start learning about Deep Neural Networks ;D
     
    BackgroundMover likes this.
  11. ChillX

    ChillX

    Joined:
    Jun 16, 2016
    Posts:
    145
    1. 3D Ball - (Simplest example)
    2. Soccer - (Covers many use cases especially competitive and self play)
    3. Push Block Plus the Collab version (Covers Collab with POCA)
    4. Pyramids or DungeonEscape (Covers Sparse rewards and curiosity very well)

    Each one covers a different use case.
    Honestly though I would almost include them all if that's an option. Each one covers a completely different use case.
     
    Last edited: Mar 16, 2022
  12. hughperkins

    hughperkins

    Joined:
    Dec 3, 2022
    Posts:
    115
    I concur with those suggesting moving the examples to a different repo.

    I suppose the main issue you are concerned about is that the versions need to match? But that's not I feel an insurmountable issue. e.g. specify very clearly somewhere which version, or branch, or git commit hash we should run against when using that example at that commit. eg

    mlagents-examples repo:
    - commit abweew
    --- README.md Please use mlagents `release_20`
    - commit wewrgrg
    --- README.md Please use mlagents `release_20`
    - commit sdewfg
    --- README.md Please use mlagents `release_19`
    ...
     
  13. hughperkins

    hughperkins

    Joined:
    Dec 3, 2022
    Posts:
    115
    (I suppose one other issue you guys are considering, that you aren't actually stating, is that maintaining tons of environments increases the cost of maintenance, and reduces agility of the overall code-base?)