|
OptiPy
|
Implements binomial (uniform) crossover strategy. More...
#include <BinCrossover.h>
Public Member Functions | |
| void | crossover (std::vector< double > &target, const std::vector< double > &mutant, double cr, MersenneTwister &mt) override |
| Performs binomial crossover between target and mutant vectors. | |
| Public Member Functions inherited from Crossover | |
| virtual | ~Crossover ()=default |
| Virtual destructor for safe polymorphic deletion. | |
Implements binomial (uniform) crossover strategy.
Strategy: Binomial Crossover (DE/uniform/1)
The most commonly used crossover strategy. Creates trial vector by independently selecting each parameter to either inherit from mutant or retain from target. Each parameter makes an independent random decision.
Algorithm:
Pseudocode:
Characteristics:
Independence: Each parameter independently chosen
Guarantee: At least one parameter from mutant
Probability Distribution: Uniform
Exploration: Moderate to High
Typical Behavior:
Advantages:
Disadvantages:
When to Use:
Parameter Recommendations:
Crossover Rate (CR):
Synergy with Mutations:
Implementation Details:
The implementation uses:
Complexity:
Time: O(dimension) - must examine each parameter Space: O(1) - modifies target in-place
Example Usage:
Typical Performance Profile:
Historical Context:
Binomial crossover was introduced in the original DE paper by Storn and Price (1997) and remains the most widely used crossover operator. Its simplicity, robustness, and effectiveness across problem types have made it the default choice in most DE implementations.
Comparison with Exponential Crossover:
| Aspect | Binomial | Exponential |
|---|---|---|
| Selection | Independent each parameter | Contiguous block |
| Spatial Bias | None | Weak (sequential) |
| Exploration | Uniform | Structured |
| Implementation | O(dimension) loop | O(inherited count) loop |
| Default | Yes (most common) | No (specialized) |
| Robustness | Excellent | Good |
| Best For | General purpose | Ordered/structured problems |
|
inlineoverridevirtual |
Performs binomial crossover between target and mutant vectors.
Independently selects each parameter to inherit from mutant with probability CR. Guarantees at least one parameter from mutant via jrand.
| [in,out] | target | Target vector, modified in-place to become trial |
| [in] | mutant | Mutant vector as crossover source |
| [in] | cr | Crossover rate; typical range 0.1-0.95 |
| [in,out] | mt | Random number generator |
Implements Crossover.