Evolution Controls

Package related to evolution controls.

Classes summary

Evolution_Controls.Evolution_Control.Evolution_Control()

Abstract class for evolution controls.

Evolution_Controls.Random_EC.Random_EC()

Class for random evolution control.

Evolution_Controls.Informed_EC.Informed_EC(surr)

Abstract class for informed evolution controls.

Evolution_Controls.POV_EC.POV_EC(surr)

Class for best predicted EC.

Evolution_Controls.Distance_EC.Distance_EC(surr)

Class for distance EC.

Evolution_Controls.Pred_Stdev_EC.Pred_Stdev_EC(surr)

Class for predictive standard deviation EC.

Evolution_Controls.Expected_Improvement_EC.Expected_Improvement_EC(surr)

Class for expected improvement EC.

Evolution_Controls.Probability_Improvement_EC.Probability_Improvement_EC(surr)

Class for probability of improvement EC.

Evolution_Controls.Lower_Confident_Bound_EC.Lower_Confident_Bound_EC(surr)

Class for lower confident bound EC.

Evolution_Controls.Adaptive_Wang2020_EC.Adaptive_Wang2020_EC(...)

Class for Wang-2020's adaptive EC.

Evolution_Controls.MO_POV_LCB_EC.MO_POV_LCB_EC(surr, q)

Class for the EC based on multi-objective POV and LCB from:

Evolution_Controls.MO_POV_LCB_IC.MO_POV_LCB_IC(surr)

Class for the IC based on multi-objective POV and LCB from:

Evolution_Controls.Ensemble_EC.Ensemble_EC(*ECs)

Abstract class for ensembles of EC.

Evolution_Controls.Pareto_EC.Pareto_EC(...)

Class for Pareto-based EC.

Evolution_Controls.Pareto_Tian2018_EC.Pareto_Tian2018_EC(...)

Class for bi-objective Pareto-based EC from Tian-2018.

Evolution_Controls.Dynamic_Exclusive_EC.Dynamic_Exclusive_EC(...)

Class for dynamic exclusive EC.

Evolution_Controls.Dynamic_Inclusive_EC.Dynamic_Inclusive_EC(...)

Class for dynamic inclusive EC.

Evolution_Controls.Adaptive_EC.Adaptive_EC(...)

Class for adaptive EC.

Evolution_Controls.Committee_EC.Committee_EC(...)

Class for committee of evolution controls.

Naive

Evolution Control (abstract)

class Evolution_Controls.Evolution_Control.Evolution_Control

Bases: ABC

Abstract class for evolution controls.

abstract get_sorted_indexes(pop)

Returns the candidates’ indexes sorted in descending promise order.

Parameters:

pop (Population) – population to split

Returns:

list of indexes

Return type:

np.ndarray

Random

class Evolution_Controls.Random_EC.Random_EC

Bases: Evolution_Control

Class for random evolution control.

get_sorted_indexes(pop)

Returns the candidates’ indexes sorted in descending promise order.

Parameters:

pop (Population) – population to split

Returns:

list of indexes

Return type:

np.ndarray

Informed

Informed (abstract)

class Evolution_Controls.Informed_EC.Informed_EC(surr)

Bases: Evolution_Control

Abstract class for informed evolution controls.

Parameters:

surr (Surrogate) – surrogate model

abstract get_IC_value(dvec)

Returns the promisingness values of candidates.

Parameters:

dvec (np.ndarray) – decision vectors

Returns:

the promise

Return type:

np.ndarray

abstract get_sorted_indexes(pop)

Returns the candidates’ indexes sorted in descending promise order.

Parameters:

pop (Population) – population to split

Returns:

list of indexes

Return type:

np.ndarray

Predicted Objective Value

class Evolution_Controls.POV_EC.POV_EC(surr)

Bases: Informed_EC

Class for best predicted EC.

Candidates with lower predicted objective value (POV) by the surrogate are more promising.

__init__ method’s input

Parameters:

surr (Surrogate) – surrogate model

get_sorted_indexes(pop)

Returns the candidates’ indexes sorted in descending promise order.

Parameters:

pop (Population) – population to split

Returns:

list of indexes

Return type:

np.ndarray

get_IC_value(dvec)

Returns the promisingness values of candidates.

Parameters:

dvec (np.ndarray) – decision vectors

Returns:

the promise

Return type:

np.ndarray

Distance

class Evolution_Controls.Distance_EC.Distance_EC(surr)

Bases: Informed_EC

Class for distance EC.

Candidates with greater distance from the set of already simulated candidates are more promising.

__init__ method’s input

Parameters:

surr (Surrogate) – surrogate model

get_sorted_indexes(pop)

Returns the candidates’ indexes sorted in descending promise order.

Parameters:

pop (Population) – population to split

Returns:

list of indexes

Return type:

np.ndarray

get_IC_value(dvec)

Returns the promisingness values of candidates.

Parameters:

dvec (np.ndarray) – decision vectors

Returns:

the promise

Return type:

np.ndarray

Predictive Standard Deviation

class Evolution_Controls.Pred_Stdev_EC.Pred_Stdev_EC(surr)

Bases: Informed_EC

Class for predictive standard deviation EC.

Candidates with greater predictive standard deviation are more promising.

__init__ method’s input

Parameters:

surr (Surrogate) – surrogate model

get_sorted_indexes(pop)

Returns the candidates’ indexes sorted in descending promise order.

Parameters:

pop (Population) – population to split

Returns:

list of indexes

Return type:

np.ndarray

get_IC_value(dvec)

Returns the promisingness values of candidates.

Parameters:

dvec (np.ndarray) – decision vectors

Returns:

the promise

Return type:

np.ndarray

Expected Improvement

class Evolution_Controls.Expected_Improvement_EC.Expected_Improvement_EC(surr)

Bases: Informed_EC

Class for expected improvement EC.

Candidates with greater expected improvement are more promising.

__init__ method’s input

Parameters:

surr (Surrogate) – surrogate model

get_sorted_indexes(pop)

Returns the candidates’ indexes sorted in descending promise order.

Parameters:

pop (Population) – population to split

Returns:

list of indexes

Return type:

np.ndarray

get_IC_value(dvec)

Returns the promisingness values of candidates.

Parameters:

dvec (np.ndarray) – decision vectors

Returns:

the promise

Return type:

np.ndarray

Probability Improvement

class Evolution_Controls.Probability_Improvement_EC.Probability_Improvement_EC(surr)

Bases: Informed_EC

Class for probability of improvement EC.

Candidates with greater probability of improvement are more promising.

__init__ method’s input

Parameters:

surr (Surrogate) – surrogate model

get_sorted_indexes(pop)

Returns the candidates’ indexes sorted in descending promise order.

Parameters:

pop (Population) – population to split

Returns:

list of indexes

Return type:

np.ndarray

get_IC_value(dvec)

Returns the promisingness values of candidates.

Parameters:

dvec (np.ndarray) – decision vectors

Returns:

the promise

Return type:

np.ndarray

Lower Confident Bound

class Evolution_Controls.Lower_Confident_Bound_EC.Lower_Confident_Bound_EC(surr, w=1.0)

Bases: Informed_EC

Class for lower confident bound EC.

Candidates with lower lower confident bound are more promising.

Parameters:

w (float in [0; 3]) – weight for LCB

__init__ method’s input

Parameters:

surr (Surrogate) – surrogate model

get_sorted_indexes(pop)

Returns the candidates’ indexes sorted in descending promise order.

Parameters:

pop (Population) – population to split

Returns:

list of indexes

Return type:

np.ndarray

get_IC_value(dvec)

Returns the promisingness values of candidates.

Parameters:

dvec (np.ndarray) – decision vectors

Returns:

the promise

Return type:

np.ndarray

Adaptive (from Wang-2020)

class Evolution_Controls.Adaptive_Wang2020_EC.Adaptive_Wang2020_EC(surr, search_budget, uncert_treatment)

Bases: Informed_EC

Class for Wang-2020’s adaptive EC.

