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. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

Question Agent kept moving although there was EndEpisode() there.

Discussion in 'ML-Agents' started by SkeVinc1, Jan 15, 2023.

  1. SkeVinc1

    SkeVinc1

    Joined:
    Oct 29, 2022
    Posts:
    4
    Recently, I'm training my robot arm agent. In one if sentence, I just let it print a message and then EndEpisode(). However, the result shows that although the message was printed, the robot arm didn't stop moving correspondingly but kept moving for a little bit while. I'm wondering why, isn't the agent stops moving immediately when it sees EndEpisode()??
    Thank you!!
     
  2. garytrickett

    garytrickett

    Joined:
    Sep 2, 2018
    Posts:
    62
    can you explain what you mean by "kept moving" - it'll stop making agent actions yes but rigidbody velocity and script updates etc will still be taking place
     
    SkeVinc1 likes this.
  3. SkeVinc1

    SkeVinc1

    Joined:
    Oct 29, 2022
    Posts:
    4
    Yeah, actually it was my fault. Since I've set up curriculum learning and in OnActionReceiver() I have if() else if() else if() else(), while in the first three parenthesis, I set environment parameter to 1, 2 and 3. Then, I discovered that when I loaded the onnx model, it actually went into the else(). So I set the parameter of the curriculum I want to run to 0 and it succeeded in Ending after printing out! Thanks.