Set mutation chance super low and check for end case in mutation

This commit is contained in:
2026-03-18 09:35:42 +00:00
parent 07a47952c3
commit 41c4a39e05
2 changed files with 3 additions and 3 deletions

View File

@@ -29,7 +29,7 @@ void simulation_iterate(simulation_t *sim)
#if MUTATION_CHANCE
for (u64 i = 0; i < SIMULATION_SIZE; ++i)
{
if ((rand() % MUTATION_CHANCE) == 0)
if ((rand() % MUTATION_CHANCE) == (MUTATION_CHANCE - 1))
{
sim->memory[i] += (rand() % MUTATION_OFFSET) - (MUTATION_OFFSET / 2);
}