22 assuming the code works at first try I think I have the most important parts for the genetic AI.
I have a system in place to generate 100 lists (also called Genomes) with 4 to 8 genes.
I have a system in place that allows the rest of the program to grab a genome and let it make decisions.
When the game needs a new genome the old one gets its fitness score calculated.
I have a way to sort genomes based on their fitness.
I have a way to "breed" genomes and a way to remove the bad ones to make room for the new children.
I also have a way to mutate all genomes in the current population.
Currently I do see 1 major problem though, when a genome mutates to get a new gene it will most likely become much worse as the every gene after the new one stops lining up correctly. So, I may need to insert more genes at once or put a system in place that reduces the chance of genomes that recently mutated to gain an extra gene from being culled right away.
Maybe I can make the gene count important for the fitness score? Because, lets be honest the more genes a genome has the more actions it can prepare before it will be forced to loop.
I have a system in place to generate 100 lists (also called Genomes) with 4 to 8 genes.
I have a system in place that allows the rest of the program to grab a genome and let it make decisions.
When the game needs a new genome the old one gets its fitness score calculated.
I have a way to sort genomes based on their fitness.
I have a way to "breed" genomes and a way to remove the bad ones to make room for the new children.
I also have a way to mutate all genomes in the current population.
Currently I do see 1 major problem though, when a genome mutates to get a new gene it will most likely become much worse as the every gene after the new one stops lining up correctly. So, I may need to insert more genes at once or put a system in place that reduces the chance of genomes that recently mutated to gain an extra gene from being culled right away.
Maybe I can make the gene count important for the fitness score? Because, lets be honest the more genes a genome has the more actions it can prepare before it will be forced to loop.