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.
  2. Dismiss Notice

State Space Constrains/Bounds?

Discussion in 'ML-Agents' started by leo2r, Jun 15, 2022.

  1. leo2r


    Mar 14, 2022

    I'm developing an environment where the agent moves objects around. Is there a way to set constraints on the state space? Eg. set a minimum and maximum local position the agent can take? I'm asking because I don't want the agent to just move the object to the left for infinity for example. So far I've placed walls to delimit the area and use a collider to reset the episode, but this seems a bit silly and is also affecting my camera sensors as the walls are in some of their field of view. I've scoured the documentation and forums but haven't found anything of the sort but I'd be surprised if it hasn't come up before?

    Thanks in advance :)
  2. Zibelas


    Aug 1, 2017
    You could just add a negative reward if the agent moves too far away from it to prevent it going too much.
    Invisible walls would solve at least the camera problem.
    And as for the move infinite to the left moving, that is way usually each step should have a cost and a max step amount.