o
odinpkg.dev
packages / library / TOP_Mathematical_Optimization_algorithm_SHADE__ADE_AESDE_in_Odin

TOP_Mathematical_Optimization_algorithm_SHADE__ADE_AESDE_in_Odin

c2144b4library

One can say that this mathematical optimizer is on a class of its own, it solves Rosenbrock 600 Dimensions in less then one hour, on a sinlge thread on a slow computer.

No license · updated 9 months ago

TOP Mathematical Optimization algorithm SHADE ADE-AESDE in Odin

One can say that this optimizer is on a class of its own, it solves Rosenbrock 600 Dimensions in less then one hour, on a sinlge thread on a slow computer.

Desciption

This is the implmentation of the mathematical Optimizer ADE-AESDE that is a SHADE familly kind of optimizer. SHADE optimizer means ( Success-History based Adaptive Differential Evolution ) and ADE-AESDE means Archive-based Evolution Strategy with Differential Evolution, the algorithm should use an external archive and a adaptative mutation strategy.
This is a high-performing implementation of the ADE-AESDE concept.
ADE-AESDE isn't a single, rigid algorithm. It's a conceptual framework that describes a family of advanced Differential Evolution (DE) algorithms. The name itself breaks down the required features:

  • ADE ( Adaptive Differential Evolution ): The algorithm must adapt its control parameters, like the scaling factor (F) and crossover rate (CR), as it runs.
  • AESDE ( Archive-based Evolutionary Strategy with Differential Evolution ): The algorithm should use an external archive and an adaptive mutation strategy.

The current code implements SHADE (Success-History based Adaptive DE), which perfectly fits this description.

ADE-AESDE Concept How the Current Code Implements It

  • Adaptive DE The code uses a success-history memory ( memory_F and memory_CR ). When a new solution is successful, its F and CR values are stored. The algorithm then generates new parameters based on the historical success of past ones, allowing it to learn what works best for the problem.

  • External Archive The code maintains an archive array. When a solution is replaced by a better one, the old, inferior solution is stored in this archive. This archive is then used in the mutation step to increase population diversity and help the algorithm avoid getting stuck in local optima.

  • Adaptive Strategy The code uses the "current-to-pbest/1" mutation strategy. This is an adaptive strategy because it directs the search towards one of the percentile-best solutions, balancing exploration with exploitation of good regions in the search space.

Dimension VS Time on a slow CPU

Rosenbrock
 10 Dimension  -             3 ms
 50 Dimesions  -         1.23 seconds
100 Dimensions -         9.79 seconds
200 Dimensions -    1 m 27 second
300 Dimensions -    5 m 16 seconds
500 Dimensions -   30 m 
600 Dimensions - < 56 m 
700 Dimensions -   ???

Single Thread VS Multi Thread

This code is single threaded, but the algorithm is population based so it can be easily multithread to use 16 threads on a 8 core AMD or 32 threads, so the possibility to huge gains is there. I extimate that a possibility os 8 to 14 incrise in performance is there to be gained from a newer Top performance CPU, but my CPU is old and modest with a small cache. So if you have a newer CPU your times will be much better then maine. And if you paralelize they will be much much better then maine.

License

MIT Open Source License

Have fun

Best regards,
Joao Carvalho