Stochastic Hill Climber
A class that implements the Stochastic Hill Climbing optimization algorithm. This algorithm searches for an optimal solution by iteratively evaluating and moving to neighborhood solutions, as determined by the evaluator and the problem definition. It uses a stochastic approach to explore the solution space by leveraging a random number stream.
Parameters
An evaluator object that provides the problem definition and performs solution evaluation.
The maximum number of iterations the algorithm is allowed to execute.
An instance of ReplicationPerEvaluationIfc defining the strategy for determining the number of replications per evaluation.
the random number stream number, defaults to 0, which means the next stream
the provider of random number streams, defaults to KSLRandom.DefaultRNStreamProvider
An optional name for this solver instance.
Constructors
Creates a StochasticHillClimber instance with the provided evaluator, maximum iterations, replications per evaluation strategy, and an optional random number stream and name.
Constructs an instance of StochasticHillClimber with specified parameters.
Properties
Functions
The default implementation ensures that the initial point and solution are input-feasible (feasible with respect to input ranges and deterministic constraints).
Subclasses should implement this function to determine if the solver should continue running iterations. This will likely include some implementation of stopping criteria. This function should implement stopping criteria based on the quality of the solution. The number of iterations, compared to the maximum number of iterations, is automatically checked after each step in the iterative process. Unless overridden, this function returns false by default, which indicates that the solution quality criteria have not been satisfied. This will cause the solver to iterate through all iterations of the solution process up to the maximum number of iterations. Alternatively, the user can specify an instance of the SolutionQualityEvaluatorIfc interface to determine if the solution quality has been reached.
Randomly generates the next point using nextPoint(). Evaluates the point and gets the solution. If the solution is better than the current solution, it becomes the current solution.