Search Unity

A very simple RL project with ML-Agents, without Unity IDE

Discussion in 'ML-Agents' started by RankNFyle, Mar 21, 2021.

  1. RankNFyle

    RankNFyle

    Joined:
    Jan 4, 2021
    Posts:
    31
    I have a very simple (graphically) RL test project: just drawing 2D lines on white canvas (using Python image libs like Pillow). For certain reasons, I want to do this with ML-Agents. Due to the simplicity, there's no need to use Unity's IDE. Question: can I use ML-Agents for RL training directly, so that I define the simple environment (2D lines) and provide any observations, without Unity's IDE? Python and AI skills are not an issue, handling the 2D-line environment in Python is not a problem. The issue is: how would I interface my simple environment with ML-Agents for RL-training? I'm aware the "headless" mode, but, as I understand it, it still relies on Unity to set up the environment.
     
  2. christophergoy

    christophergoy

    Unity Technologies

    Joined:
    Sep 16, 2015
    Posts:
    735
    Hi @RankNFyle,
    I believe you would need to Implement your own Environment Class to be able to do this. I don't think you are limited in any way other than UnityEnvironment is just one environment that is implemented and comes with the toolkit.
     
  3. RankNFyle

    RankNFyle

    Joined:
    Jan 4, 2021
    Posts:
    31
    Thanks, Christopher. Just to clarify: if I implement my own Environment Class in ML-Agents, Unity IDE will not be needed at any stage of the project, correct?
     
  4. christophergoy

    christophergoy

    Unity Technologies

    Joined:
    Sep 16, 2015
    Posts:
    735
    Correct, the UnityEnvironment class is made specifically to interact with the Unity Editor or a Unity Player.

    you are free to implement your own environment that isn’t tied to unity.