Fly algorithm: Difference between revisions

Content deleted Content added
No edit summary
Line 121:
 
== Example: Digital arts ==
In this example, an input image is to be approximated by a set of titlestiles (as in an ancient [[mosaic]]). A titletile 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 50005,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:
 
<math>reconstruction = \operatorname{arg\,min} \overset{x<W}{\underset{y=0}{\sum}}\overset{j<H}{\underset{j=0}{\sum}}|input(x,y) - P[F](x,y)|</math>