GenerationBreeder<P extends Phenotype<G, R> , G, R extends FitnessResult> class
Constructors
- GenerationBreeder(P createBlankPhenotype())
Properties
- createBlankPhenotype → P Function()
-
Function that generates blank (or random) phenotypes of type
P
. This needs to be provided becausenew T();
can't be used.final - crossoverProbability ↔ num
-
getter/setter pair
- elitismCount ↔ int
-
Number of best phenotypes that are copied verbatim to next generation.
getter/setter pair
- fitnessSharing ↔ bool
-
getter/setter pair
- fitnessSharingAlpha ↔ num
-
getter/setter pair
- fitnessSharingRadius ↔ num
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- mutationRate ↔ num
-
getter/setter pair
- mutationStrength ↔ num
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
applyFitnessSharingToResults(
Generation< P, G, R> generation) → void -
Iterates over
members
and raises their fitness score according to their uniqueness. -
breedNewGeneration(
List< Generation< precursors) → Generation<P, G, R> >P, G, R> -
crossoverParents(
P a, P b, {int crossoverPointsCount = 2}) → List< List< G> > -
Returns a
List
of length 2 (2 children), each having a List of genes created by crossing over parents' genes. -
getRandomTournamentWinner(
List< P> pool) → P - Picks two phenotypes from the pool at random, compares them, and returns the one with the better fitness.
-
mutate(
P phenotype, {num? mutationRate, num? mutationStrength}) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited