Mutation Chance Calculator
Calculator
Enter the values in the boxes below to have the result.
Parent 1 :
Parent 2 :
Results:
Probability of two parents to be selected (=mutation): 1%
Probability of only one parent to be selected (=clone): 36%
Probability of a mutation to happen: 0.55%
Probability of a good mutation to happen: 0.3%
How cross-breeding (and mutations) works
A cross-breeding is generated when a random tick happen on an empty cross cropstick. When this happens, valid neighbours are determined. A valid neighbour is a plant mature and fertile. These candidates are filtered by their fertility (if the fertility of the plant is less than a random number between min-fertility and max-fertility, the plant is removed from the candidates) If only one plant is remaining, a clone of this plant is produced. (see later for more explanation). If more are remaining, a cross-breeding is produced.
Clone
A random number is generated, if it is less than the spread chance of the plant, a clone is really produced. When the clone is produced, there is a chance the genes are mutated (see later for more explanation).
Cross-breeding
The detected plants are sorted by their fertility (high fertility is first), and the two first plants are chosen. A new plant is produced with a random allele (dominant or recessive) from each parent. A mutation may happen on each genes.
Mutation
A random mutation happen after generating a random number (between 0.0 and 1.0).
If it is greater than a threshold (computed by (1.0 - gene_mutativity / max_mutativity) / 2.0
), the mutation happen.
A mutation is either good (+1 is stat) or bad (-1 in stat). It is determined by another random number.
If random(min_mutativity, max_mutativity) < (max_mutativity + gene_mutativity)/2
then the mutation is good, else the mutation is bad.
Mutativity stat of 1 results in 30.25/50/24.75 probability of positive/no/negative mutation.
Mutativity stat of 10 results in 100/0/0 probability of positive/no/negative mutation.