Configuration Options
This document provides a comprehensive overview of the available configuration options for different algorithms in the pyHMS library.
CMA-ES Configuration (CMALevelConfig)
The Covariance Matrix Adaptation Evolution Strategy (CMA-ES) is a powerful optimization algorithm for continuous domains.
Required Parameters
Parameter |
Type |
Description |
|---|---|---|
|
|
The optimization problem to solve |
|
|
Local stopping condition for this level |
|
|
Number of generations to run in each metaepoch |
Optional Parameters
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Initial step size parameter. If |
|
|
|
If |
|
Additional parameters passed directly to the |
Implementation Notes
The CMA-ES implementation is based on the
cma(https://pypi.org/project/cma/) package’sCMAEvolutionStrategyclassThe following parameters are set automatically:
bounds: Set from the problem’s boundsCMA_stds: Whenset_stds=True, calculated from parent deme populationRandom seed support through the
random_seedoption inTreeConfig
The implementation is located in
pyhms/demes/cma_deme.py
Evolutionary Algorithm Configuration (EALevelConfig)
The Evolutionary Algorithm (EA) implementations in pyHMS provide flexible population-based optimization approaches.
Required Parameters
Parameter |
Type |
Description |
|---|---|---|
|
|
Population size for the evolutionary algorithm |
|
|
The optimization problem to solve |
|
|
Local stopping condition for this level |
|
|
Number of generations to run in each metaepoch |
Optional Parameters
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
The class of evolutionary algorithm to use. Must inherit from |
|
|
|
Standard deviation used when sampling new individuals around a sprout seed. Controls diversity of the initial population when sprouting. |
|
|
Standard deviation for Gaussian mutation. Controls exploration vs exploitation balance. |
|
|
|
Optional parameter to adapt |
|
|
|
Number of elite individuals to preserve in each generation. |
|
|
|
Probability of mutation for each individual. |
|
|
|
Probability of crossover (used in |
Available EA Classes
pyHMS offers several variants of evolutionary algorithms:
Class |
Description |
|---|---|
|
Standard Evolutionary Algorithm with tournament selection and Gaussian mutation |
|
EA with tournament selection, arithmetic crossover, and Gaussian mutation |
|
EA with adaptive mutation rate that changes over time |
Implementation Notes
The implementation is located in
pyhms/demes/ea_deme.py, with specific algorithm variants inpyhms/demes/single_pop_eas/When used as a root deme, the initial population is sampled uniformly within the problem bounds
When used as a child deme, the initial population is sampled using a normal distribution around the sprout seed
The random seed can be set via the
random_seedoption inTreeConfig
Differential Evolution Configuration (DELevelConfig)
Differential Evolution (DE) is a population-based optimization algorithm that’s particularly effective for continuous optimization problems and robust against noise.
Required Parameters
Parameter |
Type |
Description |
|---|---|---|
|
|
Population size for the DE algorithm |
|
|
The optimization problem to solve |
|
|
Local stopping condition for this level |
|
|
Number of generations to run in each metaepoch |
Optional Parameters
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Standard deviation used when sampling new individuals around a sprout seed. Controls diversity of the initial population when sprouting. |
|
|
|
If True, uses adaptive scaling factor (dithering) which can improve convergence and robustness. |
|
|
|
Differential weight (F) in the range [0, 2]. Controls the amplification of differential vectors during mutation. |
|
|
|
Crossover probability (CR) in the range [0, 1]. Controls the fraction of parameter values copied from the mutant. |
Implementation Notes
The implementation is located in
pyhms/demes/de_deme.pywith the core DE algorithm inpyhms/demes/single_pop_eas/de.pyWhen used as a root deme, the initial population is sampled uniformly within the problem bounds
When used as a child deme, the initial population is sampled using a normal distribution around the sprout seed
The random seed can be set via the
random_seedoption inTreeConfig
Success-History Based Adaptive DE Configuration (SHADELevelConfig)
Success-History based Adaptive Differential Evolution (SHADE) is an advanced variant of DE that adaptively tunes its parameters based on successful search history.
Required Parameters
Parameter |
Type |
Description |
|---|---|---|
|
|
Population size for the SHADE algorithm |
|
|
The optimization problem to solve |
|
|
Local stopping condition for this level |
|
|
Number of generations to run in each metaepoch |
|
|
Size of the historical memory used to store successful parameter values |
Optional Parameters
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
|
|
Standard deviation used when sampling new individuals around a sprout seed. Controls diversity of the initial population when sprouting. |
Implementation Notes
The implementation is located in
pyhms/demes/shade_deme.pywith the core SHADE algorithm inpyhms/demes/single_pop_eas/de.pySHADE maintains a historical memory of successful control parameters (CR and F values)
When used as a root deme, the initial population is sampled uniformly within the problem bounds
When used as a child deme, the initial population is sampled using a normal distribution around the sprout seed
The random seed can be set via the
random_seedoption inTreeConfig