AureumChaos / LEAP

A general purpose Library for Evolutionary Algorithms in Python.
Academic Free License v3.0
81 stars 19 forks source link

Segmented Crossover Operator #164

Open thomashopkins32 opened 3 years ago

thomashopkins32 commented 3 years ago

Now that ops.uniform_crossover requires the use of np.array for the genome (for efficiency purposes) I was thinking we could add a segmented crossover that acts as it used to for list based segmented genomes.

SigmaX commented 1 year ago

Picking this up as we now have some users that could benefit from this functionality.

In the use case, there is actually a hierarchical genome (lists of lists of lists). So I'm thinking we could offer a general "segmented crossover" operator that allows us to adjust the level of granularity that crossover occurs at. The highest (and default) level would be to swap top-level segments. The lower level would do sub-segments, etc.