GeneticAlgorithm<T> class
Constructors
-
GeneticAlgorithm({required List<T> initPopulation(), required double fitness(T), required T crossover(T, T, Random), required T mutate(T, Random), int populationSize = 100, double mutationRate = 0.01, int elitism = 1, int? seed})
-
Methods
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
run({int generations = 100, int tournamentK = 3})
→ Map<String, dynamic>
-
Run GA for
generations. Returns a map with best and fitness.
-
toString()
→ String
-
A string representation of this object.
inherited