Repository navigation
Fix differential evolution, brute force, and out-of-range steps - #18
Merged
Merged
Conversation
…ped out of bounds. Differential evolution discarded immutable setValue results, so the population never changed. Brute force asked for a Long.MaxValue sample grid that wrapped to one point or billions. Integer sampling and epsilon steps could leave the legal range, and a stale viewer worker overwrote a finished run with "Cancelled." Co-authored-by: Barry G Becker <barrybecker4@yahoo.com>
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.
Summary
Evaluation of every
OptimizationStrategyTypeon the eightOptimizerEvalAppproblems (seeds 1, 42, 99) found several strategies that do not search. This draft fixes the clear, low-risk defects and leaves the write-up inEVALUATION.md(before/after numbers included).setValueand discarded the newParameter, so every trial was the target. Sphere fitness stayed around 4.6–18 after 40,041 evaluations (~22 unique). It now builds a real trial vector, samples uniformly, and reaches ~1e-158 on the sphere and 0 on Rastrigin and Rosenbrock.findGlobalSamples(Long.MaxValue). The 32-bit grid product wraps to one sample in 2D (sphere fitness 52.4, worse than the start) and to 2.1e9 points in 1D (does not finish). Integer lattices are enumerated directly; continuous spaces throw.[min, max]or assert. That made global hill climbing and global simulated annealing throw on the discrete grid and the 1D line. Both now finish at fitness 0.|r| <= 1.5assert.toCSVStringunder a global format lock, soDominatingSetProblemSuitedid not finish. Value equality brings that suite down to about 4s.Optimizerignored the callerRandomfor differential evolution, particle swarm, and iterated local search../gradlew test: 288 tests, 0 failures../gradlew slowTestwas still running at 90s and is not part of that count.Test plan
./gradlew test(288 tests, 0 failures), includingDominatingSetProblemSuiteEVALUATION.md)OptimizerEvalAppscreenshots for all 13 strategies × 8 problems, plus after-fix frames for the repaired cases./gradlew slowTest(did not finish within 90s)