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

 

Check out the new article: Population optimization algorithms: Micro Artificial immune system (Micro-AIS).

The article considers an optimization method based on the principles of the body's immune system - Micro Artificial Immune System (Micro-AIS) - a modification of AIS. Micro-AIS uses a simpler model of the immune system and simple immune information processing operations. The article also discusses the advantages and disadvantages of Micro-AIS compared to conventional AIS.

The AIS algorithm models these processes using the concepts of antigens (inputs), antibodies (solutions) and killer cells (optimization processes) to optimally solve the problem. Antigens represent the inputs that need to be optimized. Antibodies represent potential solutions to the problem. Killer cells are optimization processes that search for the best solutions to an optimization problem.

Artificial Immune System (AIS) optimization method was proposed in the 1990s. Early research on this method dates back to the mid-1980s, with significant contributions by Farmer, Packard, Perelson (1986) and Bersini and Varela (1990).

Since then, the AIS method has continued to develop and be the subject of ongoing research in the scientific community. Many variations and modifications of this method have been proposed, as well as its application to various optimization and learning problems. The body's immune system also plays an important role in protecting against external influences, such as infections and tumors. It has the ability to recognize and detect anomalies and attack hostile agents, while maintaining the ability to distinguish and store information about them for future use.

Micro-AIS (Micro-Immune Algorithm) is a modification of the immune system (AIS) algorithm that was developed to solve optimization problems. It differs from conventional AIS in that it uses a simpler model of the immune system and simpler immune information processing operations.

Author: Andrey Dik

 

AO

Description

Hilly

Hilly final

Forest

Forest final

Megacity (discrete)

Megacity final

Final result

% of MAX

10 p (5 F)

50 p (25 F)

1000 p (500 F)

10 p (5 F)

50 p (25 F)

1000 p (500 F)

10 p (5 F)

50 p (25 F)

1000 p (500 F)

1

(P+O)ES

(P+O) evolution strategies

0,99934

0,91895

0,56297

2,48127

1,00000

0,93522

0,39179

2,32701

0,83167

0,64433

0,21155

1,68755

6,496

72,18

2

SDSm

stochastic diffusion search M

0,93066

0,85445

0,39476

2,17988

0,99983

0,89244

0,19619

2,08846

0,72333

0,61100

0,10670

1,44103

5,709

63,44


Please link to the relevant articles in this table.

 

Neural networks, algorithms, optimisation, learning - it's all great.

Initial data set

What algorithm can be used to read a message? Message


In systems analysis, what is important are the elements of the system and the functional relationships between them, united by the meaning (purpose) of the system's existence.

How justified is it to apply stochastic analysis where we should be looking to apply functional analysis.

The question may be sideways, but in the direction of understanding the fundamental basis of the process.

 

Forum on trading, automated trading systems and testing trading strategies

Libraries: Input_Struct

fxsaber, 2024.01.19 18:16

Example of library application for custom optimisation algorithms.

 
Is it difficult to optimise a function of a species?
double FF( const double &Arg[] )
{
  double Res = 1;

  for (uint i = ArraySize(Arg); (bool)i--;)
    Res *= MathSin(Arg[i]);

  return(Res);
}
The best values should be close to one. But can the algorithms in this series of articles approach this maximum?
 
fxsaber #:
Is it difficult to optimise a function of a species? The best values should be close to one. But can the algorithms in this series of articles approach this maximum?
According to my classification, this function belongs to the simple ones.
 
fxsaber #:

Please link to the relevant articles in this table

Starting with the next article there will be links. Found a relatively easy way to do this.

 
fxsaber #:

For a long time I tried to drag algorithms of this series into the optimiser (I wanted to parallelise them), but it glitches epically - https://www.mql5.com/en/forum/454524/page2#comment_50233782.

MT5 forward testing bugs.
MT5 forward testing bugs.
  • 2023.10.20
  • www.mql5.com
This post is about a some weirdly related (I think) bugs that happen when forward testing optimized results. Please read through it all...
 
Stanislav Korotky #:

For a long time I tried to drag algorithms of this series into the optimiser (I wanted to parallelise them), but it glitches epically - https://www.mql5.com/en/forum/454524/page2#comment_50233782.

Got it in.



Optimization - несколько алгоритмов оптимизации в одном месте.
Optimization - несколько алгоритмов оптимизации в одном месте.
  • www.mql5.com
