Search Unity

RequestDecision() does not always call Heuristic() in Heuristic mode

Discussion in 'ML-Agents' started by ailuropoda0, Jan 6, 2021.

  1. ailuropoda0

    ailuropoda0

    Joined:
    Feb 26, 2020
    Posts:
    9
    I have implemented a user control in Heuristic() of my sub-Agent class.

    Unlike a training or inference mode, where the delay between decisions is allowed or required,
    a seamless control is required in a heuristic mode.

    I called RequestDecision() in Update(), but Heuristic() is not always called in RequestDecision().
    When I put the log on Heuristic() and the line to call RequestDecision(), Heuristic() is called every 1~5 RequestDesicion() calls.
    So I can feel the input delay when I play in a Heuristic mode.

    Is it intended not to call always Heuristic() in RequestDecision() in a heuristic mode?
     
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,820
    Let me bounce this off the team for a bit of insight.
     
  3. andrewcoh_unity

    andrewcoh_unity

    Unity Technologies

    Joined:
    Sep 5, 2019
    Posts:
    162
    Hi @ailuropoda0

    One way you can achieve this is by reducing the decision interval in the DecisionRequester to 1 when in heuristic mode.