All of the mutation code after rebasing with reproduction and UI changes
Things included in mutation:
A vector of mutation chances for each cell determined by the genome with a base mutation rate of 20%. This is done in a vector so that there are multiple chances that a cell might mutate. This means that there are chances that a cell doesn't mutate at all and there is a chance that a cell might not mutate after reproduction.
A _mutate function which is used to determine which type of mutation is happening. There is an equal chance of an insert, modify, and delete mutation happening. If an insert or modify mutation happens then a gene will be generated to be put into that slot.
A protected gene variable. the genome can create a protected set of genes making it so that a mutation can't happen in a specific location. This is to simulate the "fixing" of mutated genes that is done in real cells. When mutating if a genome is fully protected then the genes can't be modified or deleted but it can insert a gene at the end of the genome.
Gene generation is determined by a function called in mutate. This function currently uses set percentages to determine what gene is selected. This allows us to make it easier to generate something like a modifier gene and harder to generate something like a nucleus gene.
All of the mutation code after rebasing with reproduction and UI changes
Things included in mutation: