GeneticAlgorithm<P extends Phenotype<G, R>, G, R extends FitnessResult> class

Constructors

GeneticAlgorithm(Generation<P, G, R> firstGeneration, PhenotypeEvaluator<P, G, R> evaluator, GenerationBreeder<P, G, R>? breeder, {PrintFunction printf = print, PrintFunction statusf = print})

Properties

breeder GenerationBreeder<P, G, R>?
final
currentExperiment int
getter/setter pair
currentGeneration int
getter/setter pair
evaluator PhenotypeEvaluator<P, G, R>
final
generations List<Generation<P, G, R>>
final
generationSize int
final
hashCode int
The hash code for this object.
no setterinherited
maxExperiments int
getter/setter pair
maxGenerationsInMemory int
final
memberIndex int?
getter/setter pair
onGenerationEvaluated Stream<Generation<P, G, R>>
no setter
population Iterable<P>
no setter
printf PrintFunction
Function used for printing info about the progress of the genetic algorithm. This is the standard console print by default.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
statusf PrintFunction
Function used for showing status of the genetic algorithm, with the assumption that previous status text is rewritten by new status text. This is also initialized with print by default, but that's not the ideal implementation.
final
thresholdResult ↔ R?
When any Phenotype scores lower than this, the genetic algorithm has ended.
getter/setter pair

Methods

evaluateLatestGeneration() Future<void>
Evaluates the latest generation and completes when done.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
runUntilDone() Future<void>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited