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

Action masking in binary case

Discussion in 'ML-Agents' started by HadisDev, Mar 6, 2022.

  1. HadisDev

    HadisDev

    Joined:
    Mar 2, 2022
    Posts:
    2
    Hi

    I am working with an agent that has both continuous and discrete action spaces. The action space is only a single action (drop items), and I only want the agent to be able to drop the items if it is at a certain location (in this case a drop station).

    In ml-agents you cannot do action masking in a binary case.

    Does this make sense or do I need to rethink the problem?
     
  2. TulioMMo

    TulioMMo

    Joined:
    Dec 30, 2020
    Posts:
    29
    I don´t think you need to use action masking in this case. You could set a state for the agent so it can differentiate between your drop station and other places. This way, when it drops its item in the correct location, the agent will start correlating the drop station "state" as a high value "state".

    I had really bad performance in the past trying to work with hybrid actions... Can you solve your problem using discrete actions only?