Multiple Populations
GAUL is able to handle multiple populations, as shown in struggle2.c from an earlier section of this tutorial. Multiple populations may be evolved simultaneously by using the "ga_evolution_archipelago()" function. This function acts in the same way as the "ga_evolution()" which you have already seen. However, in addition to the usual crossover and mutation operations a migration operation is performed. This allows a small proportion of the entities to migrate between the different populations. The prototype for this function is:
boolean ga_evolution_archipelago( const int num_pops,
population **pops,
const int max_generations );
This variant of the GA is often described as the "island model genetic algorithm" in the scientific literature. The mechanism for using this routine is so simple in GAUL that I will not describe it here, instead look at struggle5.c
|