The individual fitness evaluation function

This function is an essential part of the population fitness evaluation, and it is invoked from the eval_genomes function, discussed earlier, to evaluate the maze-solving performance of each genome in the population.

The evaluation of the individual genome as a maze-solving agent through the maze navigation simulation is as follows:

def eval_individual(genome_id, genome, genomes, n_items_map, config):    n_item = archive.NoveltyItem(                        generation=trial_sim.population.generation,                        genomeId=genome_id)    n_items_map[genome_id] = n_item    maze_env = copy.deepcopy(trial_sim.orig_maze_environment)    control_net = neat.nn.FeedForwardNetwork.create(genome, config)    goal_fitness = maze.maze_simulation_evaluate( env=maze_env, ...

Get Hands-On Neuroevolution with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.