Repository navigation
Phase 2b: opt-in moves for iterated local search and hill climbing - #33
Merged
Merged
Conversation
IteratedLocalSearchConfig.useMoves, HillClimbingConfig.useMoves and GlobalHillClimbingConfig.useMoves, all off by default. With them on, a try is a move scored with evaluateMove and a neighbor is built only if it improves. The price is that rejected neighbors are not remembered, so one can be evaluated again; the default keeps its promise of evaluating each distinct solution at most once. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0175jMLxrP7wZ3vfj6UfeDZx
…plan Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0175jMLxrP7wZ3vfj6UfeDZx
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.
Follow-up to #32, as agreed: moves for iterated local search and hill climbing are an opt-in setting, off by default, because they drop the promise to evaluate each distinct solution at most once.
IteratedLocalSearchConfig.useMoves,HillClimbingConfig.useMoves(new, withHillClimbingStrategy.setConfig),GlobalHillClimbingConfig.useMoves. A try is a move scored withevaluateMove; a neighbor is built and remembered only when it improves. Accepted solutions, shakes and restarts are still remembered.--moves=true(writes no summary unless--reportis given).Measured (tour benchmark, 5 seeds, 5000 ms, same fitness with and without):
This PR is stacked on #32 (base is that branch until #32 merges).
Tests: new suites for iterated local search and hill climbing with moves (deltas checked, budget, own-neighbor subclasses keep working, quality about equal over seeds), and the benchmark option. Gradle was not run; the 6 remaining failures in my local runner are pre-existing stand-in gaps.
Generated by Claude Code