December 2019
Intermediate to advanced
368 pages
11h 10m
English
At the beginning of this part, we create the intermediate variables to hold the execution results and create the statistics collector (Statistics). After that, we execute the evolution loop for the number of generations specified in the n_generations parameter:
start_time = time.time() best_genome_ser = None best_ever_goal_fitness = 0 best_id = -1 solution_found = False stats = Statistics() for generation in range(n_generations):
Within the evolution loop, we obtain the list of genomes belonging to the population at the current generation and evaluate all genomes from the list against the test environment as follows:
genomes = NEAT.GetGenomeList(pop) # evaluate genomes ...
Read now
Unlock full access