Create population object
This commit is contained in:
parent
2c7ffe39a3
commit
42e33b0399
|
@ -1,13 +1,10 @@
|
||||||
import argparse
|
import argparse
|
||||||
from individual import Individual
|
from population import Population
|
||||||
|
|
||||||
args = argparse.ArgumentParser()
|
args = argparse.ArgumentParser()
|
||||||
args.add_argument("pop", help="Population size", type=int)
|
args.add_argument("pop", help="Population size", type=int)
|
||||||
args = args.parse_args()
|
args = args.parse_args()
|
||||||
|
|
||||||
population = []
|
pop = Population(10)
|
||||||
|
|
||||||
for current in range(0, args.pop):
|
print("%d" % pop.fitness_function())
|
||||||
population.append(Individual())
|
|
||||||
|
|
||||||
print(len(population))
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user