Discussing the article: "Population optimization algorithms: Binary Genetic Algorithm (BGA). Part I"

 

Check out the new article: Population optimization algorithms: Binary Genetic Algorithm (BGA). Part I.

In this article, we will explore various methods used in binary genetic and other population algorithms. We will look at the main components of the algorithm, such as selection, crossover and mutation, and their impact on the optimization. In addition, we will study data presentation methods and their impact on optimization results.

The parameters of optimization problems are often called "features" and must be represented in a certain way to be used in the logic of the optimization algorithm. In genetics, these characteristics are divided into phenotype and genotype. The phenotype is the appearance of the parameter being optimized, and the genotype is the way it is represented in the algorithm. In most optimization algorithms, the phenotype is the same as the genotype and is represented as a real number. A gene is an optimized parameter, in turn, a chromosome is a set of genes, i.e. a set of optimized parameters.

Real data representation is used to represent fractional numbers. Real numbers can have a decimal part and a fractional part, separated by a decimal point. For example, "3.14" and "0.5" are real numbers.

Binary representation of data, on the other hand, uses the binary number system, in which numbers are represented using two symbols: "0" and "1" and each digit is called a bit (binary digit). For example, the number "5" can be represented in binary form as "101".


The main difference between real and binary representation of data is the way the numbers are encoded. Real numbers are usually encoded using standards such as IEEE 754, which defines formats for representing floating point numbers. In the MQL5 language, the "double" data type is used for real numbers. It can describe a total of 16 significant digits in a number. This means that the total number of digits cannot exceed sixteen, for example, "9 999 999 999 999 999.0" and "9 999 999.999 999 99" and "0.999 999 999 999 999 9" have sixteen "9" digits in total before and after the decimal point. I will explain why this is important a bit later.

Real numbers are convenient for use in writing programs and in everyday life, while binary numbers are used in computing systems and when performing low-level operations, including logical and bitwise ones.

Author: Andrey Dik

 
fxsaber #:
That stabbed me.
Thank you, corrected.
 
Read. What is missing is a diagram that shows a general representation of the optimisation algorithm.
 
fxsaber #:
Read. What is missing is a diagram showing the general representation of an optimisation algorithm.

For all optimisation algorithms without exception, not only for GA, the order of operators (methods) is always the same, in the order as in the Table of Contents:

1. Selection.

2. Crossover.

3. Mutation.

Each particular algo may be missing one or two operators, but the order is always so. This order can surely be logically justified and related to probabilities, and the goal of any optimisation algorithm is to add up a combination of probabilities in favour of solving the problem.

There's also a fourth method, the method of placing new individuals into a population, but it's not usually identified as a stand-alone method.

Maybe, yes, it makes sense to draw a diagram of the structure of an "optimisation algorithm", I'll think about it.

 
Andrey Dik #:

For all optimisation algorithms without exception, not only for GA, the order of operators (methods) is always the same

I could not figure out why in some algorithms Moving without input, in others with input.
for (uint i = epochCount; (bool)i--;)
{
  AO.Moving() // Moving(i)

  for (uint set = ArraySize(AO.aName); (bool)set--;)
    AO.aName[set].f = FF(AO.aName[set].c);
                                                                     
  AO.Revision();
}
 
fxsaber #:
I couldn't figure out why some Moving algorithms have Moving without input, while others have it with input.

This is a case when it is necessary to take into account the number of the current epoch in one of the formulae of the algorithm. Unfortunate solution and rather an exception than a rule, in other algorithms the epoch counter is its own inside.