« Back to home

Dispersive Flies Optimisation

Posted on

Swarm intelligence occurs in structures composed of simple ‘agents’ interacting at a local level, where intelligent behaviour emerges from the system as a whole. Foraging ants, flocking birds and swarming flies are examples of this behaviour that have each inspired different optimisation algorithms. Dispersive Flies Optimisation (DFO) is based on how flies hover over food sources in nature [1].

In each iteration of DFO the randomly generated agents can move based on the feature vector of two neighbors (left and right in the array), the best agent of the swarm and its own. Each agent is also subject to move by a random offset mimicking random stimuli in nature. The dispersion improves performance on ‘artificial landscapes’ (test functions for optimisation) with many local minima like the Ratrigin function illustrated below [2]. Without it the agents are said to be more exploitatory and less exploratory, tending to settle more on local minima instead of the global one which would score the best fitness if found.

Rastrigin function

One application for the algorithm relates to the sporadic motion I saw in the Java/Processing DFO visualisation example. Digital drawing machines and photo filters can look computer-generated if they operate on pixels in a regular order with methods like convolution. Human-made drawings have spontaneous progression that DFO simulates in the image below [3]. Similarly organic-looking generative animation might be possible by extending the technique to video - using the image frames as the search space and skipping to the next frame after n DFO steps. I’m curious how n might change perceptible qualities of the effect which could be an openFrameworks/C++ test later on.

Swarmic sketch

I think I’d appreciate DFO more with more background understanding/experience of algorithms in general but I do have one query about it in particular: what difference is there in selecting agent’s “neighbors” from their array index on the swarm behaviour? Flies in real life interact with peers in close proximity (i.e. agents with similar feature vectors) which is a simple but computationally expensive extra step to simulate.

[1] Convergence Analysis of Dispersive Flies Optimisation

[2] Rastrigin test optimisation function

[3] Swarmic Sketches and Attention Mechanism

For Natural Computing (IS53052A)