Skip to content

tomsiemek/imperialistic-competitive-algorithm-visualisation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Imperialist competitive algorithm visualistion

pic should be here :()

What is it?

Imperialist competitive algorithm is population based heuristic, which utilises some swarm intelligence like mechanisms and competition similar to genetic algorithm.

wiki link

What am I looking at?

My implementation looks for minimum of given function. There are few predefined functions (Rastrigin, Ackley, Sphere, Rosenbrock, Himmelblau).

Big dots are metropolis(capitals/centers of empires), smaller ones are theirs colonies. Colonies are getting closer and closer to theirs metropolies. If they will find better solution in the process they become the new metropolis. Whole empires have one color.

Every iteration weakest empire loses one if its colonies, to other empire(the stronger empire the more likely it is to get a colony).

How to run

Copy/download repository and run index.html

or go to

https://tomsiemek.github.io/imperialistic-competitive-algorithm-visualisation/

How to use?

  • if everything is too big and doesnt fit the screen or it is too small use ctrl+[+/-] or ctrl+[mouse scroll]
  • resume/stop to control visualisation
  • change parameters on the right and click RESTART WITH PARAMETERS to apply
  • if you messed up parameters click RESET PARAMETERS TO DEFAULT
  • list on empires in the center
  • hover on nation for tooltip

Cryptic parameters

pic should be here :()

Alpha - [0, 1] - coefficient in calculating total empire power - how important are colonies in evaluation value of empire

Beta - [1, ∞] - multiplier of maximum distance colony can "travel" in one iteration - how "explorative"of the space "behind" metropolis are the colonies

Gamma - [0, π] - maximum angle of deviation from line connecting centers - how "explorative" are colonies in their travel to the metropolis

Technology

It is made with pure javascript.

Libraries:

d3.js - making graphs

math.js - parsing mathematical expressions