xxGA Description

The genetic algorithms xxGA model can be caracterized as a parallel searching model, where “xx” indicates that we are able to generate unique population models (ssGA and genGA), cellular models (cGA) and distribuited versions of the previous models. We only have to determinane the parameters to set the basic evolution procedure, the migration policy and the existing searching techniques. Here bellow we show differente pseudocodes for unique population, cellular and distribuited models.

[ssGA]


proc Reproductive_Cycle (ag):
  for s=1 until MAX_STEPS do
    parent1=Select (ag.pob); 
    parent2=Select (ag.pob); 
    Crossover(ag.Pc, parent1, parnt2, ind_aux.chrom);
    Mutate(ag.Pm, ind_aux.chrom);
    ind_aux.fitness=ag.Evaluate ( Decode ( ind_aux.chrom) ) ;
    Insert_New_Ind (ag, ind_aux, [if better | worse] );
    Collect_Statistics (ag);
  end_for;
end_proc Reproductive_Cycle;


Psedocode for a steady state genetic algorithm in xxGA

[genGA]


proc Reproductive_Cycle (ag):
  for s=1 until MAX_STEPS do
    p_list = Select (ag.pob);
    for i=1 until POB_SIZE / 2 do
      Crossover(ag.Pc, p_list[i], p_list[2*i],ind_aux.chrom);
      Mutate(ag.Pm, ind_aux.chrom);
      ind_aux.fitness=ag.Evaluate ( Decode ( ind_aux.chrom) );
      Insert_New_Ind ( pob_aux , ind_aux );
    end_for;
    ag.pob=pob_aux; [elitist | non elitist]
    Collect_Statistics (ag);
  end_for;
end_proc Reproductive_Cycle;


Psedocode for a generational genetic algorithm in xxGA


[cGA]


proc Reproductive_Cycle (ag):
  for s=1 until MAX_STEPS do
    for x=1 until WIDTH do
      for y=1 until HEIGHT do
      n_list= Calculate_neigbours  (ag , position (x,y) );
      parent1=Select (n_list); 
      parent2=Select (n_list); 
      Crossover(ag.Pc, n_list[parent1], n_list[parent2], ind_aux.chrom);
      Mutate(ag.Pm, ind_aux.chrom);
      ind_aux.fitness=ag.Evaluate ( Decode ( ind_aux.chrom) ) ;
      Insert_New_Ind(position(x,y),ind_aux,[if better | always], ag, pob_aux);
      end_for;
    end_for;
    ag.pop=pob.aux;
    Collect_Statistics (ag);
  end_for;
end_proc Reproductive_Cycle;


Psedocode for a cellular genetic algorithm in xxGA


[dxxGA]


Start_System (ag);
Generate_Subpopulations (ag);
Evaluate_Subpoblaciones (ag);
Collect_Global_Statistics (ag);
for s=1 until MAX_STEPS do
  for i=1 until NUMBER_OF_ISLAND do
    Reproductive_Cycle (ag[i]);;
  end_for;
  if  Must_Migrate (ag, s) then
    Migrate_In_Ring (ag, [best | random]);
    Collect_Global_Statistics (ag);
  end_if;
end_for
Solution=Best_Ind_Found_During_Evolution;


Psedocode for a distribuited model in xxGA


Previous page Home | Introduction on EAs | xxGA | Problems | Links | Articles DB Next Page