Fly algorithm: Difference between revisions

Content deleted Content added
Fpvidal (talk | contribs)
Fpvidal (talk | contribs)
m Example: Digital arts: Change picture to use my own one.
Line 134:
== Example: Digital arts ==
[[File:Initial_random_fly_population.png|200x200px|thumb|right|Image of the initial population (random fly positions).]]
[[File:Mosaics_flies_flowersY_Lliwedd.png.|300x300px|thumb|left|Image reconstructed after optimisation using a flowerstripes as athe shape for each tile.]]
In this example, an input image is to be approximated by a set of tiles (as in an ancient [[mosaic]]). A tile has an orientation (angle θ), a three colour components (R, G, B), a size (w, h) and a position (x, y, z). If there are ''N'' tiles, there are 9''N'' unknown floating point numbers to guess. In other words for 5,000 tiles, there are 45,000 numbers to find. Using a classical evolutionary algorithm where the answer of the optimisation problem is the best individual, the genome of an individual would made of 45,000 genes. This approach would be extremely costly in term of complexity and computing time. The same applies for any classical optimisation algorithm. Using the Fly algorithm, every individual mimics a title and can be individually evaluated using its local fitness to assess its contribution to the population's performance (the global fitness). Here an individual has 9 genes instead of 9''N'', and there are ''N'' individuals. It can be solved as a reconstruction problem as follows: