simulation: make mutation completely change cell

Instead of just offsetting the cell, just completely generate a new
one.  Way more fresh cells that way.
This commit is contained in:
2026-03-18 17:28:29 +00:00
parent ded310ed35
commit f784cf13e6

View File

@@ -30,7 +30,7 @@ void simulation_mutate(simulation_t *sim)
{ {
if ((rand() % MUTATION_CHANCE) == (MUTATION_CHANCE - 1)) if ((rand() % MUTATION_CHANCE) == (MUTATION_CHANCE - 1))
{ {
sim->memory[i] += (rand() % MUTATION_OFFSET) - (MUTATION_OFFSET / 2); sim->memory[i] = rand() % 255;
} }
} }
#else #else