I'm developing a game using PyGame and trying to show info on the screen while the AI is learning, one of the info I want to show is the generation number next to the genome number (i got the genome number already) but still I can't find a way to get the generation number.
I looked into the NEAT library files and found this function
def start_generation(self, generation):
self.generation = generation
print('\n ****** Running generation {0} ****** \n'.format(generation))
self.generation_start_time = time.time()
always have the output first when the algorithm starts, but i can't find a way to catch the generation number.
Also tried getting it from the console then format the string after the start_generation()
output is printed, but didn't work