December 2019
Intermediate to advanced
368 pages
11h 10m
English
The callback function to evaluate the fitness scores of all genomes belonging to a particular population of organisms is implemented as follows:
def eval_genomes(genomes, config): for genome_id, genome in genomes: genome.fitness = eval_fitness(genome_id, genome, config)
The eval_fitness(genome_id, genome, config) function evaluates the fitness of a specific genome by running the maze-solving simulation against the solver agent controlled by the ANN encoded with this genome. The implementation of this function is not provided here as it has already been discussed in this chapter.
Read now
Unlock full access