4
$\begingroup$

I am working on a project in which a drone needs to learn how to fly. I am using NEAT.

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.

$\endgroup$
2
  • $\begingroup$ So, if I understand the question properly, fitness evaluation is currently restricted to maintaining vertical position (up/down thrust)? $\endgroup$
    – DukeZhou
    Sep 6 '17 at 18:20
  • 1
    $\begingroup$ 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). $\endgroup$
    – smallbit
    Sep 6 '17 at 20:37
1
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.