diff --git a/algo/ga/somat3a.go b/algo/ga/somat3a.go new file mode 100644 index 0000000..36b11db --- /dev/null +++ b/algo/ga/somat3a.go @@ -0,0 +1,36 @@ +// Copyright 2023 wanderer +// SPDX-License-Identifier: GPL-3.0-or-later + +package ga + +import ( + "git.dotya.ml/wanderer/math-optim/stats" + "gonum.org/v1/gonum/stat/distuv" +) + +// SOMAT3A holds the settings for an instance of SOMA T3A algorithm. +// nolint: unused +type SOMAT3A struct { + // Generations is the number of generations to evolve for. Disable limit + // with -1. + Generations int + // BenchMinIters is the number of iterations that the bench function will + // be re-run. + BenchMinIters int + // Dimensions in which to look for a solution. + Dimensions []int + // NP is the initial population size. + NP int + // BenchName is the human-friendly name of the benchmarking function. + BenchName string + // ch is a channel for writing back computed results. + ch chan []stats.Stats + // chAlgoMeans is a channel for writing back algo means. + chAlgoMeans chan *stats.AlgoBenchMean + + // rng is a random number generator. + rng distuv.Uniform + + // initialised denotes the initialisation state of the struct. + initialised bool +}