Discussion of article "Genetic Algorithms - It's Easy!" - page 3

 
I told you that my head is a mess, so I went into the wrong direction.
Hash can be applied to the search for duplicates within the colony, and the function of finding a hash can be made simple and fast, because even 1-2 duplicates will not make the weather and will not spoil the result.
 

The execution time of the GA algorithm is incommensurably small compared to FF execution. Therefore, there is no point in trying to speed up the algorithm even more, just as there is no point in moving GA to a dll, for example.

We should try to reduce the number of FF runs with the required accuracy of the result. The algorithm has flexible settings for this purpose. Besides, search time can be further reduced by improving search qualities of GAs in general and operators in particular. I recommend to direct the research potential in these directions.

 
joo:

The execution time of the GA algorithm is incommensurably small compared to FF execution. Therefore, there is no point in trying to speed up the algorithm even more, just as there is no point in moving GA to a dll, for example.

We should try to reduce the number of FF runs with the required accuracy of the result. The algorithm has flexible settings for this purpose. Besides, search time can be further reduced by improving search qualities of GAs in general and operators in particular. I recommend to direct the research potential in these directions.


It seems that dll now will not be faster than mql 5.
Okay, as soon as I write a library I will test it, then I will write what came out))).

 

Important note to the article.

Do not use the algorithm parameters

FFNormaliseDigits and GeneNormaliseDigits

You don't need to normalise the fitness function value and genes. Normalisation leads to a decrease in the searchability of the algorithm and an increase in the number of FF runs. Moreover, the more decimal places are discarded, the greater the negative impact on the algorithm.

In other words, introducing the normalisation operation into the algorithm was a mistake.

Not to be confused with the sampling operation controlled by the Precision parameter!

 
The important remark to article.

Do not use algorithm parametres

FFNormalizeDigits and GeneNormalizeDigits

It is not necessary to normalise value of fitness function and genes. Normalisation leads to decrease in search ability of algorithm and increase in quantity of starts FF. And, the more signs after a comma it is rejected, the negative influence on algorithm is more strongly shown.

In other words introduction of operation of normalisation in algorithm was an error.

Not to confuse to operation of digitization operated in parametre Precision!

 
joo:

Important note to the article.

Do not use the algorithm parameters

FFNormaliseDigits and GeneNormaliseDigits

You don't need to normalise the fitness function value and genes. Normalisation leads to a decrease in the searchability of the algorithm and an increase in the number of FF runs. Moreover, the more decimal places are discarded, the greater the negative impact on the algorithm.

In other words, introducing the normalisation operation into the algorithm was a mistake.

Not to be confused with the sampling operation controlled by the Precision parameter!

So in the UGAlib library itself it is better to remove normalisation or only in FF.
 
Serj_Che:
Is it better to remove normalisation in the UGAlib library itself or only in FF.
FFNormalizeDigits is used in FF to normalise the fitness value and GeneNormalizeDigits is used in the algorithm itself to normalise genes. There is no need to normalize both.
 
joo:
FFNormalizeDigits is used in FF to normalise the fitness value and GeneNormalizeDigits is used in the algorithm itself to normalise the genes. There is no need to normalize both.

I see. Of course, I will correct it myself, but if it is not difficult, please post the corrected version of UGAlib.

I am afraid I will make mistakes.

 
Updated UGA library and examples to the article. The current free author's version 1.1.0 is available at the links in the text at the end of the article.
 

Many thanks to the author for the library!

Add the line "cnt++;" in the loop of the parent search function, otherwise it may go into an eternal loop!

 //Отбор двух родителей.

void SelectTwoParents

(

int &address_mama,

int &address_papa

)

{

  //-----------------------Переменные-------------------------------------

  int cnt=1;

  address_mama=0;//адрес материнской особи в популяции

  address_papa=0;//адрес отцовской особи в популяции

  //----------------------------------------------------------------------

  //----------------------------Отбор родителей--------------------------

  //Десять попыток выбрать разных родителей.

  while (cnt<=10)

  {

    //Для материнской особи

    address_mama=NaturalSelection();

    //Для отцовской особи

    address_papa=NaturalSelection();

    if (address_mama!=address_papa)

      break;

    cnt++; 

  }

  //---------------------------------------------------------------------

}

This website uses cookies. Learn more about our Cookies Policy.