Iterate 1000 times and print
This commit is contained in:
parent
328064cb7c
commit
ecd8e35888
|
@ -7,8 +7,7 @@ args = args.parse_args()
|
|||
|
||||
pop = Population(args.pop)
|
||||
|
||||
for i in range(0, 5000):
|
||||
for i in range(0, 1000):
|
||||
pop.advance_generation()
|
||||
best = pop.best_fitness()
|
||||
print("Best fit:\tx:%e,\ty:%e\tf:%e" % (best.x, best.y, best.fitness()))
|
||||
print("Average fit:\t%e\n" % pop.avg_fitness())
|
||||
print(pop)
|
||||
|
|
Loading…
Reference in New Issue
Block a user