pg.evolution.recombinators.Order

Accessible via pg.evolution.recombinators.Order.

class Order(where=Any(k=1, seed=None), seed=None)[source]

Bases: pg.evolution.recombinators.Permutation

Order crossover (OX).

The order crossover (OX) was proposed by L. Davis, “Applying adaptive algorithms to epistatic domains,” IJCAI, vol. 85, pp. 162–164, 1985.

It builds offspring by choosing a subtour of a parent and preserving the relative order of bits of the other parent.

Reference: https://dl.acm.org/doi/10.5555/1625135.1625164

Methods:

order_crossover(parents, start, end)

Cross over and remap the rest elements at given cutting points.

permutate(multi_choice_spec, parents)

"Permutate decisions for a multi_choice_spec.

order_crossover(parents, start, end)[source]

Cross over and remap the rest elements at given cutting points.

Return type:

List[List[int]]

permutate(multi_choice_spec, parents)[source]

“Permutate decisions for a multi_choice_spec.

Return type:

List[List[int]]