From 6ee3e9f2f27cf3efe2f5cf5ffb909bbf6715f42e Mon Sep 17 00:00:00 2001 From: Daniel Wilczak Date: Mon, 21 Sep 2020 14:23:17 -0400 Subject: [PATCH] Redesign of readmes code showing --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 689eb05..1788ebe 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,10 @@ Chromosome_length = 10 # Create the Genetic algorithm ga = EasyGA.GA(Population_size, Chromosome_length,user_gene_function) ga.initialize() +``` +## Getting your genes and chromosomes from the population: +```Python # Looking to print the first Chromosome ga.population.chromosomes[0].print_chromosome() @@ -48,9 +51,9 @@ print(f"my_chromosome: {my_chromosome}") # Looking to get the data of one gene in the chromosome my_gene = ga.population.chromosomes[0].genes[0].get_value() print(f"my_gene: {my_gene}") - ``` -## Ouput + +# Ouput: ```Python [99],[30],[59],[77],[68],[57],[14],[92],[85],[27]