Skip to content

Possibly wrong sort order in EvolutionStrategy #186

@Volper212

Description

@Volper212

I have encountered a problem with EvolutionStrategy: it does not work with constraints. However, the problem seems to be fixed by changing this line in the implementation of EvolutionStrategy:

population_pool.sort(key=lambda s: (overall_constraint_violation_degree(s), s.objectives[0]))

to:

population_pool.sort(key=lambda s: (-overall_constraint_violation_degree(s), s.objectives[0]))

(adding a minus sign before overall_constraint_violation_degree, as it is a sum of negative numbers).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions