Repository navigation
Conversation
The differential variation of Runarsson and Yao (2005) updates the k-th
ranked survivor with gamma * (x_1 - x_{k+1}), where x_1 is the best
survivor. The code used storage slot 0 for x_1 and storage slot k+1 for
x_{k+1}, which are not ranked. Copy the best-ranked survivor into x0
and use irank[k+1].
New test t_isres_ranking: ISRES on g06, seeds 1 to 10, total number of
evaluations to reach f* + 0.1 (305863 before, 196685 after).
Fixes stevengj#590.
Contributor
Author
|
@stevengj, this one is also ready for review. As in the description, I can reduce it to the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #590.
The differential variation of Runarsson and Yao updates the k-th ranked survivor with
gamma * (x_1 - x_{k+1}), wherex_1is the best survivor. The code had two indices in storage order instead of rank order:memcpy(x0, xs, ...)copied storage slot 0, not the best survivorxs + irank[0]*n;xs[(k+1)*n+j]is storage slot k+1, not the (k+1)-th ranked survivorxs[irank[k+1]*n+j].This pull request changes both (variant RB in my comment on #590). The benchmark from that comment, 300 seeds per problem, successful runs and median evaluations:
The change makes ISRES more reliable on the harder problems (g07, Shekel 10, g01) and faster on g06 and Rosenbrock. It needs 7% to 13% more evaluations on the tutorial problem, g04, g08 and g24. The benchmark program and the full output are on https://github.com/inayatku/nlopt/tree/isres-590-benchmark/test/isres_benchmark .
If you prefer the smaller change, I can reduce this to the
x0line only (variant B in the comment): it solves g07 in 128 of 300 runs and is at most 4.3% slower than master on these problems.New test
test/t_isres_ranking.cxx: ISRES on g06 with seeds 1 to 10. The runs must all reach f* + 0.1 and need fewer than 250000 evaluations in total. Master: 305863 (fails). This branch: 196685. In a resampling of the 300 benchmark runs, master passes this test with probability 0.005 and this branch fails it with probability 5e-5. The test takes about 1.5 s.ctest: 89 of 89 pass (MSVC 2022).