|
OptiPy
|
Implements the DE/best/1 mutation strategy. More...
#include <Best1.h>
Public Member Functions | |
| std::vector< double > | mutate (const std::vector< std::vector< double > > &population, size_t targetIndex, double F, const std::vector< double > &bestVector, MersenneTwister &mt, double lowerBound, double upperBound) override |
| Generates a mutant vector using DE/best/1 strategy. | |
| Public Member Functions inherited from Mutation | |
| virtual | ~Mutation ()=default |
| Virtual destructor for safe polymorphic deletion. | |
Additional Inherited Members | |
| Protected Member Functions inherited from Mutation | |
| std::vector< size_t > | getSubset (size_t populationSize, size_t subsetSize, size_t source, MersenneTwister &mt) |
| Selects a random subset of population indices, excluding a source index. | |
Implements the DE/best/1 mutation strategy.
Strategy: DE/best/1 (Best-1)
A highly exploitative mutation strategy that biases mutations toward the best (lowest fitness) solution found so far. This creates a directed search toward known good regions while still maintaining diversity through difference vectors.
Formula:
\[ v_i(t) = x_{best}(t) + F \cdot (x_{r1}(t) - x_{r2}(t)) \]
Where:
Algorithm:
Characteristics:
Exploration: Very low
Exploitation: Very high
Robustness: Poor to moderate
Convergence Speed: Very fast
Parameter Recommendations:
Comparison with Other Strategies:
| Strategy | Base | Differences | Exploration | Convergence |
|---|---|---|---|---|
| Rand1 | Random | 1 | Very High | Very Slow |
| Best1 | Best | 1 | Very Low | Very Fast |
| Rand2 | Random | 2 | Extreme | Slow |
| Best2 | Best | 2 | Moderate | Moderate |
| RandBest1 | Hybrid | 1 | Moderate | Moderate |
Use Cases:
Avoid When:
Synergy with Other Components:
Best1 works best when combined with:
Implementation Details:
The implementation is straightforward:
Complexity:
Time: O(dimension) Space: O(dimension) for the mutant vector
Example Usage:
Typical Performance Profile:
Historical Context:
DE/best/1 is one of the earliest variants developed after the original DE/rand/1. It remains widely used and is the default strategy in many DE implementations. More recent strategies like RandBest1 attempt to balance Best1's speed with Rand1's robustness.
|
inlineoverridevirtual |
Generates a mutant vector using DE/best/1 strategy.
Applies the formula: mutant = best + F * (r1 - r2) where r1 and r2 are randomly selected distinct individuals.
| [in] | population | Current population of solutions |
| [in] | targetIndex | Index of the target individual (excluded from selection) |
| [in] | F | Differential weight; typical range 0.5-1.0 |
| [in] | bestVector | The best solution found so far (used as base) |
| [in,out] | mt | Random number generator for selection |
| [in] | lowerBound | Lower domain bound |
| [in] | upperBound | Upper domain bound |
Implements Mutation.