Interface AdvancementChooser
- All Known Implementing Classes:
AnnealingAdvancementChooser
,HillClimber
,OptimizedParameterSweeper.DefaultAdvanceChooser
public interface AdvancementChooser
This interface represents objects that will tell the
OptimizedParameterSweeper
which way it should traverse the
parameter space.- Author:
- Jerry Vos
-
Method Summary
Modifier and TypeMethodDescriptionchooseAdvancement
(ParameterSetter setter, AdvanceType lastType, double runResult) Chooses which action the parameter sweeper should apply to the given setter.boolean
shouldRevert
(double runResult) If the sweeper should revert to the parameters used before the last ones.
-
Method Details
-
chooseAdvancement
Chooses which action the parameter sweeper should apply to the given setter.- Parameters:
setter
- the setter that will be executedlastType
- the last executed advancement (might not be what thisAdvancementChooser
last saidrunResult
- the result of the last run (probably produced by aRunResultProducer
- Returns:
- which action the parameter sweeper should next apply
-
shouldRevert
boolean shouldRevert(double runResult) If the sweeper should revert to the parameters used before the last ones. For instance, if we executed 2 runs, first at (0, 0) and second at (1, 0) and the value of those runs were 100 and 50 respectively, it would most likely tell it to revert and go back to the (0, 0) parameters (because the value was "better").- Parameters:
runResult
- the result of the previous run- Returns:
- if the sweeper should revert or not
-