1. proc Step_Up (cea) :
 2.   for s = 1 to MAX_STEPS do
 3.     for x = 1 to WIDTH do
 4.      for y = 1 to HEIGH do
 5.        n_list        = Compute_Neigh(cea, position(x,y)) ;
 6.        selected_inds = Perform_Selection(n_list) ;
 7.        aux_pop       = Apply_Reproduction_Operators(selected_inds) ;
 8.      end_for ;
 
9.     end_for ;
10.
     cea = Replace(cea, aux_pop) ;

11.     Evaluate_Population(cea) ;
12.   end_for ;
13. end_proc Step_Up ;

 

Pseudocode of a simple cEA

Move the pointer over the words or the line numbers for additional information

Next we present a brief explanation with the mean of the main algorithm's lines:

Line 2.

The algorithm runs until one of the two following stopping conditions is satisfied:

Lines 3 and 4.

In each generation, the algorithm examines all the individuals of the population. This population is hold in a 2-D toroidal grid shape of size WIDTH x HEIGH (more details).

Line 5.

The neighbors of the individual placed on position (x,y) are stored in an empty list.

Line 6.

The parents of the individual of position (x,y) are selected from the list created in line 5 and placed in a new list.

Line 7.

The parents of the individual of position (x,y) are selected from the list created in line 5 and placed in a new list.

Line 10.

The old population is replaced by the new one created in the actual generation.

Line 11.

The individuals of the new population are evaluated.