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
Link to this section Functions
Link to this function
__init__()
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.
Link to this function
do_crossover()
Perform a safe crossover between the two organism.