Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Train agent with dynamic obstacles

Discussion in 'ML-Agents' started by ybuyuk, May 24, 2022.

  1. ybuyuk


    Jan 4, 2022

    For my project I generate collision-free paths for 2 agents from a central planner. The objective is for my agents to learn to go down their routes without colliding. The goal of the project is for the agents to learn to adjust their movement/speed/rotation etc whilst following their routes and avoiding collisions.

    I've tried many different things but I keep circling around.

    How do I train my agents so they treat the others as their dynamic obstacles? All agents should share the same behaviour as I want to copy/paste the behaviour in more agents later to be able to scale.

  2. JcsilvaPT999


    Apr 8, 2020
    Hey, I'm new with MLAgents but can't you check the distance between them, and depending on that if the agents are close you start penalizing them?
    ybuyuk and iffalseelsetrue like this.
  3. iffalseelsetrue


    May 3, 2018
    I have a feeling that this is one of the collaboration scenarios, maybe check out the PUSHBLOCKCOLLAB example.

    because the agents need to work together to achieve something, if you setup the model like this example using POCA, you can loop through all agents to check their distance to each other, and when it's too close, you penalize them like what JcsilvaPT999 is suggesting.
    ybuyuk likes this.