The EC is described in: X. Wang, Y. Jin, S. Schmitt and M. Olhofer. An adaptive Bayesian approach to surrogate-assisted evolutionary multi-objective optimization. In Information Sciences 519 (2020), pp. 317–331. ISSN: 0020-0255.

At the early stage of the search, minimization of the predicted objective value prevails (favoring fast convergence). As the search progresses, more importance is given to uncertainty minimization (favoring exploitation) or uncertainty maximization (favoring exploration).

Parameters:
  • search_budget (positive int, not zero) – search budget (expressed either in number of generations, number of cycles, number of batches or time)

  • weight (float) – weight (alpha in Wang-2020)

  • uncert_treatment (int) – 1 for uncertainty minimization, -1 for uncertainty maximization

__init__ method’s input

Parameters:
  • surr (Surrogate) – surrogate model

  • uncert_treatment (str) – “min” for uncertainty minimization, “max” for uncertainty maximization

get_sorted_indexes(pop)

Returns the candidates’ indexes sorted in descending promise order.

Parameters:

pop (Population) – population to split

Returns:

list of indexes

Return type:

np.ndarray

get_IC_value(dvec)

Returns the promisingness values of candidates.

Parameters:

dvec (np.ndarray) – decision vectors

Returns:

the promise

Return type:

np.ndarray

update_EC(search_progress)

Set the weight according to the search progress.

Parameters:

search_progress (positive int) – current search progress (expressed either in number of generations, number of cycles, number of batches or time)

Multi-objective POV and LCB (from Ruan-2020)

class Evolution_Controls.MO_POV_LCB_EC.MO_POV_LCB_EC(surr, q)

Bases: Informed_EC

Class for the EC based on multi-objective POV and LCB from:

X. Ruan, K. Li, B. Derbel, and A. Liefooghe. Surrogate assisted evolutionary algorithm for medium scale multi-objective optimisation problems. In Proceedings of the 2020 Genetic and Evolutionary Computation Conference, GECCO 2020, page560–568, New York, NY, USA, 2020. Association for Computing Machinery

Parameters:

q (int) – number of candidates to retain for simulation

__init__ method’s input

Parameters:

surr (Surrogate) – surrogate model

get_sorted_indexes(pop)

Returns the candidates’ indexes sorted in descending promise order.

Parameters:

pop (Population) – population to split

Returns:

list of indexes

Return type:

np.ndarray

get_IC_value(dvec)

Returns the promisingness values of candidates.

Parameters:

dvec (np.ndarray) – decision vectors

Returns:

the promise

Return type:

np.ndarray

class Evolution_Controls.MO_POV_LCB_IC.MO_POV_LCB_IC(surr)

Bases: Informed_EC

Class for the IC based on multi-objective POV and LCB from:

X. Ruan, K. Li, B. Derbel, and A. Liefooghe. Surrogate assisted evolutionary algorithm for medium scale multi-objective optimisation problems. In Proceedings of the 2020 Genetic and Evolutionary Computation Conference, GECCO 2020, page560–568, New York, NY, USA, 2020. Association for Computing Machinery

__init__ method’s input

Parameters:

surr (Surrogate) – surrogate model

get_sorted_indexes(pop)

Returns the candidates’ indexes sorted in descending promise order.

Parameters:

pop (Population) – population to split

Returns:

list of indexes

Return type:

np.ndarray

get_IC_value(dvec)

Returns the promisingness values of candidates.

Parameters:

dvec (np.ndarray) – decision vectors

Returns:

the promise

Return type:

np.ndarray

Ensemble

Ensemble (abstract)

class Evolution_Controls.Ensemble_EC.Ensemble_EC(*ECs)

Bases: Evolution_Control

Abstract class for ensembles of EC.

Parameters:

ECs_list (list(Evolution_Control)) – evolution controls

abstract get_sorted_indexes(pop)

Returns the candidates’ indexes sorted in descending promise order.

Parameters:

pop (Population) – population to split

Returns:

list of indexes

Return type:

np.ndarray

Pareto

class Evolution_Controls.Pareto_EC.Pareto_EC(coeffs, distinct_mode, *ECs)

Bases: Ensemble_EC

Class for Pareto-based EC.

Candidate minimazing the first EC (multiplied by its coefficient -1 or 1) is the most promising. Candidate minimizing the second EC (multiplied by its coefficient -1 or 1) is the second most promising. Remaining candidates are ordering according to their non-dominated rank (the lowest the rank the more promising is the candidate). Candidates with same non-dominated rank are ordered either according to their crowding distance cd or according to their hypervolume contribution hvc.

Parameters:
  • coeffs (np.ndarray) – coefficients (1 or -1) to multiply the EC with (allow to convert a minimization problem into a maximization problem and reversely)

  • distinct_mode (either cd or hvc) – criterion to distinguish solutions with same non domination rank. When equals cd solutions with higher crowded distance are considered as more promising. When equals to hvc, solutions with higher hypervolume contribution are considered as more promising.

__init__ method’s input

Parameters:

ECs (list(Evolution_Control)) – evolution controls

get_sorted_indexes(pop)

Returns the candidates’ indexes sorted in descending promise order.

Parameters:

pop (Population) – population to split

Returns:

list of indexes

Return type:

np.ndarray

Pareto-based (from Tian-2018)

class Evolution_Controls.Pareto_Tian2018_EC.Pareto_Tian2018_EC(coeffs, *ECs)

Bases: Ensemble_EC

Class for bi-objective Pareto-based EC from Tian-2018.

Candidates with lowest non-dominated and highest rank according to minimization of the ECs (multiplied by their respective coefficient 1 or -1) are more promising. Then, Candidates with increasing non-dominated rank are increasingly promising.

The EC is described in : J. Tian, Y. Tan, J. Zeng, C. Sun and Y. Jin. Multi-objective Infill Criterion Driven Gaussian Process-Assisted Particle Swarm Optimization of High-Dimensional Expensive Problems. In IEEE Transactions on Evolutionary Computation 23.3 (June 2019), pp. 459–472. ISSN: 1941-0026.

Parameters:

coeffs (np.ndarray) – coefficients (1 or -1) to multiply the EC with (allow to convert a minimization problem into a maximization problem and reversely)

__init__ method’s input

Parameters:

ECs (list(Evolution_Control)) – evolution controls

get_sorted_indexes(pop)

Returns the candidates’ indexes sorted in descending promise order.

Parameters:

pop (Population) – population to split

Returns:

list of indexes

Return type:

np.ndarray

Dynamic Exclusive

class Evolution_Controls.Dynamic_Exclusive_EC.Dynamic_Exclusive_EC(search_budget, sections, *ECs)

Bases: Ensemble_EC

Class for dynamic exclusive EC.

Only one EC is active at a time. The active EC changes during the search according to the search budget, the activation sections and the current search progress.

Parameters:
  • search_budget (positive int, not zero) – search budget (expressed either in number of generations, number of acquisition processes or time)

  • sections (list) – activation sections (determines the moment to change the active EC)

  • idx_active (positive int) – index of the current active EC in ECs_list

__init__ method’s input

Parameters:

ECs (list(Evolution_Control)) – evolution controls

get_sorted_indexes(pop)

Returns the candidates’ indexes sorted in descending promise order.

Parameters:

pop (Population) – population to split

Returns:

list of indexes

Return type:

np.ndarray

update_active(search_progress)

Update the active EC.

Parameters:

search_progress (positive int) – current search progress (expressed either in number of generations, number of acquisition processes or time)

Dynamic Inclusive

class Evolution_Controls.Dynamic_Inclusive_EC.Dynamic_Inclusive_EC(search_budget, N_SIM, N_PRED, *ECs)

Bases: Ensemble_EC

Class for dynamic inclusive EC.

Designed as an ensemble of 2 ECs only. Two ECs are active at a time. The proportion of use of each EC changes during the search according to the search budget, and the current search progress.

Parameters:
  • search_budget (positive int, not zero) – search budget (expressed either in number of generations, number of acquisition processes or time)

  • search_progress (positive int, not zero) – search progress (expressed either in number of generations, number of acquisition processes or time)

  • N_SIM (int, positive) – number of solution to select for simulation

  • N_PRED (int, positive) – number of solution to select for prediction

__init__ method’s input

Parameters:

ECs (list(Evolution_Control)) – evolution controls

get_sorted_indexes(pop)

Returns the candidates’ indexes sorted in descending promise order.

Parameters:

pop (Population) – population to split

Returns:

list of indexes

Return type:

np.ndarray

update_active(search_progress)

Update the proportion of use of each EC.

Parameters:

search_progress (positive int) – current search progress (expressed either in number of generations, number of acquisition processes or time)

Adaptive

class Evolution_Controls.Adaptive_EC.Adaptive_EC(sim_obj_vals, pred_obj_vals, init_best_obj_val, *ECs)

Bases: Ensemble_EC

Class for adaptive EC.

Only one EC is active at a time. The active EC is switched according to a stagnation detection mechanism and a reward mechanism. The stagnation detection mechanism triggers the EC switch when the best simulated objective value found so far has not improve by at least 1e-8 during 8 batches (i.e. 8 acquisition processes). The reward mechanism chooses which EC becomes active by rewarding and penalizing all the ECs at each batch (i.e. each acquisition process) according to the error between the simulated objective values and the predicted objective values computed on the last batch of candidates.

Parameters:
  • previous_best_obj_val (float) – best simulated objective value found so far

  • counter (int) – counter for the stagnation detection mechanism

  • ECs_reward (list) – rewards of each EC

  • idx_active (positive int) – index of the current active EC in ECs_list

  • threshold (float) – threshold value (mean error between simulated objective values and predicted objective values from the last batches of simulations)

  • saved_idx (np.ndarray) – 1 row per EC. A row contains the candidates indexes (into the population) ordered according to the associated EC.

__init__ method’s input

Parameters:
  • sim_obj_vals (np.ndarray) – simulation objective values of the last batch of candidates (to initialize threshold)

  • pred_obj_vals (np.ndarray) – prediction objective values of the last batch of candidates (to initialize threshold)

  • init_best_obj_val (float) – initial best simulated objective value found

  • ECs (list(Evolution_Control)) – evolution controls

get_sorted_indexes(pop)

Returns the candidates’ indexes sorted in descending promise order.

Parameters:

pop (Population) – population to split

Returns:

list of indexes

Return type:

np.ndarray

update_active(sim_obj_vals, pred_obj_vals, new_best_obj_val)

Set the rewards/penalties, update the threshold and the counter. Potentially update the active EC.

Reward mechanism: The error, computed as the difference between simulated and predicted objective values over the last batch of candidates, is compared to the threshold. A small error produces a reward for ECs that should have decided to simulate (including the active EC) and produces a penalty for other ECs. A large error produces a penalty for ECs that should have decided to simulate (including the active EC) and produces a reward for other ECs.

Stagnation detection mechanism: if the best simulated objective value found so far has not improved by at least 1e-2 during 8 iteration, the active EC is updated. If the last active EC get the higher reward, it remains the active EC. When the stagnation detection occurs, the counter and the reward vector are reset.

Parameters:
  • sim_obj_vals (np.ndarray) – simulation objective values of the last batch of candidates (to compute the error)

  • pred_obj_vals (np.ndarray) – prediction objective values of the last batch of candidates (to compute the error)

  • new_best_obj_val (float) – best simulated objective value found so far

Committee

class Evolution_Controls.Committee_EC.Committee_EC(n_sim, *ECs)

Bases: Ensemble_EC

Class for committee of evolution controls.

All the ECs vote to determine the promise of the candidates.

Parameters:

n_sim (positive int, not zero) – number of simulated candidates from the batch

__init__ method’s input

Parameters:

ECs (list(Evolution_Control)) – evolution controls

get_sorted_indexes(pop)

Returns the candidates’ indexes sorted in descending promise order.

Parameters:

pop (Population) – population to split

Returns:

list of indexes

Return type:

np.ndarray