Discussing the article: "Population optimization algorithms: Micro Artificial immune system (Micro-AIS)" - page 3

 
Vladimir Suslov #:

max = pi/2 + n*2*pi

where n is any integer


where is the restriction?


Can the period of the bag be a negative number? No? Here is the restriction from below.
can the period of the flywheel be greater than 10000? it can, but there is no sense in it, so here is the restriction from above.
etc. practical problems have constraints, that's why they are N-complete (though not only that) otherwise it makes no practical sense to apply optimisation algorithms - it will take a long time. think about it.
 
Andrey Dik #:

can the mach period be a negative number? no? here's the constraint from below.
can the period of the checker be greater than 10000? It can, but there is no sense in it, that's the restriction from above.
etc. practical problems have constraints, that's why they are N-complete (though not only that)

actually I was talking to fxsaber specifically about his FF

no desire to switch to mashka with...

fxsaber
fxsaber
  • 2024.01.20
  • www.mql5.com
Профиль трейдера
 
Vladimir Suslov #:

actually I was talking to fxsaber specifically about his FF

no desire to switch to mashki s...

Ah, sorry. Keep talking, sorry for interrupting your conversation.
 

On the topic of applying optimisation to TCs. It is difficult for me to imagine a TS that it is reasonable to optimise simultaneously for more than ten inputs.

Therefore, it seems that the "degrees of freedom" of a TS are less than a dozen. This includes some requirements for optimisation algorithms - coolness is no longer about universality (optimise a super-complex thing with a huge number of inputs).


I.e. for TC you need to understand what you really want to get from optimisation.

 
fxsaber #:

On the topic of applying optimisation to TCs. It is difficult for me to imagine a TS that can be optimised for more than ten inputs simultaneously.

Therefore, it seems that the "degrees of freedom" of a TS are less than a dozen. Hence some requirements to optimisation algorithms - the coolness is no longer in versatility (optimise a super-complex thing with a huge number of inputs).


I.e. for TC you need to understand what you really want to get from optimisation.


The field of application of optimisation of more than 10 parameters is vast.
The first is patterns.
Second - live portfolios.
Third - neural networks and combines, live "hardware"
Fourth - everything that can talk to us now from behind the screen will soon be even smarter thanks to self-adaptive systems with thousands, billions of parameters.

Life came about by optimising amino acids just as the first.... That's optimisation too, the first one to pass the Global Optimisation test.
 
Andrey Dik #:
The field of application of optimisation of more than 10 parameters is extensive.

I was talking about TC.

 
fxsaber #:

I was talking about TC.


So was I.
 
Andrey Dik #:

some types of algorithms may overestimate results on benchmarks that use multiple duplication (to simulate multidimensionality).

According to this methodology. testing with the Hilly function.

#define  dInput01 X1
#define  dInput02 Y1
#define  dInput03 X2
#define  dInput04 Y2
#define  dInput05 X3
#define  dInput06 Y3

#include <fxsaber\Input_Struct\Input_Struct.mqh> // https://www.mql5.com/ru/code/47932

INPUT_STRUCT inInputs;

MACROS_INPUT(double, X1, 0);
MACROS_INPUT(double, Y1, 0);
MACROS_INPUT(double, X2, 0);
MACROS_INPUT(double, Y2, 0);
MACROS_INPUT(double, X3, 0);
MACROS_INPUT(double, Y3, 0);

#include <Math\Functions.mqh> // https://www.mql5.com/ru/articles/13951

double OnTester()
{
  static C_Hilly Hilly;

  double Arg[];
  const int Amount = inInputs.ToArray(Arg) >> 1;
  
  return(Hilly.CalcFunc(Arg, Amount));
}

#include <fxsaber\Optimization\Optimization_Addon.mqh> // https://www.mql5.com/ru/blogs/post/755815


Settings.


Custom.


Custom.

PSO Finished 5580 of 30000 planned passes: true
BestResult = 0.7742122055850458: X1 = -1.48, Y1 = 0.63, X2 = -1.48, Y2 = 0.63, X3 = 2.5100000000000002, Y3 = -3.0
Check = 0.7742122055850458: X1 = -1.48, Y1 = 0.63, X2 = -1.48, Y2 = 0.63, X3 = 2.5100000000000002, Y3 = -3.0

01: OPTIMIZATION_METHOD_AO_Micro_AIS
OPTIMIZATION_METHOD_AO_Micro_AIS
BestResult = 0.859449852020672: X1 = -1.51, Y1 = 0.5800000000000001, X2 = -1.4, Y2 = 0.5700000000000003, X3 = 0.52, Y3 = -0.48999999999999977
Check = 0.859449852020672: X1 = -1.51, Y1 = 0.5800000000000001, X2 = -1.4, Y2 = 0.5700000000000003, X3 = 0.52, Y3 = -0.48999999999999977

02: OPTIMIZATION_METHOD_AO_POES
OPTIMIZATION_METHOD_AO_POES
BestResult = 0.9647613369275468: X1 = -1.49, Y1 = 0.6499999999999999, X2 = -1.41, Y2 = 0.56, X3 = -1.54, Y3 = 0.6499999999999999
Check = 0.9647613369275468: X1 = -1.49, Y1 = 0.6499999999999999, X2 = -1.41, Y2 = 0.56, X3 = -1.54, Y3 = 0.6499999999999999

03: OPTIMIZATION_METHOD_AO_P_O_ES
OPTIMIZATION_METHOD_AO_P_O_ES
BestResult = 0.9858374371924213: X1 = -1.48, Y1 = 0.5800000000000001, X2 = -1.46, Y2 = 0.5800000000000001, X3 = -1.47, Y3 = 0.6499999999999999
Check = 0.9858374371924213: X1 = -1.48, Y1 = 0.5800000000000001, X2 = -1.46, Y2 = 0.5800000000000001, X3 = -1.47, Y3 = 0.6499999999999999

04: OPTIMIZATION_METHOD_AO_SC
OPTIMIZATION_METHOD_AO_SC
BestResult = 0.46044186528197245: X1 = -1.66, Y1 = 0.6499999999999999, X2 = 2.7300000000000004, Y2 = 1.9699999999999998, X3 = 2.24, Y3 = -1.3599999999999999
Check = 0.46044186528197245: X1 = -1.66, Y1 = 0.6499999999999999, X2 = 2.7300000000000004, Y2 = 1.9699999999999998, X3 = 2.24, Y3 = -1.3599999999999999

05: OPTIMIZATION_METHOD_AO_SIA
OPTIMIZATION_METHOD_AO_SIA
BestResult = 0.5396179505233242: X1 = -1.33, Y1 = 0.5100000000000002, X2 = -1.49, Y2 = 1.4900000000000002, X3 = -1.8, Y3 = 0.56
Check = 0.5396179505233242: X1 = -1.33, Y1 = 0.5100000000000002, X2 = -1.49, Y2 = 1.4900000000000002, X3 = -1.8, Y3 = 0.56

06: OPTIMIZATION_METHOD_AO_SA
OPTIMIZATION_METHOD_AO_SA
BestResult = 0.5321147995285683: X1 = 1.38, Y1 = -1.58, X2 = -1.38, Y2 = 0.45999999999999996, X3 = 2.46, Y3 = 1.2800000000000002
Check = 0.5321147995285683: X1 = 1.38, Y1 = -1.58, X2 = -1.38, Y2 = 0.45999999999999996, X3 = 2.46, Y3 = 1.2800000000000002

07: OPTIMIZATION_METHOD_AO_NMm
OPTIMIZATION_METHOD_AO_NMm
BestResult = 0.9920100032939798: X1 = -1.44, Y1 = 0.6099999999999999, X2 = -1.5, Y2 = 0.6000000000000001, X3 = -1.48, Y3 = 0.6200000000000001
Check = 0.9920100032939798: X1 = -1.44, Y1 = 0.6099999999999999, X2 = -1.5, Y2 = 0.6000000000000001, X3 = -1.48, Y3 = 0.6200000000000001

08: OPTIMIZATION_METHOD_AO_DE
OPTIMIZATION_METHOD_AO_DE
BestResult = 0.5455473633280449: X1 = -1.5, Y1 = 0.5700000000000003, X2 = -0.029999999999999805, Y2 = -0.8900000000000001, X3 = 1.42, Y3 = -1.3
Check = 0.5455473633280449: X1 = -1.5, Y1 = 0.5700000000000003, X2 = -0.029999999999999805, Y2 = -0.8900000000000001, X3 = 1.42, Y3 = -1.3

09: OPTIMIZATION_METHOD_AO_SDOm
OPTIMIZATION_METHOD_AO_SDOm
BestResult = 0.7851698884766712: X1 = -1.48, Y1 = 0.6099999999999999, X2 = -0.48999999999999977, Y2 = -2.57, X3 = -1.48, Y3 = 0.6099999999999999
Check = 0.7851698884766712: X1 = -1.48, Y1 = 0.6099999999999999, X2 = -0.48999999999999977, Y2 = -2.57, X3 = -1.48, Y3 = 0.6099999999999999

10: OPTIMIZATION_METHOD_AO_IWDm
OPTIMIZATION_METHOD_AO_IWDm
BestResult = 0.541122421125687: X1 = 1.6100000000000003, Y1 = 2.7300000000000004, X2 = -1.52, Y2 = 0.6299999999999999, X3 = -1.63, Y3 = 3.0
Check = 0.541122421125687: X1 = 1.6100000000000003, Y1 = 2.7300000000000004, X2 = -1.52, Y2 = 0.6299999999999999, X3 = -1.63, Y3 = 3.0

11: OPTIMIZATION_METHOD_AO_CSS
OPTIMIZATION_METHOD_AO_CSS
BestResult = 0.5193274099236366: X1 = -1.52, Y1 = 0.6699999999999999, X2 = 0.2400000000000002, Y2 = 2.24, X3 = -1.78, Y3 = -2.29
Check = 0.5193274099236366: X1 = -1.52, Y1 = 0.6699999999999999, X2 = 0.2400000000000002, Y2 = 2.24, X3 = -1.78, Y3 = -2.29

12: OPTIMIZATION_METHOD_AO_SDS
OPTIMIZATION_METHOD_AO_SDS
BestResult = 0.7382103272996998: X1 = -1.41, Y1 = 0.5899999999999999, X2 = 3.0, Y2 = 1.42, X3 = -1.43, Y3 = 0.6800000000000002
Check = 0.7382103272996998: X1 = -1.41, Y1 = 0.5899999999999999, X2 = 3.0, Y2 = 1.42, X3 = -1.43, Y3 = 0.6800000000000002

13: OPTIMIZATION_METHOD_AO_SDSm
OPTIMIZATION_METHOD_AO_SDSm
BestResult = 0.6404573711868022: X1 = -1.7, Y1 = 0.5999999999999996, X2 = -2.1, Y2 = -2.85, X3 = -1.55, Y3 = 0.5800000000000001
Check = 0.6404573711868022: X1 = -1.7, Y1 = 0.5999999999999996, X2 = -2.1, Y2 = -2.85, X3 = -1.55, Y3 = 0.5800000000000001

14: OPTIMIZATION_METHOD_AO_MEC
OPTIMIZATION_METHOD_AO_MEC
BestResult = 0.5746017381403192: X1 = -2.4299999999999997, Y1 = 1.4800000000000004, X2 = -1.47, Y2 = 0.6200000000000001, X3 = 0.52, Y3 = 2.4699999999999998
Check = 0.5746017381403192: X1 = -2.4299999999999997, Y1 = 1.4800000000000004, X2 = -1.47, Y2 = 0.6200000000000001, X3 = 0.52, Y3 = 2.4699999999999998

15: OPTIMIZATION_METHOD_AO_SFL
OPTIMIZATION_METHOD_AO_SFL
BestResult = 0.6012543161639043: X1 = -1.48, Y1 = 0.71, X2 = -1.48, Y2 = 0.9300000000000002, X3 = -1.18, Y3 = 1.4699999999999998
Check = 0.6012543161639043: X1 = -1.48, Y1 = 0.71, X2 = -1.48, Y2 = 0.9300000000000002, X3 = -1.18, Y3 = 1.4699999999999998

16: OPTIMIZATION_METHOD_AO_EM
OPTIMIZATION_METHOD_AO_EM
BestResult = 0.49859345948875217: X1 = -1.26, Y1 = 1.37, X2 = 2.1799999999999997, Y2 = -0.5299999999999998, X3 = -1.5, Y3 = 0.5
Check = 0.49859345948875217: X1 = -1.26, Y1 = 1.37, X2 = 2.1799999999999997, Y2 = -0.5299999999999998, X3 = -1.5, Y3 = 0.5

