Shuffled Complex Evolution (SCE)¶
Implementation¶
There are some details that vary between different SCE implementations. These are small tweaks (automatic calculation of metaparameters, elitism, behaviour at the param bounds, etc) which can be important.
The implementation in Kalix follows that of Fors, which is as follows:
Main algorithm
- Input parameters:
n_complexes(mandatory)termination_evaluations(mandatory)n_params(defined by problem)n_threads(optional)-
random_seed(optional) -
Compute metaparameters:
m = 2 * n_params + 1= number of points per complexs = n_complexes * m= total size of population across all complexesb = m= number of breeding iterations in the CCE algorithmp = n_params + 1= number of parents in the simplex-
elitism = 1= weighting scheme (1 → trapezoidal weighting per Duan etal 1994) -
Use latin hypercube sampling method to generate random parameters for all
smembers of the initial population. -
Evaluate the objective function values for all
smembers. Keep track of the total number of evaluations we have donen_evaluations = s. -
Sort them from best to worst (lowest-to-highest objective value). Keep a record of the best solution.
-
Use round robin method to divide the population into
n_complexescomplexes. This means member numberigoes into complex numberi % n_complexes. After this each new complex will havemmembers. -
While
n_evaluations < termination_evaluationsiterate: - Run the CCE algorithm independently (sequentially or in parallel) to evolve each complex. After this, each complex will have some different members, and all their objective function values will be evaluated.
- Update the number of evaluations based on how many were done to evolve the complexes
n_evaluations = n_evaluations + new_evaluations. - Combine the members from all complexes into a single population of
smembers. - Sort them from best to worst (lowest-to-highest objective value). Keep a record of the best solution.
- Use round robin method to divide the population into
n_complexescomplexes. This means member numberigoes into complex numberi % n_complexes. After this each new complex will havemmembers. -
Begin next iteration.
-
Report the best solution.
CCE algorithm
- Do
bbreeding iterations to the given complex. (Recall thatb = min this implementation, meaning that we do as many breeding iterations as we have members). Each breeding iteration involves the following steps: - Use trapezoidal selection method to select
pmembers (called a simplex) from the current complex. In our implementation the simplex contains just over half of the complex members. Trapezoidal selection goes as follows:- Make a new list of all the complex members, sorted by objective value from best to worst (lowest-to-highest). Calculate a selection weight for each of the complex members,
weight[i] = pow(n - i, elitism). - Randomly select
pmembers, without replacement, forming the simplex.
- Make a new list of all the complex members, sorted by objective value from best to worst (lowest-to-highest). Calculate a selection weight for each of the complex members,
- Sort the members of the simplex from best to worst (lowest-to-highest). Make a note of the worst objective value in the simplex,
obj_worst. - Calculate the centroid point of the simplex while ignoring the worst member. That is, calculate the average value for each model parameter across all members except for the worst member.
- Calculate the reflection point by reflecting the worst point across the centroid (to the other side of the centroid).
- Calculate a random point by assigning completely random values to the parameters.
- Calculate the contraction point which is half way between the worst point and the centroid.
- Proposed params = reflection point. But if the reflection point is invalid (outside parameter bounds) then proposed params = random point. Evaluate the objective function. If
obj_proposedis better thanobj_worstreplace it in the complex… - … else proposed params = contraction point, and evaluate the objective function. If
obj_proposedis better thanobj_worstreplace it in the complex… -
… else as a last resort calculate a new random point and by assigning completely random values to the parameters and evaluate the objective function. Regardless of whether
obj_proposedis better thanobj_worstreplace it in the complex. -
After
bbreeding iterations, return the updated complex to the main algorithm.
Planned improvements¶
Fors definitely isn’t the endgame here, for example I know it becomes very inefficient late in the optimisation.
Modern variations¶
- Chu Gao and Sorooshian did a paper in 2010. This is attached below.
-
Sorooshian did SC-SAHEL in 2020. It involves combining multiple evolutionary algorithms within a SCE framework… which is a lot of work to code up 😄 Shuffled Complex Self Adaptive Hybrid Evolution (SC-SAHEL)
-
Some guys at Victoria University have made some improvements that look good when benchmarked against basic test functions.
Muttil 2008 - Shuffled Complex Evolution Model Calibrating Algorithm.pdf
References¶
https://www.mathworks.com/matlabcentral/fileexchange/7671-shuffled-complex-evolution-sce-ua-method