Skip to content
This repository was archived by the owner on Jun 25, 2025. It is now read-only.
This repository was archived by the owner on Jun 25, 2025. It is now read-only.

Erroneous formula for calculating mutation size #57

@ghost

Description

In the mutateNormal function, the way mutation_range is applied seems problematic. The current formula used is originalValue - 0.5 + random() * mutation_range (excluding clamping for simplicity). This approach causes mutated values to quickly shrink to the range [0, mutation_range] when the mutation_range is small, leading to reduced variation over generations.

A more suitable formula would be originalValue + (random() - 0.5) * mutation_range, which ensures that the distribution of mutated values remains centered around originalValue, even when no clamping is applied.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions