3.2. Reduction phase

This process (lines 3–5 of Algorithm 1) is graphically illustrated in Figure 1 using an example with 10 variables. The coarsening phase uses two levels to coarsen the problem down to three

3.4. Projection and refinement phases

assignment (lines 8 and 11 of Algorithm 1).

and converges to optimal or near-optimal solutions.

Evaluate the fitness of each individual in the population ;

Apply mutation if necessary to each offspring ;

Evaluate the fitness of the intermediate population ; Replace the parent population with a new generation

Apply local search to each chromosome ;

Select individuals according to a scheme to reproduce ;

Breed if necessary each selected pairs of individuals through crossover;

• Fitness function: it is a numerical value that expresses the performance of an individual (solution) so that different individuals can be compared. The fitness function is defined as

3.5. Evolutionary algorithm (MA)

Algorithm 2. Evolutionary algorithm

Generate initial population ;

while (Not Convergence reached) do

the number of unsatisfied clauses.

begin

end

The projection phase is the opposite process followed during the coarsening phase. The assignment reached at levelmþ<sup>1</sup> is now to be extended on is parent levelm. The extension algorithm is simple; if a cluster which belongs to levelmþ<sup>1</sup> is assigned the value of true, then the grouped pair of clusters that it represents, which belong to levelm, are also assigned the true value (line 10 of Algorithm 1). The evolutionary algorithm explained in the next section is used to improve the assignment during each level. The population reached at levelmþ<sup>1</sup> will serve as the initial population for levelm. The projected population already contains individuals with high fitness value leading MA to converge quicker within a few generations to a better

A Multilevel Evolutionary Algorithm Applied to the Maximum Satisfiability Problems

http://dx.doi.org/10.5772/intechopen.72843

207

The evolutionary algorithm proposed in this chapter and described in Algorithm 2 combines a genetic algorithms and local search. The algorithm maintains a population of solutions for the problem at hand (i.e., a pool having several solutions simultaneously). Each of these solutions is called an individual. Each generation consists of updating a population of individuals, hopefully leading to better solutions. The individuals from the set of solutions, which is called population, will evolve from generation to generation by repeated application of genetic operators and a local search scheme. Over many generations, the population becomes uniform

Figure 1. The various phases of the multilevel evolutionary algorithm.

clusters. P<sup>0</sup> corresponds to the original problem. The random-coarsening procedure is used to randomly merge the literals in pairs leading to a coarser problem (level) with five clusters. This process is repeated leading to the coarsest problem (P3) with three clusters. An initial population is generated where the clusters are randomly assigned the value of true or false. The figure shows an initial solution where one cluster is assigned the value of true and the remaining two clusters are assigned the value false. Thereafter, the computed initial solution is then improved with the evolutionary algorithm referred to as MA. As soon as the convergence criteria are reached at P2, the uncoarsening phase takes the whole population from that level and then extends it so that it serves as an initial population for the parent level P<sup>1</sup> and then proceeds with a new round of MA. This iteration process ends when MA reaches the stop criteria that is met at P0.

#### 3.3. Initial solution

The coarsening phase stops when the problem size reaches a threshold. A random procedure is used to generate an initial solution at the coarsest level. The clusters of every individual in the population are assigned the value of true or false in a random manner (line 7 of Algorithm 1).
