Repository navigation
fix(solver): late acceptance keeps its history unless a hard or medium level changes - #243
Merged
Merged
Conversation
…ange LateAcceptanceAcceptor refilled its whole history with every new best score. After the first improvement every entry equals the best, so a move is accepted only when it scores at least the best, and each further best refills again: from then on the acceptor is hill climbing with sideways moves, not late acceptance, and searches that rely on accepting worse moves to leave a local optimum settle early. The history is now re-anchored to the best score only when one of its dominating levels changes (the hard level of a hard/soft score; hard and medium for hard/medium/soft), which keeps the guard against stale entries admitting moves that hold a newly reached level but ruin the lower ones. Improvements in the lowest level alone leave the history as it is, and a single-level score never re-anchors, as the published algorithm has it. Tests: two cases that the previous code fails (a lowest-level improvement keeps the late threshold, for a single-level and a hard/soft score) and one that both pass (a hard-level change re-anchors).
The dominating-level check compared every level but the last, so a bendable score re-anchored the history when any soft level other than the last one improved, which collapses late acceptance into hill climbing again for bendable models. It now compares the levels labelled hard or medium, which are the hard level of a hard/soft score, the hard and medium levels of a hard/medium/soft score and the hard levels of a bendable score; scores with only soft levels never re-anchor.
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.
Lands #242 by @slapers with one follow-up commit.
Closes #242.
Evidence on 80c675e (clean tree): make ci-local + make lint EXIT 0, 1730 passed / 0 failed over 116 result lines; public API check EXIT 0. The two #242 tests and the new bendable soft-level test fail without the respective commit. Zero-regression gate on e1b41b4 vs v0.26.0 passed; the same gate on 80c675e and a five-app late-acceptance solve comparison are running and gate the 0.26.1 release.