Darwin Neuroevolution Framework
Public Member Functions | List of all members
darwin::Domain Class Referenceabstract

Interface to a domain implementation. More...

#include <darwin.h>

Inheritance diagram for darwin::Domain:
core::NonCopyable ballistics::Ballistics car_track::CarTrack cart_pole::CartPole conquest::Conquest double_cart_pole::DoubleCartPole drone_follow::DroneFollow drone_track::DroneTrack drone_vision::DroneVision find_max_value::FindMaxValue harvester::Harvester pong::Pong test_domain::TestDomain tic_tac_toe::TicTacToe unicycle::Unicycle

Public Member Functions

virtual size_t inputs () const =0
 Number of inputs to a Brain.
 
virtual size_t outputs () const =0
 Number of outputs from a Brain.
 
virtual bool evaluatePopulation (Population *population) const =0
 Assigns fitness values to every genotype. More...
 
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

Interface to a domain implementation.

A domain defines a problem to be solved, including the environment for plugging in brains from a population (see Brain) and the rules for evaluating the fitness of the corresponding genotypes.

The brains are treated as black boxes with a domain-specific, fixed number of inputs and outputs (ie once the domain is configured the values for inputs and outputs will not change during a particular evolution run)

See also
Population
DomainFactory

Member Function Documentation

◆ evaluatePopulation()

virtual bool darwin::Domain::evaluatePopulation ( Population population) const
pure virtual

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

Implemented in unicycle::Unicycle, double_cart_pole::DoubleCartPole, cart_pole::CartPole, tic_tac_toe::TicTacToe, drone_follow::DroneFollow, ballistics::Ballistics, car_track::CarTrack, drone_track::DroneTrack, drone_vision::DroneVision, conquest::Conquest, find_max_value::FindMaxValue, pong::Pong, harvester::Harvester, and test_domain::TestDomain.


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