Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

ML Agents don't work in WEB GL build

Discussion in 'ML-Agents' started by tutahexe, May 26, 2020.

  1. tutahexe

    tutahexe

    Joined:
    May 12, 2020
    Posts:
    4
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,810
    Hey there. I'll kick this over to the team to check out. Which version of ML Agents, Python, and the editor are you using?
     
  3. tutahexe

    tutahexe

    Joined:
    May 12, 2020
    Posts:
    4
    I found root cause. There was a missconfiguration.
    Thanks for Repply!
    Topic can be closed - all works fine :)
     
    maxkcy likes this.
  4. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,810
    Happy to hear it! Thanks!
     
  5. Mikeramczyk1977

    Mikeramczyk1977

    Joined:
    Jul 12, 2020
    Posts:
    58
  6. Mikeramczyk1977

    Mikeramczyk1977

    Joined:
    Jul 12, 2020
    Posts:
    58
    I am having the same issue, I saw a few textures that got all wonkie, I will go through and fix those, by swapping out the textures for something else, but the real issue is that My ML Agents don't work when I upload to WebGL. I don't know what to do...
     
    Gantrex likes this.
  7. Mikeramczyk1977

    Mikeramczyk1977

    Joined:
    Jul 12, 2020
    Posts:
    58
    Also, the ML Agents are half retarded and bump into each other, and go backwards.
     
  8. cp1184

    cp1184

    Joined:
    Jul 23, 2020
    Posts:
    1
    What was the miss-configuration?
     
    Gantrex likes this.
  9. Darknight747

    Darknight747

    Joined:
    Aug 14, 2020
    Posts:
    5
    Also having the same issue - ML agents not working in Unity karting Microgame (Aug 2020) when built for WebGL, but working fine in 2019.4 LTS editor.
    Using the pre-packaged, pre-trained AI Agents that came with the Aug 2020 Karting microgame.

    @TreyK-47 and @tutahexe ...
    Any solutions on this you guys can share?
     
    Gantrex and TomoTT like this.
  10. Deleted User

    Deleted User

    Guest

    What was it exactly? Care to share how you have solved it exactly?
     
  11. WizzGames

    WizzGames

    Joined:
    Sep 16, 2020
    Posts:
    4
    It would be helpful to say what the solution was? What configuration needs to be changed exactly?

    @tutahexe


    @hat_Guy

    Did you find a solution? I've read somewhere that ML_agents are not supported in WEBGL but I'm not sure if that's true.
     
    Last edited: Sep 24, 2020
  12. WizzGames

    WizzGames

    Joined:
    Sep 16, 2020
    Posts:
    4
    Last edited: Nov 7, 2020
    Darknight747 and Deleted User like this.
  13. Seydjinn

    Seydjinn

    Joined:
    Nov 3, 2020
    Posts:
    3
    If anyone is still looking, I found the solution on the Karting Creator group - https://connect.unity.com/g/karting-creators :

    "Youtube Link:

    The issue came up around 2:59:53.
    Three things you've got to do :
    1. Package Manager > Barracuda > Update to version 0.6.3 (Works with WebGL)
    2. Search for KartGame.ai in the Project window (should be the KartGame.ai import settings file) > Enable WebGL in the Platforms section
    3. Search for MLAgentsToolkit in the Project window (once again, should show as Import Settings) > Enable WebGL in the Platforms section This should sort it out, as you just need Unity to be allowed to build the ML agents for WebGL.
     
  14. Shraeyas

    Shraeyas

    Joined:
    Nov 10, 2017
    Posts:
    1
    I am facing the same issue with Unity2021.3. Can anyone please help? The problem is only happening for WebGL Builds.