kb/data/en.wikipedia.org/wiki/Fly_algorithm-1.md

277 lines
6.9 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: "Fly algorithm"
chunk: 2/3
source: "https://en.wikipedia.org/wiki/Fly_algorithm"
category: "reference"
tags: "science, encyclopedia"
date_saved: "2026-05-05T09:57:41.802183+00:00"
instance: "kb-cron"
---
=== Parisian approach vs cooperative coevolution ===
Cooperative coevolution is a broad class of evolutionary algorithms where a complex problem is solved by decomposing it into subcomponents that are solved independently.
The Parisian approach shares many similarities with the cooperative coevolutionary algorithm. The Parisian approach makes use of a single-population whereas multi-species may be used in cooperative coevolutionary algorithm.
Similar internal evolutionary engines are considered in classical evolutionary algorithm, cooperative coevolutionary algorithm and Parisian evolution.
The difference between cooperative coevolutionary algorithm and Parisian evolution resides in the population's semantics.
Cooperative coevolutionary algorithm divides a big problem into sub-problems (groups of individuals) and solves them separately toward the big problem. There is no interaction/breeding between individuals of the different sub-populations, only with individuals of the same sub-population.
However, Parisian evolutionary algorithms solve a whole problem as a big component.
All population's individuals cooperate together to drive the whole population toward attractive areas of the search space.
=== Fly Algorithm vs particle swarm optimisation ===
Cooperative coevolution and particle swarm optimisation (PSO) share many similarities. PSO is inspired by the social behaviour of bird flocking or fish schooling.
It was initially introduced as a tool for realistic animation in computer graphics.
It uses complex individuals that interact with each other in order to build visually realistic collective behaviours through adjusting the individuals' behavioural rules (which may use random generators).
In mathematical optimisation, every particle of the swarm somehow follows its own random path biased toward the best particle of the swarm.
In the Fly Algorithm, the flies aim at building spatial representations of a scene from actual sensor data; flies do not communicate or explicitly cooperate, and do not use any behavioural model.
Both algorithms are search methods that start with a set of random solutions, which are iteratively corrected toward a global optimum.
However, the solution of the optimisation problem in the Fly Algorithm is the population (or a subset of the population): The flies implicitly collaborate to build the solution. In PSO the solution is a single particle, the one with the best fitness. Another main difference between the Fly Algorithm and with PSO is that the Fly Algorithm is not based on any behavioural model but only builds a geometrical representation.
== Applications of the Fly algorithnm ==
Computer stereo vision
Obstacle avoidance
Simultaneous localization and mapping (SLAM)
Single-photon emission computed tomography (SPECT) reconstruction
Positron emission tomography (PET) reconstruction
Digital art
== Example: Tomography reconstruction ==
Tomography reconstruction is an inverse problem that is often ill-posed due to missing data and/or noise. The answer to the inverse problem is not unique, and in case of extreme noise level it may not even exist. The input data of a reconstruction algorithm may be given as the Radon transform or sinogram
(
Y
)
{\displaystyle \left(Y\right)}
of the data to reconstruct
(
f
)
{\displaystyle \left(f\right)}
.
f
{\displaystyle f}
is unknown;
Y
{\displaystyle Y}
is known.
The data acquisition in tomography can be modelled as:
Y
=
P
[
f
]
+
ϵ
{\displaystyle Y=P[f]+\epsilon }
where
P
{\displaystyle P}
is the system matrix or projection operator and
ϵ
{\displaystyle \epsilon }
corresponds to some Poisson noise.
In this case the reconstruction corresponds to the inversion of the Radon transform:
f
=
P
1
[
Y
]
{\displaystyle f=P^{-1}[Y]}
Note that
P
1
{\displaystyle P^{-1}}
can account for noise, acquisition geometry, etc.
The Fly Algorithm is an example of iterative reconstruction. Iterative methods in tomographic reconstruction are relatively easy to model:
f
^
=
a
r
g
m
i
n
|
|
Y
Y
^
|
|
2
2
{\displaystyle {\hat {f}}=\operatorname {arg\,min} ||Y-{\hat {Y}}||_{2}^{2}}
where
f
^
{\displaystyle {\hat {f}}}
is an estimate of
f
{\displaystyle f}
, that minimises an error metrics (here 2-norm, but other error metrics could be used) between
Y
{\displaystyle Y}
and
Y
^
{\displaystyle {\hat {Y}}}
. Note that a regularisation term can be introduced to prevent overfitting and to smooth noise whilst preserving edges.
Iterative methods can be implemented as follows:
(i) The reconstruction starts using an initial estimate of the image (generally a constant image),
(ii) Projection data is computed from this image,
(iii) The estimated projections are compared with the measured projections,
(iv) Corrections are made to correct the estimated image, and
(v) The algorithm iterates until convergence of the estimated and measured projection sets.
The pseudocode below is a step-by-step description of the Fly Algorithm for tomographic reconstruction. The algorithm follows the steady-state paradigm. For illustrative purposes, advanced genetic operators, such as mitosis, dual mutation, etc. are ignored. A JavaScript implementation can be found on Fly4PET.