Code Monkey home page Code Monkey logo

dispersive-flies-optimization's Introduction

Dispersive Flies Optimization

This is an implementation in Python (using numpy) of the swarm algorithm called Dispersive Flies Optimization.

The concept is based on the swarming behaviour of flies near food sources. It is a bare-bones swarm intelligence algorithm (i.e. it has very few tunable parameters), where:

  1. The exploratory phase is based on randomly altering a fly's coordinates (rather like mutation in a genetic algorithm); and

  2. The exploitative phase is based on a fly adjusting its coordinates based on those of its closest neighbour of highest fitness and the fly with the overall best fitness.

The use of the fly with the best fitness has been criticized by some, since this information would not be available to flies in real swarm intelligence; the authors of the article, however, have stated that it is unneccessary, and I will be doing experiments where it can be disabled to see how performance compares.

The article for the Dispersive Flies Optimization can be found here:

https://annals-csis.org/Volume_2/pliks/142.pdf

It is also described on Wikipedia:

https://en.wikipedia.org/wiki/Dispersive_flies_optimisation

Along with the implementation are two programs to employ the algorithm:

  1. An implementation that chases a mouse cursor around a window in two dimensions; and

  2. An implementation to find Steiner systems.

A S(t, k, v) Steiner system is a set of k-sets from a v-set such that every t-set appears in exactly one k-set. A simple example is S(2, 3, 7), the Steiner triple system of order 7, also denoted STS(7). Let {0, ..., 6} be the v-set. The STS(7) is thus, unique up to isomorphism, of the form:

{0, 1, 2}
{0, 3, 4}
{0, 5, 6}
{1, 3, 5}
{1, 4, 6}
{2, 3, 6}
{2, 4, 5}

This is also called the Fano plane and is the projective plane of order 2.

More on Steiner systems can be read at:

https://en.wikipedia.org/wiki/Steiner_system

The algorithm is able to find an STS of order 9 with relative ease:

(0, 1, 3)
(0, 2, 5)
(0, 4, 6)
(0, 7, 8)
(1, 2, 7)
(1, 4, 8)
(1, 5, 6)
(2, 3, 4)
(2, 6, 8)
(3, 5, 8)
(3, 6, 7)
(4, 5, 7)

dispersive-flies-optimization's People

Contributors

sraaphorst avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.