Answers.Body: <p>Seem like time is a good fitness, though you need it to engage into learning side sensor inputs and side movement.</p>
  
  <p><strong>I would consider adding a bit of randomness to the environment.</strong> How about adding some random mild forces that might sway it left, right, front and rear a bit so that that bots are forced to use other sensors and inputs to stay in the center.</p>
  
  <p>In cases when drone is not simulated, this task is a little harder but adding randomness to the environment can still be done. For example, tilt your drone a tiny amount in a random direction at random intervals. This will force your drone to learn to correct for being jostled by wind, without you having to actually produce wind.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-06T21:37:14.147Z
Answers.LastActivityDate: 2018-03-06T23:39:13.210Z
Answers.LastEditDate: 2018-03-06T23:39:13.210Z
Answers.UserDisplayName: Alexus
Body: <p>I am working on a project in which a drone needs to learn how to fly. I am using <a href="https://en.wikipedia.org/wiki/Neuroevolution_of_augmenting_topologies" rel="nofollow noreferrer">NEAT</a>.</p>
  <p>For the first experiment, I want the drone to learn how to hover inside a <span class="math-container">$3 \times 3 \times 3$</span> meters box. My input is 6 sensors for each direction.  The output is the same as in a drone, so thrust (normalized to 0-1), aileron, rudder, and elevator.</p>
  <p>Initially, I just used the time as the fitness; and, after many generations, it hovers inside the box.  However, it only really learns to use the thrust in the function of up and down sensors, but it never learns to react to input from other sensors because they are not directly connected to the fitness.</p>
  <p>So, what can I do to improve the performance of my model? Should the drone be put to fly a track with obstacles? Should I have some more input data? Should I define fitness to better reflect good reactions for input sensor data?</p>
  <p>NOTE: the drone uses relatively accurate physics, I am able to do tasks using a controller.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-09-06T18:20:00.407Z
Comments.Text: So, if I understand the question properly, fitness evaluation is currently restricted to maintaining vertical position (up/down thrust)?
Comments.UserDisplayName: DukeZhou
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-09-06T20:37:23.853Z
Comments.Text: No, fitness is just time. The problem is that that way it favours the units that only use thrust (the spawn point is in the center of the cube), the result is that it never learns to react for input from other sensors because any species that would go out of center would need to learn to react to side sensors and counter steer but those species extinct because they crash early (much quicker than ones that hover in the middle of the box using just thrust).
Comments.UserDisplayName: smallbit
Tags: <neural-networks><neat><neuroevolution><fitness-functions><fitness-design>
Title: How to improve the performance of my model trained with NEAT for a drone to learn how to fly?
UserDisplayName: smallbit
ThreadText: # How to improve the performance of my model trained with NEAT for a drone to learn how to fly?
  
  (Asked by: username_0 on 2017-09-06)
  
  I am working on a project in which a drone needs to learn how to fly. I am using [NEAT](https://en.wikipedia.org/wiki/Neuroevolution_of_augmenting_topologies).
  
  For the first experiment, I want the drone to learn how to hover inside a $3 \times 3 \times 3$ meters box. My input is 6 sensors for each direction. The output is the same as in a drone, so thrust (normalized to 0-1), aileron, rudder, and elevator.
  
  Initially, I just used the time as the fitness; and, after many generations, it hovers inside the box. However, it only really learns to use the thrust in the function of up and down sensors, but it never learns to react to input from other sensors because they are not directly connected to the fitness.
  
  So, what can I do to improve the performance of my model? Should the drone be put to fly a track with obstacles? Should I have some more input data? Should I define fitness to better reflect good reactions for input sensor data?
  
  NOTE: the drone uses relatively accurate physics, I am able to do tasks using a controller.
  
  **Tags:** neural-networks, neat, neuroevolution, fitness-functions, fitness-design
  > **Comments:**
  > **username_1**: So, if I understand the question properly, fitness evaluation is currently restricted to maintaining vertical position (up/down thrust)?  
  > **username_0**: No, fitness is just time. The problem is that that way it favours the units that only use thrust (the spawn point is in the center of the cube), the result is that it never learns to react for input from other sensors because any species that would go out of center would need to learn to react to side sensors and counter steer but those species extinct because they crash early (much quicker than ones that hover in the middle of the box using just thrust).  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2018-03-06. Score: 1
  
  Seem like time is a good fitness, though you need it to engage into learning side sensor inputs and side movement.
  
  **I would consider adding a bit of randomness to the environment.** How about adding some random mild forces that might sway it left, right, front and rear a bit so that that bots are forced to use other sensors and inputs to stay in the center.
  
  In cases when drone is not simulated, this task is a little harder but adding randomness to the environment can still be done. For example, tilt your drone a tiny amount in a random direction at random intervals. This will force your drone to learn to correct for being jostled by wind, without you having to actually produce wind.
  
  
  ---
  
  