Skip to content

Fix SPEA2 truncation selection#788

Open
ival1ne wants to merge 2 commits into
anyoptimization:mainfrom
ival1ne:fix-spea2-truncation
Open

Fix SPEA2 truncation selection#788
ival1ne wants to merge 2 commits into
anyoptimization:mainfrom
ival1ne:fix-spea2-truncation

Conversation

@ival1ne
Copy link
Copy Markdown

@ival1ne ival1ne commented Jun 4, 2026

Fixes #773

This PR updates SPEA2 survival truncation to use lexicographical ordering of sorted distances when too many non-dominated solutions are present.

Previously, the truncation step only considered the nearest-neighbor distance, which could remove an extreme non-dominated solution in tie cases. The updated implementation compares the sorted distance rows lexicographically, as required by the SPEA2 truncation procedure.

A regression test was added for the minimal example from the issue, checking that the extreme points are preserved when reducing three non-dominated points to two survivors.

Test:
python -m pytest tests/algorithms/test_spea2.py -q

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Incorrect truncation selection in SPEA2Survival

1 participant