Darwin Neuroevolution Framework
|
Domain: Locate the maximum value in an array. More...
#include <max.h>
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... | |
![]() | |
virtual unique_ptr< core::PropertySet > | calibrateGenotype ([[maybe_unused]] const Genotype *genotype) const |
Optional: additional fitness metrics (normally not used in the population evaluation, ie a test set) | |
Domain: Locate the maximum value in an array.
This is a minimalist problem intended to evaluate a population's ability to evolve basic memory facilities: locate the maximum value in an array of integers.
This deceptively simple problem requires the emergence of a few capabilities:
Input | Value |
---|---|
0 | left_antenna (1.0 if the the agent is positioned at the left edge) |
1 | right_antenna (1.0 if the the agent is positioned at the right edge) |
2 | input_value |
Output | Value |
---|---|
0 | move_left |
1 | move_right |
2 | done (Accept current position as the final answer) |
The largest output signal determines the agent's action at the current step.
|
inlineoverridevirtual |
Assigns fitness values to every genotype.
Having a good fitness function is a key part of evolutionary algorithms:
true
if the evolution goal was reached Implements darwin::Domain.