A genetic algorithm requires a number of functions. This package provides the interfaces for those functions and simple implementations. By implementing, mixing and matching these functions you can create highly customized genetic algorithms.
A GA requires (in alphabetical order): a
to govern the behaivour of 'chromosome' crossovers, a
to determine the fitness of each organism after each iteration, a
MutationFuntion to govern mutation behaivour, and a
to select organisms for the next round of replication.
Interface Summary Interface Description CrossOverFunctionCrosses two chromosomes. FitnessFunctionCalculates the fitness of an
GACrossHolds the results of a CrossOver event, objects of this type are made by
GACrossResultHolds the results of a CrossOver event, objects of this type are made by
MutationFunctionA class that mutates a
SelectionFunctionSelects Organisms for Replication and returns the offspring.
Class Summary Class Description AbstractCrossOverFunctionAbstract implementation of
AbstractMutationFunctionAbstract implementation of
MutationFunctionall custom implementations should inherit from here.
CrossOverFunction.NoCrossA place holder CrossOverFunction that doesn't perform cross overs MutationFunction.NoMutationPlace Holder class that doesn't mutate its SymbolLists OrderCrossoverThis does a 2-point-crossover on two chromosomes keeping the Symbols in each chromosome constant. ProportionalSelectionA Selection function that determines the proportion of individuals in a new population proportionally to their fitness. SelectionFunction.SelectAll SelectionFunction.ThresholdSelects individuals who's fitness exceeds a threshold value. SimpleCrossOverFunctionSimple Implementation of the
SimpleGACrossResultSimple implementation of the
SimpleMutationFunctionSimple no frills Implementation of the MutationFunction interface SwapMutationFunctionThis class does a sort of mutation by exchanging two positions on the chromosome. TournamentSelectionTournament Selection chooses the best organisms from n random subsets of a given population.