Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question It is very different from when the agent learned movement.

Discussion in 'ML-Agents' started by AR-Bridge, Dec 14, 2022.

  1. AR-Bridge

    AR-Bridge

    Joined:
    Nov 13, 2013
    Posts:
    5
    I am developing a drone ai.

    Strangely, by the time the learning is completed, the agent's behavior works as well as I intended.

    However, if the onnx file is applied after learning, it does not behave like the behavior that appeared at the time of learning.

    When I saw the article that the time scale could cause problems, I set the time scale to 1 and tried learning, but there was no difference. Has anyone experienced this before?
     
  2. GamerLordMat

    GamerLordMat

    Joined:
    Oct 10, 2019
    Posts:
    185
    most likely you have a bug in your code when applying your agent, I've never experienced something similar. Do you surely use the newest, right onnx file?
     
  3. AR-Bridge

    AR-Bridge

    Joined:
    Nov 13, 2013
    Posts:
    5
    I'm sorry for the late reply. The situation was simple. The time scale was 20 while learning, so it seemed to be working well. When actual onnx was applied and executed, the time scale was 1, so it looked different. Anyway, I am fundamentally worried because learning does not show the shape I want.
     
  4. hughperkins

    hughperkins

    Joined:
    Dec 3, 2022
    Posts:
    191
    do your various update and fixedupdate methods scale changes by Time.deltaTime and Time.fixedDeltaTime? (forces dont need this, but anything involving direct changes to transform.position etc does; any changes to forces need to go in fixedupdate, NOT in update, otherwise they'll get called different numbers of times, depending on how fast you run, the load on your computer ,etc.