Получилось собрать в одном месте сразу несколько алгоритмов оптимизации и создать простой механизм их использования. Механизм. Помещаем советник в Тестер и используем GUI вкладки Inputs , чтобы
 

Forum on trading, automated trading systems and testing trading strategies

Discussion of the article "Population Optimisation Algorithms: Micro Artificial immune system (Micro-AIS) Algorithms".

fxsaber, 2024.01.19 22:30

Is it difficult to optimise a function of a species?
double FF( const double &Arg[] )
{
  double Res = 1;

  for (uint i = ArraySize(Arg); (bool)i--;)
    Res *= MathSin(Arg[i]);

  return(Res);
}
The best values should be close to one. But can the algorithms in this series of articles approach this maximum?

Tested.

#define  dInput01 X1
#define  dInput02 X2
#define  dInput03 X3
#define  dInput04 X4
#define  dInput05 X5
#define  dInput06 X6
#define  dInput07 X7

#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, X2, 0);
MACROS_INPUT(double, X3, 0);
MACROS_INPUT(double, X4, 0);
MACROS_INPUT(double, X5, 0);
MACROS_INPUT(double, X6, 0);
MACROS_INPUT(double, X7, 0);

// ФФ для штатного Оптимизатора - пример.
double OnTester()
{
  return(MathSin(inInputs.X1) *
         MathSin(inInputs.X2) *
         MathSin(inInputs.X3) *
         MathSin(inInputs.X4) *
         MathSin(inInputs.X5) *
         MathSin(inInputs.X6) *
         MathSin(inInputs.X7));
}

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


Inputs.


Custom Optimiser.


Custom.

PSO Finished 15835 of 35000 planned passes: true
BestResult = 0.9884554736115849: X1 = 99.0, X2 = 99.0, X3 = 11.0, X4 = 77.0, X5 = 14.0, X6 = 11.0, X7 = 33.0
Check = 0.9884554736115849: X1 = 99.0, X2 = 99.0, X3 = 11.0, X4 = 77.0, X5 = 14.0, X6 = 11.0, X7 = 33.0

01: OPTIMIZATION_METHOD_AO_Micro_AIS
OPTIMIZATION_METHOD_AO_Micro_AIS
BestResult = 0.6914924547679845: X1 = 17.0, X2 = 89.0, X3 = 61.0, X4 = 33.0, X5 = 71.0, X6 = 64.0, X7 = 8.0
Check = 0.6914924547679845: X1 = 17.0, X2 = 89.0, X3 = 61.0, X4 = 33.0, X5 = 71.0, X6 = 64.0, X7 = 8.0

02: OPTIMIZATION_METHOD_AO_POES
OPTIMIZATION_METHOD_AO_POES
BestResult = 0.9268682527605293: X1 = 55.0, X2 = 80.0, X3 = 27.0, X4 = 99.0, X5 = 8.0, X6 = 52.0, X7 = 11.0
Check = 0.9268682527605293: X1 = 55.0, X2 = 80.0, X3 = 27.0, X4 = 99.0, X5 = 8.0, X6 = 52.0, X7 = 11.0

03: OPTIMIZATION_METHOD_AO_P_O_ES
OPTIMIZATION_METHOD_AO_P_O_ES
BestResult = 0.7717845794829589: X1 = 11.0, X2 = 49.0, X3 = 74.0, X4 = 30.0, X5 = 11.0, X6 = 77.0, X7 = 43.0
Check = 0.7717845794829589: X1 = 11.0, X2 = 49.0, X3 = 74.0, X4 = 30.0, X5 = 11.0, X6 = 77.0, X7 = 43.0

04: OPTIMIZATION_METHOD_AO_SC
OPTIMIZATION_METHOD_AO_SC
BestResult = 0.5703083565001157: X1 = 4.0, X2 = 39.0, X3 = 20.0, X4 = 93.0, X5 = 8.0, X6 = 20.0, X7 = 33.0
Check = 0.5703083565001157: X1 = 4.0, X2 = 39.0, X3 = 20.0, X4 = 93.0, X5 = 8.0, X6 = 20.0, X7 = 33.0

05: OPTIMIZATION_METHOD_AO_SIA
OPTIMIZATION_METHOD_AO_SIA
BestResult = 0.3770511069126069: X1 = 30.0, X2 = 55.0, X3 = 49.0, X4 = 77.0, X5 = 100.0, X6 = 65.0, X7 = 27.0
Check = 0.3770511069126069: X1 = 30.0, X2 = 55.0, X3 = 49.0, X4 = 77.0, X5 = 100.0, X6 = 65.0, X7 = 27.0

06: OPTIMIZATION_METHOD_AO_SA
OPTIMIZATION_METHOD_AO_SA
BestResult = 0.4195625904721657: X1 = 58.0, X2 = 77.0, X3 = 27.0, X4 = 40.0, X5 = 70.0, X6 = 14.0, X7 = 70.0
Check = 0.4195625904721657: X1 = 58.0, X2 = 77.0, X3 = 27.0, X4 = 40.0, X5 = 70.0, X6 = 14.0, X7 = 70.0

07: OPTIMIZATION_METHOD_AO_NMm
OPTIMIZATION_METHOD_AO_NMm
BestResult = 0.8314291991406518: X1 = 30.0, X2 = 46.0, X3 = 99.0, X4 = 11.0, X5 = 96.0, X6 = 39.0, X7 = 74.0
Check = 0.8314291991406518: X1 = 30.0, X2 = 46.0, X3 = 99.0, X4 = 11.0, X5 = 96.0, X6 = 39.0, X7 = 74.0

08: OPTIMIZATION_METHOD_AO_DE
OPTIMIZATION_METHOD_AO_DE
BestResult = 0.514763435265798: X1 = 33.0, X2 = 39.0, X3 = 49.0, X4 = 20.0, X5 = 73.0, X6 = 20.0, X7 = 58.0
Check = 0.514763435265798: X1 = 33.0, X2 = 39.0, X3 = 49.0, X4 = 20.0, X5 = 73.0, X6 = 20.0, X7 = 58.0

09: OPTIMIZATION_METHOD_AO_SDOm
OPTIMIZATION_METHOD_AO_SDOm
BestResult = 0.6248310950237546: X1 = 55.0, X2 = 61.0, X3 = 20.0, X4 = 71.0, X5 = 26.0, X6 = 74.0, X7 = 36.0
Check = 0.6248310950237546: X1 = 55.0, X2 = 61.0, X3 = 20.0, X4 = 71.0, X5 = 26.0, X6 = 74.0, X7 = 36.0

10: OPTIMIZATION_METHOD_AO_IWDm
OPTIMIZATION_METHOD_AO_IWDm
BestResult = 0.6582185170915256: X1 = 33.0, X2 = 24.0, X3 = 61.0, X4 = 55.0, X5 = 46.0, X6 = 36.0, X7 = 1.0
Check = 0.6582185170915256: X1 = 33.0, X2 = 24.0, X3 = 61.0, X4 = 55.0, X5 = 46.0, X6 = 36.0, X7 = 1.0

11: OPTIMIZATION_METHOD_AO_CSS
OPTIMIZATION_METHOD_AO_CSS
BestResult = 0.17125241139972677: X1 = 11.0, X2 = 5.0, X3 = 11.0, X4 = 37.0, X5 = 56.0, X6 = 65.0, X7 = 37.0
Check = 0.17125241139972677: X1 = 11.0, X2 = 5.0, X3 = 11.0, X4 = 37.0, X5 = 56.0, X6 = 65.0, X7 = 37.0

12: OPTIMIZATION_METHOD_AO_SDS
OPTIMIZATION_METHOD_AO_SDS
BestResult = 0.7015125972513457: X1 = 17.0, X2 = 46.0, X3 = 27.0, X4 = 39.0, X5 = 77.0, X6 = 71.0, X7 = 86.0
Check = 0.7015125972513457: X1 = 17.0, X2 = 46.0, X3 = 27.0, X4 = 39.0, X5 = 77.0, X6 = 71.0, X7 = 86.0

13: OPTIMIZATION_METHOD_AO_SDSm
OPTIMIZATION_METHOD_AO_SDSm
BestResult = 0.8318883232825393: X1 = 77.0, X2 = 14.0, X3 = 14.0, X4 = 30.0, X5 = 80.0, X6 = 49.0, X7 = 24.0
Check = 0.8318883232825393: X1 = 77.0, X2 = 14.0, X3 = 14.0, X4 = 30.0, X5 = 80.0, X6 = 49.0, X7 = 24.0

