Repository navigation
Scoreboard in CI, and hide inapplicable viewer strategies - #19
Merged
Merged
Conversation
Every strategy is checked on sphere, Ackley, Rastrigin, Rosenbrock, and two integer lattices for three seeds. A run must beat its start, differential evolution and particle swarm must reach 1e-2, and brute force must solve the lattices and refuse a continuous space. Co-authored-by: Barry G Becker <barrybecker4@yahoo.com>
OptimizationStrategyType.appliesTo decides the dropdown, and a failed run shows the exception message instead of "did not complete". Co-authored-by: Barry G Becker <barrybecker4@yahoo.com>
barrybecker4
marked this pull request as ready for review
October 17, 2026 16:06
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
./gradlew build(the CI workflow) runsStrategyScoreboardSuite: every optimization strategy on sphere, Ackley, Rastrigin, Rosenbrock, the integer line, and the integer grid, for seeds 1, 42, and 99.Each successful run must finish at least as good as its start. Differential evolution and particle swarm must reach fitness 1e-2. Brute force and state-space search must reach 0 on the integer lattices and refuse a continuous space. A 300,000-evaluation budget and a 90-second test limit stop a non-terminating search. The suite itself finishes in about 2 seconds.
The viewer dropdown now uses
OptimizationStrategyType.appliesTo(optimizee, params)and rebuilds when the problem changes:DiscreteStateSpace.NumericParameterArrayhas a continuous parameter.IllegalArgumentExceptionis no longer caught in the Swing worker. A failed run showsFailed (STRATEGY):plus the exception message.AbstractMethodErrorstill becomes an empty result../gradlew test: 299 tests, 0 failures, 0 errors.Pull request #18 is already merged, so this follow-up stays on this draft.
Screenshots
Sphere, before: state-space search and brute force are still in the list.
Sphere strategy list before filtering
Sphere, before: status bar hides the exception.
Generic did-not-complete status
Sphere, after: those two strategies are gone. The 1D line still offers both.
Sphere strategy list after filtering
Line strategy list includes state-space and brute force
A state-space run on the sphere now shows the exception text.
Status bar with the IllegalArgumentException message
Test plan
./gradlew test --tests com.barrybecker4.optimization.StrategyScoreboardSuite./gradlew test --tests com.barrybecker4.optimization.strategy.OptimizationStrategyTypeSuite./gradlew test --tests com.barrybecker4.optimization.viewer.ui.OptimizerEvalStatusSuite./gradlew test(299 tests, 0 failures, 0 errors)appliesTo, and a failing state-space run shows its messageTo show artifacts inline, enable in settings.