Search Unity

Need a Clarification on function sequences

Discussion in 'ML-Agents' started by DeshanGunarathna, Mar 30, 2022.

  1. DeshanGunarathna

    DeshanGunarathna

    Joined:
    Jan 19, 2022
    Posts:
    16
    When I built my agent using ML-Agents, I didn't use a decision requestor component. Instead I used the in-built RequestDecision() function to get a decision. My question is what is the order of the functions are called.

    My thoughts that it was like something like this.(After an Episode Begin)

    RequestDesicion() -----> CollectObservations----> OnActionsReceived

    But I noticed that the CollectObservations function is being called even I am not requesting for a decision.
    So my questions are,

    1. What is the exact moment the CollectObservations is called?
    2. Does it affect my training if the function is being called even without request a Decision?

    I am using RequestDecision() only once during an Episode, but CollectObservation is called twice.

    3. Does the collectObservation function is called twice during an episode?

    upload_2022-3-30_14-8-7.png
    Here is the logs of functions called during a Heuristic mode. (Note that I haven't added a log to the Heuristic function & cannot access the RequestDecision, so the log on that was moment before it was being called)

    Most importantly I want to know is how does this affect my training on the Agent?
     
    Gibser likes this.