17: OPTIMIZATION_METHOD_AO_SSG
OPTIMIZATION_METHOD_AO_SSG
BestResult = 0.9248462969380026: X1 = -1.42, Y1 = 0.6499999999999999, X2 = -1.58, Y2 = 0.54, X3 = -1.42, Y3 = 0.5500000000000003
Check = 0.9248462969380026: X1 = -1.42, Y1 = 0.6499999999999999, X2 = -1.58, Y2 = 0.54, X3 = -1.42, Y3 = 0.5500000000000003

18: OPTIMIZATION_METHOD_AO_MA
OPTIMIZATION_METHOD_AO_MA
BestResult = 0.5319860043547983: X1 = 0.6000000000000001, Y1 = 1.7800000000000002, X2 = -1.42, Y2 = 0.5500000000000003, X3 = -1.48, Y3 = -2.59
Check = 0.5319860043547983: X1 = 0.6000000000000001, Y1 = 1.7800000000000002, X2 = -1.42, Y2 = 0.5500000000000003, X3 = -1.48, Y3 = -2.59

19: OPTIMIZATION_METHOD_AO_HS
OPTIMIZATION_METHOD_AO_HS

Error optimization!

20: OPTIMIZATION_METHOD_AO_GSA
OPTIMIZATION_METHOD_AO_GSA
BestResult = 0.571513952024667: X1 = 1.5700000000000003, Y1 = -1.48, X2 = -1.39, Y2 = 0.71, X3 = 1.5499999999999998, Y3 = -0.040000000000000036
Check = 0.571513952024667: X1 = 1.5700000000000003, Y1 = -1.48, X2 = -1.39, Y2 = 0.71, X3 = 1.5499999999999998, Y3 = -0.040000000000000036

21: OPTIMIZATION_METHOD_AO_GSA_Stars
OPTIMIZATION_METHOD_AO_GSA_Stars

Error optimization!

22: OPTIMIZATION_METHOD_AO_BFO
OPTIMIZATION_METHOD_AO_BFO
BestResult = 0.673690532910006: X1 = 1.5499999999999998, Y1 = 1.3899999999999997, X2 = 0.5, Y2 = -0.52, X3 = -1.47, Y3 = 0.6400000000000001
Check = 0.673690532910006: X1 = 1.5499999999999998, Y1 = 1.3899999999999997, X2 = 0.5, Y2 = -0.52, X3 = -1.47, Y3 = 0.6400000000000001

23: OPTIMIZATION_METHOD_AO_IWO
OPTIMIZATION_METHOD_AO_IWO
BestResult = 0.5624806395733428: X1 = 1.4900000000000002, Y1 = 1.2999999999999998, X2 = 0.43999999999999995, Y2 = -0.48999999999999977, X3 = -1.42, Y3 = 0.6400000000000001
Check = 0.6266957817897628: X1 = 1.4900000000000002, Y1 = 1.2999999999999998, X2 = 0.43999999999999995, Y2 = -0.48999999999999977, X3 = -1.42, Y3 = 0.6400000000000001

24: OPTIMIZATION_METHOD_AO_BA
OPTIMIZATION_METHOD_AO_BA
BestResult = 0.5690853945437194: X1 = 0.48, Y1 = -1.54, X2 = -1.48, Y2 = 0.6200000000000001, X3 = -0.44999999999999973, Y3 = 2.5200000000000005
Check = 0.5690853945437194: X1 = 0.48, Y1 = -1.54, X2 = -1.48, Y2 = 0.6200000000000001, X3 = -0.44999999999999973, Y3 = 2.5200000000000005

25: OPTIMIZATION_METHOD_AO_FAm
OPTIMIZATION_METHOD_AO_FAm
BestResult = 0.5778309203162327: X1 = -1.47, Y1 = 0.6200000000000001, X2 = -1.47, Y2 = 2.5600000000000005, X3 = -2.54, Y3 = 2.3600000000000003
Check = 0.5778309203162327: X1 = -1.47, Y1 = 0.6200000000000001, X2 = -1.47, Y2 = 2.5600000000000005, X3 = -2.54, Y3 = 2.3600000000000003

26: OPTIMIZATION_METHOD_AO_FSS
OPTIMIZATION_METHOD_AO_FSS
BestResult = 0.4978927704570393: X1 = 0.010000000000000231, Y1 = 0.3200000000000003, X2 = -2.08, Y2 = -1.8, X3 = -1.48, Y3 = 0.6000000000000001
Check = 0.4978927704570393: X1 = 0.010000000000000231, Y1 = 0.3200000000000003, X2 = -2.08, Y2 = -1.8, X3 = -1.48, Y3 = 0.6000000000000001

27: OPTIMIZATION_METHOD_AO_COAm
OPTIMIZATION_METHOD_AO_COAm
BestResult = 0.6778174074019874: X1 = -2.2800000000000002, Y1 = 0.14000000000000012, X2 = -1.3499999999999999, Y2 = 0.6600000000000001, X3 = -1.55, Y3 = 0.54
Check = 0.6778174074019874: X1 = -2.2800000000000002, Y1 = 0.14000000000000012, X2 = -1.3499999999999999, Y2 = 0.6600000000000001, X3 = -1.55, Y3 = 0.54

28: OPTIMIZATION_METHOD_AO_GWO
OPTIMIZATION_METHOD_AO_GWO
BestResult = 0.542753660101771: X1 = -0.1299999999999999, Y1 = 0.14000000000000012, X2 = 1.5700000000000003, Y2 = -1.68, X3 = -1.5, Y3 = 0.7200000000000002
Check = 0.542753660101771: X1 = -0.1299999999999999, Y1 = 0.14000000000000012, X2 = 1.5700000000000003, Y2 = -1.68, X3 = -1.5, Y3 = 0.7200000000000002

29: OPTIMIZATION_METHOD_AO_ABC
OPTIMIZATION_METHOD_AO_ABC
BestResult = 0.49786755065740795: X1 = -0.040000000000000036, Y1 = 0.29000000000000004, X2 = -2.0300000000000002, Y2 = -1.76, X3 = -1.49, Y3 = 0.6099999999999999
Check = 0.49786755065740795: X1 = -0.040000000000000036, Y1 = 0.29000000000000004, X2 = -2.0300000000000002, Y2 = -1.76, X3 = -1.49, Y3 = 0.6099999999999999

30: OPTIMIZATION_METHOD_AO_ACOm
OPTIMIZATION_METHOD_AO_ACOm
BestResult = 0.8716708506315909: X1 = -1.49, Y1 = 0.6600000000000001, X2 = -1.51, Y2 = 0.6000000000000001, X3 = 0.54, Y3 = -0.48999999999999977
Check = 0.8716708506315909: X1 = -1.49, Y1 = 0.6600000000000001, X2 = -1.51, Y2 = 0.6000000000000001, X3 = 0.54, Y3 = -0.48999999999999977

31: OPTIMIZATION_METHOD_AO_PSO
OPTIMIZATION_METHOD_AO_PSO
BestResult = 0.5508486039662627: X1 = 1.4100000000000001, Y1 = 1.4400000000000004, X2 = -1.49, Y2 = 0.71, X3 = 2.38, Y3 = 1.5
Check = 0.5508486039662627: X1 = 1.4100000000000001, Y1 = 1.4400000000000004, X2 = -1.49, Y2 = 0.71, X3 = 2.38, Y3 = 1.5

32: OPTIMIZATION_METHOD_AO_RND
OPTIMIZATION_METHOD_AO_RND
BestResult = 0.5036403607427178: X1 = -2.96, Y1 = -0.54, X2 = 0.8799999999999999, Y2 = -1.64, X3 = -1.58, Y3 = 0.6200000000000001
Check = 0.5036403607427178: X1 = -2.96, Y1 = -0.54, X2 = 0.8799999999999999, Y2 = -1.64, X3 = -1.58, Y3 = 0.6200000000000001
 
fxsaber #:

According to this methodology, the Hilly function test.

Here, the picture has changed.

The top in the list of results PSO and IWDm showed values at the limits of the range, this is not very good.

OPTIMIZATION_METHOD_AO_GSA_Stars

GSA_Stars is just a toy, for visual simulation of bodies movement, can be removed.

And HS for some reason, very interesting algo.

 
Andrey Dik #:

HS erorites for some reason, very interesting algo.

In Optimisation.mqh it is written about it.

// Optimization_C_AO_HS
#define  MACROS_OPTIMIZATION_INIT , 0.9, 0.1, 0.2, epochCount
  // Невозможно адаптировать без изменения исходника.
  // Совпадение имен: C_AO_HS::h[] и S_Harmony::h.
If you change the source (make name mismatch), I can adapt it.
Reason: