Darwin Neuroevolution Framework
Public Member Functions | List of all members
drone_follow::DroneFollow Class Reference

Domain: Drone Follow. More...

#include <domain.h>

Inheritance diagram for drone_follow::DroneFollow:
darwin::Domain core::NonCopyable

Public Member Functions

size_t inputs () const override
 Number of inputs to a Brain.
 
size_t outputs () const override
 Number of outputs from a Brain.
 
bool evaluatePopulation (darwin::Population *population) const override
 Assigns fitness values to every genotype. More...
 
- Public Member Functions inherited from darwin::Domain
virtual unique_ptr< core::PropertySetcalibrateGenotype ([[maybe_unused]] const Genotype *genotype) const
 Optional: additional fitness metrics (normally not used in the population evaluation, ie a test set)
 

Detailed Description

Domain: Drone Follow.

Follow another drone while keeping close to a fixed distance. The target drone is tracking a random path.

drone_follow_sandbox.png

Inputs

The inputs are handeled through DroneController

  1. Camera: the color channels from the drone's camera, plus optionally the depth channel.
  2. Touch sensor (optional)
  3. Compass (optional)
  4. Accelerometer (optional)

Outputs

Output Value
0,1 force vector (x, y) applied to the drone
2 torque applied to turn the drone

Member Function Documentation

◆ evaluatePopulation()

bool drone_follow::DroneFollow::evaluatePopulation ( darwin::Population population) const
overridevirtual

Assigns fitness values to every genotype.

Having a good fitness function is a key part of evolutionary algorithms:

  • Perhaps obvious, the fitness value should accurately estimate the quality of a particular solution
  • A "smooth" distribution is preferable since it provides a gradient which can guide the incremental search in the solutions space. (ex. if most fitness values are 1.0 or 0.0 it's hard to know which genotypes are good candidates for reproduction)
Returns
true if the evolution goal was reached

Implements darwin::Domain.


The documentation for this class was generated from the following files: