Module Ga_types


module Ga_types: sig .. end
Types used in the genetic algorithm.


type 'a chromosome = {
   mutable r_fit : float Lazy.t; (*Raw fitness.*)
   mutable s_fit : float; (*Scaled fitness.*)
   data : 'a; (*Data.*)
}
The type of the population elements.
type 'a population = 'a chromosome array 
The type of a population.

type scaling =
| No_scaling
| Sigma_truncation
| Power_low
| Ranking (*Scaling method.*)

type sharing = {
   protected : int list; (*Indexes of protected elements.*)
   clusters : int; (*Number of clusters.*)
   optima : int; (*Number of local optima.*)
   dmean : float;
}
Type for the output of the sharing phase.

type gvars = {
   seed : int; (*Seed for the random generator.*)
   nbgens : int; (*Number of generations.*)
   nbelems : int; (*Population size.*)
   pcross : float; (*Crossing rate.*)
   pmut : float; (*Mutation rate.*)
   scaling : scaling; (*Scaling method.*)
   elitist : bool; (*If true, keep the best element for next generation.*)
   sharing : float; (*Sharing rate.*)
   complex_sharing : float; (*Complex sharing.*)
   evolutive : bool;
}
Type for the genetic algorithm parameters.