StochasticHillClimber

open class StochasticHillClimber @JvmOverloads constructor(evaluator: EvaluatorIfc, maxIterations: Int = defaultMaxNumberIterations, replicationsPerEvaluation: ReplicationPerEvaluationIfc, streamNum: Int = 0, streamProvider: RNStreamProviderIfc = KSLRandom.DefaultRNStreamProvider, name: String? = null) : StochasticSolver(source)

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

evaluator

An evaluator object that provides the problem definition and performs solution evaluation.

maxIterations

The maximum number of iterations the algorithm is allowed to execute.

replicationsPerEvaluation

An instance of ReplicationPerEvaluationIfc defining the strategy for determining the number of replications per evaluation.

streamNum

the random number stream number, defaults to 0, which means the next stream

streamProvider

the provider of random number streams, defaults to KSLRandom.DefaultRNStreamProvider

name

An optional name for this solver instance.

Constructors

Link copied to clipboard
constructor(evaluator: EvaluatorIfc, maxIterations: Int = defaultMaxNumberIterations, replicationsPerEvaluation: Int = defaultReplicationsPerEvaluation, streamNum: Int = 0, streamProvider: RNStreamProviderIfc = KSLRandom.DefaultRNStreamProvider, name: String? = null)

Constructs an instance of StochasticHillClimber with specified parameters.

constructor(evaluator: EvaluatorIfc, maxIterations: Int = defaultMaxNumberIterations, replicationsPerEvaluation: ReplicationPerEvaluationIfc, streamNum: Int = 0, streamProvider: RNStreamProviderIfc = KSLRandom.DefaultRNStreamProvider, name: String? = null)

Creates a StochasticHillClimber instance with the provided evaluator, maximum iterations, replications per evaluation strategy, and an optional random number stream and name.