Skip to content

No "NaN/infinity" verification in sbx crossover implementation AND no bounds verification for NSGA-II's initial population #567

@Dave-Poissant

Description

@Dave-Poissant

Describe the bug
There is no NaN/infinity verification in the SBX Crossover implementation. This makes it possible for the crossover to assign NaN/infinity values to genes.

An example of how this seems to happen is when the population is set with genes that don't respect their bounds in NSGA-II (and maybe other genetic algorithm implementation). There should be a verification beforehand that all those genes respect the bounds set.

Expected behavior
For NSGA-II

  1. An error message saying that the initial population have some individuals not respecting bounds OR those said individuals are bounded before executing the evolution.
    For sbx crossover impl
  2. A bounding step at the end of the crossover, making sure neither C1 or C2 are NaN/infinity values and then assigned to genes

Environment (please complete the following information):

  • OS: Ubuntu 20.04
  • Installation method: source
  • Version: branch master

Additional context
I have not verified if other genetic algorithms have this problem nor if other crossover operators can assign NaN/infinity values. But this should be confirmed into the same pull request in my opinion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions