pulsatrix
Loading...
Searching...
No Matches
neat_xor_fitness.hpp File Reference

XOR fitness function for NEAT – Stanley & Miikkulainen 2002's own validation task, chosen here for the same reason it was chosen there: XOR is the canonical not-linearly-separable problem, so a genome that solves it starting from a fully connected (no-hidden-node) minimal topology has genuinely grown new structure to do so, not merely tuned weights on an already-sufficient network shape. More...

#include <array>
#include <vector>
#include "pulsatrix/neat_genome.hpp"
#include "pulsatrix/neat_phenotype.hpp"
Include dependency graph for neat_xor_fitness.hpp:

Go to the source code of this file.

Namespaces

namespace  pulsatrix
 

Functions

double pulsatrix::XORFitness (const NEATGenome &genome)
 Evaluates genome's phenotype on all four XOR patterns ((0,0)->0, (0,1)->1, (1,0)->1, (1,1)->0, in that order) and scores it as 4.0 minus the sum of squared errors – a perfect fit scores 4.0; a genome producing exactly 0.5 for every pattern (e.g. a fresh, all-zero-weight genome, before any weight differentiation has emerged) scores exactly 3.0 (4.0 - 4*0.25).
 

Detailed Description

XOR fitness function for NEAT – Stanley & Miikkulainen 2002's own validation task, chosen here for the same reason it was chosen there: XOR is the canonical not-linearly-separable problem, so a genome that solves it starting from a fully connected (no-hidden-node) minimal topology has genuinely grown new structure to do so, not merely tuned weights on an already-sufficient network shape.