14: OPTIMIZATION_METHOD_AO_MEC
OPTIMIZATION_METHOD_AO_MEC
BestResult = 0.821421124921697: X1 = 99.0, X2 = 58.0, X3 = 90.0, X4 = 27.0, X5 = 14.0, X6 = 80.0, X7 = 96.0
Check = 0.821421124921697: X1 = 99.0, X2 = 58.0, X3 = 90.0, X4 = 27.0, X5 = 14.0, X6 = 80.0, X7 = 96.0

15: OPTIMIZATION_METHOD_AO_SFL
OPTIMIZATION_METHOD_AO_SFL
BestResult = 0.7123520662251704: X1 = 49.0, X2 = 52.0, X3 = 80.0, X4 = 93.0, X5 = 52.0, X6 = 87.0, X7 = 14.0
Check = 0.7123520662251704: X1 = 49.0, X2 = 52.0, X3 = 80.0, X4 = 93.0, X5 = 52.0, X6 = 87.0, X7 = 14.0

16: OPTIMIZATION_METHOD_AO_EM
OPTIMIZATION_METHOD_AO_EM
BestResult = 0.4739892519704631: X1 = 39.0, X2 = 96.0, X3 = 49.0, X4 = 54.0, X5 = 93.0, X6 = 8.0, X7 = 11.0
Check = 0.4739892519704631: X1 = 39.0, X2 = 96.0, X3 = 49.0, X4 = 54.0, X5 = 93.0, X6 = 8.0, X7 = 11.0

17: OPTIMIZATION_METHOD_AO_SSG
OPTIMIZATION_METHOD_AO_SSG
BestResult = 0.7570642423726676: X1 = 5.0, X2 = 49.0, X3 = 30.0, X4 = 96.0, X5 = 14.0, X6 = 55.0, X7 = 89.0
Check = 0.7570642423726676: X1 = 5.0, X2 = 49.0, X3 = 30.0, X4 = 96.0, X5 = 14.0, X6 = 55.0, X7 = 89.0

18: OPTIMIZATION_METHOD_AO_MA
OPTIMIZATION_METHOD_AO_MA
BestResult = 0.7831093525101701: X1 = 93.0, X2 = 36.0, X3 = 17.0, X4 = 58.0, X5 = 42.0, X6 = 61.0, X7 = 74.0
Check = 0.7831093525101701: X1 = 93.0, X2 = 36.0, X3 = 17.0, X4 = 58.0, X5 = 42.0, X6 = 61.0, X7 = 74.0

19: OPTIMIZATION_METHOD_AO_HS
OPTIMIZATION_METHOD_AO_HS

Error optimization!

20: OPTIMIZATION_METHOD_AO_GSA
OPTIMIZATION_METHOD_AO_GSA
BestResult = 0.020184193323560605: X1 = 9.0, X2 = 27.0, X3 = 54.0, X4 = 6.0, X5 = 77.0, X6 = 75.0, X7 = 23.0
Check = 0.020184193323560605: X1 = 9.0, X2 = 27.0, X3 = 54.0, X4 = 6.0, X5 = 77.0, X6 = 75.0, X7 = 23.0

21: OPTIMIZATION_METHOD_AO_GSA_Stars
OPTIMIZATION_METHOD_AO_GSA_Stars

Error optimization!

22: OPTIMIZATION_METHOD_AO_BFO
OPTIMIZATION_METHOD_AO_BFO
BestResult = 0.7322059190279094: X1 = 20.0, X2 = 11.0, X3 = 52.0, X4 = 49.0, X5 = 89.0, X6 = 36.0, X7 = 99.0
Check = 0.7322059190279094: X1 = 20.0, X2 = 11.0, X3 = 52.0, X4 = 49.0, X5 = 89.0, X6 = 36.0, X7 = 99.0

23: OPTIMIZATION_METHOD_AO_IWO
OPTIMIZATION_METHOD_AO_IWO
BestResult = 0.7392111937754324: X1 = 20.0, X2 = 11.0, X3 = 52.0, X4 = 49.0, X5 = 89.0, X6 = 37.0, X7 = 100.0
Check = 0.24076952243473274: X1 = 20.0, X2 = 11.0, X3 = 52.0, X4 = 49.0, X5 = 89.0, X6 = 37.0, X7 = 100.0

24: OPTIMIZATION_METHOD_AO_BA
OPTIMIZATION_METHOD_AO_BA
BestResult = 0.35033516894855804: X1 = 98.0, X2 = 49.0, X3 = 92.0, X4 = 77.0, X5 = 96.0, X6 = 99.0, X7 = 21.0
Check = 0.35033516894855804: X1 = 98.0, X2 = 49.0, X3 = 92.0, X4 = 77.0, X5 = 96.0, X6 = 99.0, X7 = 21.0

