biopython v1.71.0 Bio.GA.Crossover.General.SafeFitnessCrossover

Perform crossovers, but do not allow decreases in organism fitness.

This doesn’t actually do any crossover work, but instead relies on another class to do the crossover and just checks that newly created organisms do not have less fitness. This is useful for cases where crossovers can

Link to this section Summary

Functions

Initialize to do safe crossovers

Perform a safe crossover between the two organism

Link to this section Functions

Initialize to do safe crossovers.

Arguments:

  • actual_crossover - A Crossover class which actually implements crossover functionality.
  • accept_less - A probability to accept crossovers which generate less fitness. This allows you to accept some crossovers which reduce fitness, but not all of them.

Perform a safe crossover between the two organism.