Skip to content

Feature Request: Diversity preservation mechanisms #352

@zs001-agi

Description

@zs001-agi

Feature Request: Diversity Preservation

First, thanks for the great library! PyGAD is an excellent GA framework.

I've been working on a related project (asi-evolve) that focuses specifically on diversity preservation in evolutionary algorithms. One challenge I've noticed in standard GA implementations is premature convergence — the population converges to a local optimum before exploring the search space adequately.

Proposed Feature

Add built-in diversity preservation mechanisms:

  1. Fitness sharing — reduce fitness of similar individuals
  2. Niching — maintain subpopulations in different regions
  3. Crowding — replace similar parents with offspring

Reference Implementation

I've implemented these in asi-evolve under the EvolutionaryAlgorithm class. The key method is _calculate_diversity() which tracks population diversity and auto-adjusts mutation rates when diversity drops.

Would this be a welcome addition to PyGAD? I'd be happy to contribute a PR.

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