Open Chocolatechip347 opened 4 years ago
you can use the p.run(eval_genomes, num_of_generations) winner = p.run(eval_genomes, num)
you can use the p.run(eval_genomes, num_of_generations) winner = p.run(eval_genomes, num)
I have also run into this problem. My program only runs once then it stops. Not sure why
I have same issue too.
hello, I worked with your code but tried to implement it online using pyautogui. however I have a issue with it not moving to the next generation and I don't have any idea how to do that. this is done on flappy bird.io by the way
import neat import pyautogui import os import time import numpy '''
distance between top pipe and bottom pipe is pipe y- bird y if two y's then closest to bird # location of gap
fitness function is time since starting
for fitness function
a = time.time() called when starting b = time .time() called when dead (b-a) = time of flight for bird '''
5 seconds to first pipe
just needs a if bird y = on bottom of screen
def main(genomes, config): for x in range(0,1):
def run(config_file): config = neat.config.Config(neat.DefaultGenome, neat.DefaultReproduction, neat.DefaultSpeciesSet, neat.DefaultStagnation, config_file)
if name == "main": local_dir = os.path.dirname(file) config_path = os.path.join(local_dir, 'neat-config.txt') run(config_path)