gov.sns.tools.optimization
Class RandomSearchAlgorithm.ShrinkSearcher

java.lang.Object
  |
  +--gov.sns.tools.optimization.RandomSearchAlgorithm.RandomSearcher
        |
        +--gov.sns.tools.optimization.RandomSearchAlgorithm.ShrinkSearcher
All Implemented Interfaces:
RandomSearchAlgorithm.Searcher, gov.sns.tools.optimization.ScoreMonitor
Enclosing class:
RandomSearchAlgorithm

protected class RandomSearchAlgorithm.ShrinkSearcher
extends RandomSearchAlgorithm.RandomSearcher

ShrinkSearcher searches for the next trial point by adjusting the search domain per variable depending on how much a variable has changed between the best solutions found so far. As the variables converge on a solution, the search space shrinks. The search space may also increase if a variable is not converging as we get closer to an optimal solution.


Field Summary
protected  java.util.Map variableWindows
           
 
Fields inherited from class gov.sns.tools.optimization.RandomSearchAlgorithm.RandomSearcher
changeProbabilityBase, randomGenerator, values
 
Constructor Summary
RandomSearchAlgorithm.ShrinkSearcher()
          Constructor
 
Method Summary
protected  void buildWindows()
          Build the new bounds based upon the user specified domain and the search algorithm's search space per variable.
 void newTopSolution(TrialPoint oldPoint, TrialPoint newPoint)
          An event indicating that a new solution has been found which is better than the previous best solution according to the score given by the evaluator.
protected  double proposeValue(Variable variable)
          Propose a new value for the variable by selecting a random value from the variable's shrunken search space.
 void reset()
          reset for searching from scratch; forget history
 
Methods inherited from class gov.sns.tools.optimization.RandomSearchAlgorithm.RandomSearcher
newScore, nextPoint, nextPoint, nextTrialPoint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

variableWindows

protected java.util.Map variableWindows
Constructor Detail

RandomSearchAlgorithm.ShrinkSearcher

public RandomSearchAlgorithm.ShrinkSearcher()
Constructor

Method Detail

reset

public void reset()
reset for searching from scratch; forget history

Specified by:
reset in interface RandomSearchAlgorithm.Searcher
Overrides:
reset in class RandomSearchAlgorithm.RandomSearcher

newTopSolution

public void newTopSolution(TrialPoint oldPoint,
                           TrialPoint newPoint)
An event indicating that a new solution has been found which is better than the previous best solution according to the score given by the evaluator.

Specified by:
newTopSolution in interface RandomSearchAlgorithm.Searcher
Overrides:
newTopSolution in class RandomSearchAlgorithm.RandomSearcher
Parameters:
oldPoint - The old best point.
newPoint - The new best point.

buildWindows

protected void buildWindows()
Build the new bounds based upon the user specified domain and the search algorithm's search space per variable. The search windows become the intersection of the user specified search domain and the algorithm's search space.


proposeValue

protected double proposeValue(Variable variable)
Propose a new value for the variable by selecting a random value from the variable's shrunken search space.

Overrides:
proposeValue in class RandomSearchAlgorithm.RandomSearcher
Parameters:
variable - the variable for which to propose a new value
Returns:
the new value to propose for the variable