Darwin Neuroevolution Framework
|
Domain: Tic-tac-toe More...
#include <tic_tac_toe.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: Tic-tac-toe
Classic tic-tac-toe game on a 3x3 grid.
All the population members participate in a tournament and the outcomes are used to calculate the individual fitness values.
Input | Value |
---|---|
0..8 | board square value (0 = empty, 1 = own, -1 = opponent) |
If Config::ann_type == AnnType::Value, then:
Output | Value |
---|---|
0 | preference signal for the input board configuration |
If Config::ann_type == AnnType::Policy, then:
Output | Value |
---|---|
0..8 | preference signal for selecting the corresponding move square |
|
overridevirtual |
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.