Cooperative Local Search
In Cooperative Local Search (CLS), there is a population of local solvers and each of them can be thought of as an explorer. Each explorer is associated with a articular solution. Several explorers can be made to cooperate by sharing the information that each of them obtais or learns during the search.
1 for each solver Solver(i): initialize solution s of Solver(i)
2 while not end do
3 for each solver Solver(i): execute G (granularity) steps.
4 obtain best solution (bsol) of all Solvers
5 update solution of each Solver(i) with bsol.
This skeleton (CLS) no requires specific classes but the problem must be implemented in the base local search skeleton. Also, we have to indicate in CLS.hh and Makefile the base local search and the specific problem. For example, if you want to solve the onemax problem using several cooperative SA algorithm, you must to modify the file as follows:
CLS.hh:
#include "SA/SA.hh"
using skeleton SA;
#define BaseSkeleton SA
Makefile:
BASE = SA
APP = onemax
The user must configure the files:
- CLS.cfg
- and BaseSkeleton.cfg
The last file had been explained in previous sections and the CLS.cfg includes the following parameters:
- Number of independent runs.
- Number of evaluations.
- Number of solvers.
- Execution granularity.
- BaseSkeleton.cfg path.
There are several basic steps to running a problem solve with CLS skeleton
1. Change to the problem directory
cd Mallba/rep/CLS/CLS-baseskeleton-problem
2. Compile skeleton.
make
3. Configure algorithm parameters (CLS.cfg and BaseSkeleton.cfg files)
4. Run problem:make SEQ
or
Main.seq CLS.hh problem_instance_path res_file_path