Problem Description
The optimization module implements four algorithms: Differential
Evolution, Algorithm jSO, Random Search, and Evolution Strategy with
Covariance Matrix Adaptation. All these algorithms accept seven
parameters: `cost_function`, `params`, `gen`, `value_to_reach`,
`cancellation`, `current_minimum_cost`, and `queries`. Unfortunately,
the Differential Evolution algorithm doesn't maintain parameter
consistency with the other three algorithms: the last two parameters
(`current_minimum_cost` and `queries`) are in reverse order compared to
the other algorithms. This appears to be an unintentional oversight.
Solution
- Adjust the parameter order in the Differential Evolution algorithm to ensure consistency with other optimization algorithms
- Update the algorithm documentation accordingly
(No changes to example code were needed as the examples don't use these two parameters)
Through a combination of silly mistakes, I missed a pile of race conditions in the OpenMP threading.
Switch to C++ threading. Note that this change requires serial generation of trial vectors.
Hopefully I can figure out to parallelize the generation of trial vectors to reduce the serial section a la Ahmdahl's law,
while simultaneously keeping thread sanitizer happy.