๐Ÿ“œ โฌ†๏ธ โฌ‡๏ธ

Gravitational search. Gravitational search

Foreword


Good day to all. I present to you the following article from a series of coverage of new and little-known heuristic optimization methods. Today's post owes its appearance to Esmatu Rashedi, Isaac Newton and gravity.


History reference


Gravitational search (GS) is a very young algorithm. It appeared in 2009 and was a logical development of the central force method. The basis of GS are the laws of gravity and the interaction of the masses. In principle, this algorithm is similar to Particle Swarm Optimization (PSO) methods, since it is based on the development of a multi-agent system.

Strategy


GS operates with two laws:

Having these two laws in the arsenal, the method works according to the following plan:
  1. random generation of the system
  2. determination of the fitness of each particle,
  3. update of the values โ€‹โ€‹of the gravitational constant, the best and worst particles, as well as the masses,
  4. counting the resultant force in different directions,
  5. counting accelerations and speeds
  6. particle position updates,
  7. repetitions of steps 2โ€“6 before the completion criterion is met (or the maximum number of iterations is exceeded, or the position change is too small, or any other reasonable criterion is pleasing to your soul ).

For those who are interested in a more detailed description of the algorithm
So, we have some function that needs to be minimized: . In addition, there is an area in which the initial positions of the particles are generated. In accordance with the GS work plan, everything begins with the generation of a particle system where - The maximum number of particles in the system.

Force acting at time on particle from the side th, calculated by the formula where - active gravitational mass particles - passive gravitational mass particles - gravitational constant at the appropriate time, - small constant - Euclidean distance between particles.
')
So that the algorithm was not deterministic, but stochastic, in the formula for calculating the resultant force random variables are added (evenly distributed from zero to one). Then the resultant force is .

Calculate the acceleration and speed: where - operation of component multiplication of vectors, - random variable uniformly distributed from zero to one, - inert mass particles

It remains to recalculate the position of the particles. This is very easy to do: .

By the current moment, two questions remain: how the gravitational constant changes and how to calculate the masses of the particles. The value of the gravitational constant should be determined by a monotonically decreasing function, depending on the initial values โ€‹โ€‹of the constant and time points i.e. .
For example, you can take the following functions:
  • where : ,
  • where : ,
  • where : .

Now we can proceed to the final part of the story: to recalculate the masses. In the simplest case, all three masses (passive, active and inertial) are equal: . Then the value of the masses can be recalculated by the formula: where .
Of course, the masses can be calculated on the basis of their physical meaning; nevertheless, Rashedi does not speak about this (and none of the authors I could find).

Pros and cons


pros

Minuses

Used sources


  1. The work of Rashedi himself (in case someone has access to their library),
  2. Excellent article by Karpenko, in which many algorithms are briefly described (I will refer to it more than once in the future),
  3. Selection of articles.

It can be useful



Afterword


On this, perhaps, familiarity with the method of gravitational search should be finished. I really hope that this post is better than the previous one. It remains only to vote on the topic of the next post.

Source: https://habr.com/ru/post/194674/


All Articles