Skip to content

N-point crossover #14

@JamesArruda

Description

@JamesArruda

This line was added in a commit a while ago:

normal = not normal

By changing the normal value back, the 'cut' only works at that one single point. In the version I have (1.0, before this commit), crossing over would look like the following:

ec.variators.n_point_crossover(random, [list('1234567890'), list('ABCDEFGHIJ')], {})

[['A', 'B', 'C', 'D', 'E', 'F', 'G', '8', '9', '0'],
['1', '2', '3', '4', '5', '6', '7', 'H', 'I', 'J']]

but now it will look like:

[['A', 'B', 'C', 'D', 'E', 'F', 'G', '8', 'I', 'J'],
['1', '2', '3', '4', '5', '6', '7', '8', 'I', '0']]

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions