Search Unity

Observation Ray-cast

Discussion in 'ML-Agents' started by cabesd, Jun 24, 2020.

  1. cabesd

    cabesd

    Joined:
    Feb 4, 2020
    Posts:
    6
    Hi all,
    The question I have is just to re-confirm my findings.

    So if I use an environment (say from the examples folders given in the MLAgents repo) that uses ray casts as their observations, seems to be necessary to have the rendering ON (no_graphics parameters for the UnityEnvironment instantiation)?

    In other words, if I turn off rendering, the received observations are all garbage or what are they? I'm running on the cloud thus I have the rendering off and I intuitively think that no rendering will make the environment less computationally expensive (is that true also?).

    Thanks in advance.
     
  2. MrWetsnow

    MrWetsnow

    Joined:
    Jan 5, 2020
    Posts:
    60
    Based on answers in other threads, you can only use the no-graphics parameter if you are NOT doing ray casting.
     
  3. ervteng_unity

    ervteng_unity

    Unity Technologies

    Joined:
    Dec 6, 2018
    Posts:
    150
    You CAN turn off graphics (using --no-graphics) when using raycasts (very useful for server training!). However, if you're using Camera or RenderTexture observations, turning off rendering will cause an error.
     
    ailuropoda0 likes this.
  4. cabesd

    cabesd

    Joined:
    Feb 4, 2020
    Posts:
    6
    Got it. Thanks ervteng for the clarification.

    Following what you are saying, then using Camera or RenderTextures with --no-graphics will cause an explicit runtime error (environment to stop running) or the environment will run normally and we would have implicit problems with the learning?

    Many thanks.
     
  5. ervteng_unity

    ervteng_unity

    Unity Technologies

    Joined:
    Dec 6, 2018
    Posts:
    150
    I believe it will cause an explicit runtime error and the game will either freeze/crash. But haven't tested it in a while.
     
  6. MrWetsnow

    MrWetsnow

    Joined:
    Jan 5, 2020
    Posts:
    60
    Thank you for the clarification :)