Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Help Wanted Questions about Flight AI

Discussion in 'ML-Agents' started by insane245, May 1, 2021 at 12:52 AM.

  1. insane245

    insane245

    Joined:
    Jun 28, 2016
    Posts:
    7
    Hi all, I’m trying to make a flight AI that follows a target but I’m having trouble. I figured I would set the reward = distance from target at the end of each episode. But after over 1M steps all the planes do is loops. If they collide with the ground they lose 100 points. I’m confused why the AI hasn’t improved. I’ve tried random positioning, rotation, 1 target, random targets, and still nothing. I’ve also tried imitation learning. Is there a reason why SetReward() is adding to each self? I tried calling it each step, thinking it would override the Cumulative reward but it’s adding to itself. Does anyone have any ideas of how I can get this working? Thanks :)
     
  2. LexVolkov

    LexVolkov

    Joined:
    Sep 14, 2014
    Posts:
    58
    What Observations information do agents receive? and what can they do?
     
  3. insane245

    insane245

    Joined:
    Jun 28, 2016
    Posts:
    7
    Hi @LexVolkov , I observe the distance and dot product of the gameobject and target gameobject, as well as the transform positions and rotations of both. The agent can pitch up, down, or do nothing. As well as roll left, right, or none. I keep messing with the reward values but nothing seems to be improving 12+ hours into training.

    Edit: There are also RaycastSensors. One pointing down and one forward with about 10 rays each in an arc
     
    Last edited: May 1, 2021 at 9:36 PM
unityunity