25: OPTIMIZATION_METHOD_AO_FAm
OPTIMIZATION_METHOD_AO_FAm
BestResult = 0.8628261244286874: X1 = 61.0, X2 = 33.0, X3 = 93.0, X4 = 55.0, X5 = 30.0, X6 = 49.0, X7 = 55.0
Check = 0.8628261244286874: X1 = 61.0, X2 = 33.0, X3 = 93.0, X4 = 55.0, X5 = 30.0, X6 = 49.0, X7 = 55.0

26: OPTIMIZATION_METHOD_AO_FSS
OPTIMIZATION_METHOD_AO_FSS
BestResult = 0.6586267117021989: X1 = 90.0, X2 = 17.0, X3 = 30.0, X4 = 11.0, X5 = 11.0, X6 = 89.0, X7 = 46.0
Check = 0.6586267117021989: X1 = 90.0, X2 = 17.0, X3 = 30.0, X4 = 11.0, X5 = 11.0, X6 = 89.0, X7 = 46.0

27: OPTIMIZATION_METHOD_AO_COAm
OPTIMIZATION_METHOD_AO_COAm
BestResult = 0.751387775021677: X1 = 33.0, X2 = 74.0, X3 = 89.0, X4 = 52.0, X5 = 2.0, X6 = 8.0, X7 = 99.0
Check = 0.751387775021677: X1 = 33.0, X2 = 74.0, X3 = 89.0, X4 = 52.0, X5 = 2.0, X6 = 8.0, X7 = 99.0

28: OPTIMIZATION_METHOD_AO_GWO
OPTIMIZATION_METHOD_AO_GWO
BestResult = 0.7905125996746682: X1 = 64.0, X2 = 24.0, X3 = 58.0, X4 = 11.0, X5 = 39.0, X6 = 36.0, X7 = 55.0
Check = 0.7905125996746682: X1 = 64.0, X2 = 24.0, X3 = 58.0, X4 = 11.0, X5 = 39.0, X6 = 36.0, X7 = 55.0

29: OPTIMIZATION_METHOD_AO_ABC
OPTIMIZATION_METHOD_AO_ABC
BestResult = 0.2279828722733523: X1 = 37.0, X2 = 49.0, X3 = 45.0, X4 = 96.0, X5 = 86.0, X6 = 54.0, X7 = 89.0
Check = 0.2279828722733523: X1 = 37.0, X2 = 49.0, X3 = 45.0, X4 = 96.0, X5 = 86.0, X6 = 54.0, X7 = 89.0

30: OPTIMIZATION_METHOD_AO_ACOm
OPTIMIZATION_METHOD_AO_ACOm
BestResult = 0.7283588705105443: X1 = 58.0, X2 = 36.0, X3 = 46.0, X4 = 58.0, X5 = 77.0, X6 = 42.0, X7 = 46.0
Check = 0.7283588705105443: X1 = 58.0, X2 = 36.0, X3 = 46.0, X4 = 58.0, X5 = 77.0, X6 = 42.0, X7 = 46.0

31: OPTIMIZATION_METHOD_AO_PSO
OPTIMIZATION_METHOD_AO_PSO
BestResult = 0.5892210470192797: X1 = 52.0, X2 = 52.0, X3 = 68.0, X4 = 62.0, X5 = 86.0, X6 = 77.0, X7 = 30.0
Check = 0.5892210470192797: X1 = 52.0, X2 = 52.0, X3 = 68.0, X4 = 62.0, X5 = 86.0, X6 = 77.0, X7 = 30.0

32: OPTIMIZATION_METHOD_AO_RND
OPTIMIZATION_METHOD_AO_RND
BestResult = 0.6663782757838177: X1 = 4.896755719304697, X2 = 61.0, X3 = 23.0, X4 = 8.0, X5 = 52.0, X6 = 67.0, X7 = 58.0
Check = 0.6663782757838177: X1 = 4.896755719304697, X2 = 61.0, X3 = 23.0, X4 = 8.0, X5 = 52.0, X6 = 67.0, X7 = 58.0


ZY Something is not working correctly in IWO. Maybe I ported it crookedly.

 
fxsaber #:

and why should we search for parameters for this function by optimisation?

solution is obvious


Reason: