Niching Genetic Algorithm Solver
The Niching Genetic Algorithm (NGA), the global exploration phase of Industrial Strength COMPASS (ISC Algorithm 1). It maintains a population of integer-feasible solutions and, each generation:
identifies niches in the population (NicheIdentifier, Algorithm 2);
computes niche-shared fitness (FitnessSharing, §A.4);
groups statistically-indistinguishable members (NoiseGroupingProcedure, Algorithm 3) and assigns group-averaged linear-rank selection probabilities (LinearRankingSelection, §A.5);
draws a parent pool by Stochastic Universal Sampling (StochasticUniversalSampling);
mates each parent under a mating restriction (MatingRestrictionIfc, Algorithm 4), recombines (NgaCrossoverIfc, §A.8), and mutates (NgaMutationIfc, §A.9) to form offspring;
evaluates the offspring and forms the next generation (optionally conserving niche centers, Algorithm 5).
The phase ends when any configured transition rule fires (NgaTransitionRuleIfc, §A.12). The discovered niches — each a center "seed" plus its surrounding members — are the starting points for the COMPASS local phase. With uniform mutation enabled (the default), every feasible point remains reachable with positive probability, preserving the NGA's global-convergence guarantee.
All randomness flows through the solver's single random number stream (rnStream), so a run is reproducible for a fixed stream number.
Parameters
the problem being solved
the evaluator responsible for assessing the quality of solutions
the random number stream number; 0 (the default) means the next available stream
the provider of random number streams; defaults to a fresh RNStreamProvider
the population size m_G. It must not exceed the number of distinct input-feasible points of the problem: the initial population is filled with unique feasible points, so requesting more than exist cannot terminate.
the niche-identification strategy
the fitness-sharing strategy
the noise-aware grouping strategy
the linear-ranking selection-probability strategy
the stochastic-universal-sampling strategy
the mating-restriction strategy
the recombination strategy
the mutation strategy (default UniformMutation, which preserves convergence)
whether to carry niche centers forward unchanged (elitism, Algorithm 5)
the global→local transition rules; the phase ends when any fires
the maximum number of generations
strategy for the number of replications per evaluation
an optional name for the solver
Constructors
Constructs a Niching GA solver using a fixed number of replications per evaluation.
Properties
Structured, ordered snapshot of the solver's configuration — the same fields the toString implementations expose, in a form that downstream consumers can iterate (reporting, machine-readable summary artifacts, "compare two runs" tooling).
The current generation index (0 after initialization).
The niche structure identified for the current population.
The number of consecutive generations with no improvement of the incumbent.
A read-only, best-first view of the current population.
The population size m_G. Must be >= defaultMinPopulationSize.
The global→local transition rules. Cannot be changed while the solver is running.
Functions
A hook for subclasses to inject their specific internal state metrics into the snapshot without having to override the entire makeSolverStateSnapshot method.
Subclasses may implement this function to prepare the solver before running the first iteration. Generally, it is sufficient to just implement the startingPoint() function.
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.
This function should contain the logic that iteratively executes until the maximum number of iterations is reached or until the stopping criteria is met. The base implementation calls nextPoint() to determine the next point to evaluate, requests an evaluation of the point, and then updates the current solution if the resulting solution is better than the current solution. Generally, implementing startingPoint() and nextPoint() should be adequate. The property iterationCounter represents the current iteration within the mainIteration() function. That is, the value of iterationCounter is incremented prior to the execution of the mainIteration() function.