Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Is it possible to do in game agent training?

Discussion in 'ML-Agents' started by nothingabsolute, Dec 22, 2020.

  1. nothingabsolute

    nothingabsolute

    Joined:
    Dec 22, 2020
    Posts:
    1
    Hi,
    First post, so bear with me if its a stupid questions, but would it be possible to implement an ml agent that "learns" new behaviors and updates its model during game play with novel player interactions? A reward token might be explicitly provided to the agent by the player, or success somehow inferred?.
    If the amount of training needed is prohibitively large, then perhaps many players can collectively train one agent?
     
  2. akTwelve

    akTwelve

    Joined:
    Oct 7, 2013
    Posts:
    8
    ML-Agents are trained using Python (external to Unity), so you would not be able to package that up and deploy it to a user's device. It's theoretically possible, if you implemented training in C#, but that seems like a huge task and the fact that the ML-Agents dev team hasn't done it yet is probably a sign of how difficult that would be. Also, the benefit of simulation is being able to run at 20x speed with many agents in parallel. Adding a human in the loop would just slow it down A LOT.
     
  3. Denaton

    Denaton

    Joined:
    Apr 6, 2011
    Posts:
    16
    I believe this will be possible with ML-Agent Cloud, its currently in closed preview but there is a signup.
     
    Last edited: Dec 30, 2020
  4. ervteng_unity

    ervteng_unity

    Unity Technologies

    Joined:
    Dec 6, 2018
    Posts:
    150
    Being able to update models in-game is definitely something of interest to us. There isn't yet a supported pipeline to do so, but there's no reason you couldn't push a new neural network model to a live game build using something like Remote Settings. The player data collection, however, would have to be done manually and with some amount of custom game and Python code.
     
    docchang, Ukyuu and AngrySamsquanch like this.
  5. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,824
    There are doesn't of NN solutions on the Internet. Some links to sources on YouTube, other on git.
    Is worth to pick some and test them. Or write own, if up for challange. :)

    Requirements of python and lack of training possibility on clients side, is one big reason for me, I decided not to use Unity ML in my projects, however cool it may be. Sure, for others it may work perfectly as desired.
     
  6. docchang

    docchang

    Joined:
    Jan 30, 2014
    Posts:
    8
    Any updates on this topic? Are there solutions out there to train a .nn model via your current mobile users and then once it is generated and tested, it can then upload it to Remote Config and update all the users?
     
    Last edited: Nov 19, 2023
  7. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,824
    As far I am aware, nothing changed and perhaps nothing will change anytime soon on that field.
    You can see requirement for training ML agents.
    Which in short, requires python.

    https://github.com/Unity-Technologies/ml-agents/blob/develop/docs/Installation.md

    Main project
    https://github.com/Unity-Technologies/ml-agents/tree/develop