Full rewrite to update functionality
This commit is contained in:
@ -24,7 +24,7 @@ import EasyGA
|
|||||||
def user_gene_function():
|
def user_gene_function():
|
||||||
return random.randint(1, 100)
|
return random.randint(1, 100)
|
||||||
|
|
||||||
# Standard user size requirements
|
# Standard user size requirements:
|
||||||
Population_size = 10
|
Population_size = 10
|
||||||
Chromosome_length = 10
|
Chromosome_length = 10
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ Chromosome_length = 10
|
|||||||
ga = EasyGA.GA(Population_size, Chromosome_length,user_gene_function)
|
ga = EasyGA.GA(Population_size, Chromosome_length,user_gene_function)
|
||||||
ga.initialize()
|
ga.initialize()
|
||||||
|
|
||||||
# Looking at the first chromosome in the population
|
# Looking at the first chromosome in the population:
|
||||||
ga.population.chromosomes[0].print_chromosome()
|
ga.population.chromosomes[0].print_chromosome()
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user