Petri.Crossover.Binary (petri v0.1.0)

Copy Markdown View Source

Summary

Functions

Single-point crossover. Pick one random cut point and swap tails.

Two-point crossover. Pick two cut points and swap the middle segment.

Uniform crossover. Each gene is independently taken from either parent with equal probability.

Functions

single_point(binary1, binary2, config)

Single-point crossover. Pick one random cut point and swap tails.

two_point(binary1, binary2, config)

Two-point crossover. Pick two cut points and swap the middle segment.

uniform(binary1, binary2, config)

Uniform crossover. Each gene is independently taken from either parent with equal probability.