Module: Ai4r::GeneticAlgorithm
- Defined in:
- lib/ai4r/genetic_algorithm/genetic_algorithm.rb
Overview
The GeneticAlgorithm module implements the GeneticSearch and Chromosome classes. The GeneticSearch is a generic class, and can be used to solved any kind of problems. The GeneticSearch class performs a stochastic search of the solution of a given problem.
The Chromosome is “problem specific”. Ai4r built-in Chromosome class was designed to model the Travelling salesman problem. If you want to solve other type of problem, you will have to modify the Chromosome class, by overwriting its fitness, reproduce, and mutate functions, to model your specific problem.
Defined Under Namespace
Classes: Chromosome, GeneticSearch