ALGORITHM TYPE

 

STEADY STATE GA (ssGA)

This algorithm generates a new individual in every step. The new individual is inserted in the population with his parents, and he always replaces to the worst individual (or he only replaces if he is better than the worst).

[ssGA] // Steady State Genetic Algorithm

proc Rep_Cicle (ga)
      for s<-1 to MAX_STEPS do
            parent1<- Select (ga.population);
            parent2<- Select (ga.population);
            Cross (ga.Pc,parent1,parent2,indiv_aux.chromosome);
            Mutate (ga.Pm,indiv_aux.chromosome);
            indiv_aux.fitness<-ga.Evaluate(Decode(indiv_aux.chromosome));
            Insert_New_Indiv (ga,indiv_aux, [if better | if worse]);
            Makes_Stadisticals (ga);
      end_for
end_proc Rep_Cicle;

 

CELULAR GA (cGA)

This model only makes the selection on the neighbors. It generates a temporal population which going to replace to the worst individuals in the old population. They can replace always or only if they are better.

[cGA] // Celular Genetic Algorithm

proc Rep_Cicle (ga)
      for s<-1 to MAX_STEPS do
            for x<-1 to WIDTH do
                  for s<-1 to HEIGTH do   
                       
list<-Calculate_neighbors(ga,position(x,y));
                        parent1<- Select (list);
                        parent2<- Select (list);
                        Cross (ga.Pc,list[parent1],list[parent2],indiv_aux.chromosome);
                        Mutate (ga.Pm,indiv_aux.chromosome);
                        indiv_aux.fitness<- ga.Evaluate(Decode(indiv_aux.chromosome));
                        Insert_New_Indiv (position(x,y),indiv_aux, [if better | if worse],
                                                          ga,population_aux);
                
end_for
            end_for

            ga.population<-population.aux;
            Makes_Stadisticals (ga);
      end_for
end_proc Rep_Cicle;

 

SIMULATED  ANNEALING (SA)

This is a combinatory search guided method. This algorithm try to locate the best solution in a finite number of possible solutions of a problem. The current individual, which represents a partial solution, is modified to provide another individual with less cost.

[SA] // Simulated Annealing

actual=new_structure();                   // creates new structure
k=0                                                                  // inicializes the counter
Tk=Calculate_Temperature(T0);
while Tk>T_FINAL do
           k=k+1;
           new=Generate_structure(actual);       // generate neighbor of "actual"
           if Energy(new)>Energy(actual) then             // Energy is similar to fitness
                      actual=new;                                                                  
           else
                      p=Calculate_Probability(k,Tk);
                      if p>random() then actual=new;
                      else refuse_structure(new);
                      end_if;
           end_if;
           if
k>L_MARKOV then
                      k=0;                                                            // update temperature
                      Tk=Calculate_Temperature(Tk,T0);   //Calculate Tk=(T0* (e^ ( (c-1)*k) ) )
           end_if;
end_do;   

 

 

[Previous][Index][Home]