**Steps_Up** is the procedure that
implements our cEA

**cea** contains the population
of our Evolutionary Algorithm. When the algorithm starts, the population
is initialized and evaluated.

**s** is a counter for the number
of steps

**x** is a counter for the number
of columns of the population

**y** is a counter for the number
of rows of the population

**Compute_Neigh** returns a list with the neighbors of the
individual allocated at position (x,y).

Click for more information about neighborhoods.

**position(x,y)** returns the individual of the population
located in the lattice at column **x** and row **y**.

**selected_inds** contains a list of individuals.

**Perform_Selection** selects one or more individuals from
a list of them -n_list-.

Click for more information about the selection operator.

**aux_pop** contains the population that is being originated
in the current generation.

**Apply_Reproduction_Operators** combines or modify one or
more individuals to obtain different individual(s).

Click for more information about the reproduction operators.

**Evaluate_Population** evaluates the solutions represented
by the individuals of the population.

Click for more information about the evaluation functions.

**Replace** replaces the current population with the population
of individuals created during the last generation.

Click for more information about the replacement policies.

** ****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 ;
**

10.

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:

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

- The algorithm finds an optimal solution to the problem.
- The algorithm reaches a certain number of generations (represented by MAX_STEPS) without finding an optimal solution and stops.

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).

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

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

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

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

The individuals of the new population are evaluated.