SlideShare a Scribd company logo
1 of 18
Download to read offline
SYSTEM PROGRAMMING PROJECT
Report
Optimisation Algorithm :
Glowworm Swarm Optimistaion
(4th Semester Project)
BTech. in Information Technology
Submitted by
Roll No Names of Students
B416014 Arijeet Satapathy
B416044 Seva Mahapatra
B416063 Ritesh Kr. Pandey
Under the guidance of
Prof. Pushpanajli Mahapatra
Department of Computer Science and Engineering
International Institute Of Information Technology
Bhubaneswar,Odisha -751003
Spring 2018
Contents
1 Optimization Algorithms and Methods 1
1.1 Multi Modal Optimization . . . . . . . . . . . . . . . . . . . . 1
2 Glowworm Swarm Optimization 2
2.1 The Glowworm Swarm Optimization (GSO) Algorithm . . . . 2
2.1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2.1.2 Different phases of GSO . . . . . . . . . . . . . . . . . 3
2.2 Algorithm Flow Chart . . . . . . . . . . . . . . . . . . . . . . 4
2.3 Algorithm Description . . . . . . . . . . . . . . . . . . . . . . 4
3 Psuedocode and Implementation of GSO 7
3.1 Algorithm Flow Chart . . . . . . . . . . . . . . . . . . . . . . 7
3.2 GSO Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.3 Python Code . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
References 14
i
Chapter 1
Optimization Algorithms and
Methods
Optimization algorithms, which try to find the minimum val-
ues of mathematical functions, are everywhere in engineering.
Among other things, theyre used to evaluate design tradeoffs,
to assess control systems, and to find patterns in data.
1.1 Multi Modal Optimization
Multi-modal optimization Optimization problems are often multi-
modal; that is, they possess multiple good solutions. They could
all be globally good (same cost function value) or there could
be a mix of globally good and locally good solutions. Obtaining
all (or at least some of) the multiple solutions is the goal of a
multi-modal optimizer.
This Project present the following Optimization Algorithm:
1. Glowworm Swarm Optimization[12][13]
1
Chapter 2
Glowworm Swarm
Optimization
In this chapter, the development of the glowworm swarm op-
timization (GSO) algorithm is presented. Initially, the basic
working principle of GSO is introduced, which is followed by
a description of the phases that constitute each cycle of the
algorithm.GSO, in its present form, has evolved out of several
significant modifications incorporated into the earlier versions of
the algorithm. Many ideas were considered in the development
process before converging upon the current GSO version.
2.1 The Glowworm Swarm Optimization (GSO)
Algorithm
2.1.1 Introduction
Glowworm swarm optimization (GSO), a swarm intelligence al-
gorithm modeled after the behavior of glowworms (also known
as fireflies or lightning bugs). GSO was introduced by Krish-
nanand and Ghose in 2005 [1]. Subsequently,the authors used
GSO in various applications and several papers on this work
have appeared in the literature [2, 3, 4]-[8, 9, 10]. Later, other
researchers have proposed the firefly algorithm [11], which es-
2
sentially follows the same logic as GSO with some minor vari-
ations. GSO is originally developed for numerical optimization
problems that involve computing multiple optima of multimodal
functions, as against other swarm intelligence algorithms which
aim to identify the global optimum.
2.1.2 Different phases of GSO
Each glowworm is attracted by, and moves toward, a single
neighbor whose glow is brighter than that of itself; when sur-
rounded by multiple such neighbors, it uses a probabilistic mech-
anism to select one of them.
Each glowworm uses an adaptive neighborhood to identify neigh-
bors; it is defined by a local-decision domain that has a variable
range bounded by a hard-limited sensor range rs(0 < ri
d <=
rs).A glowworm i considers another glowworm j as its neighbor
if j is within the neighborhood range of i and the luciferin level
of j is higher than that of i .
Fig 2.1 Agent i is in the sensor range of (and is equidistant to)
both j and k. But, they have different decision-domains.Hence,
only j uses the information of i.
3
For instance, in Fig. 2.1, glowworm i is in the sensor range
of (and is equidistant to) both j and k. However, j and k have
different neighborhood sizes, and only j uses the information of
i.
2.2 Algorithm Flow Chart
Fig 2.2 GSO Flowchart
2.3 Algorithm Description
Initially, all the glowworms contain an equal quantity of luciferin
l0. Each cycle of the algorithm consists of a luciferin update
phase, a movement phase, and a neighborhood range update
phase (Fig. 2.2). The GSO algorithm is given in Fig. 2.3.
4
Luciferin update phase: During the luciferin-update phase,
each glowworm adds, to its previous luciferin level, a luciferin
quantity proportional to the fitness of its current location in the
objective function space. Also, a fraction of the luciferin value
is subtracted to simulate the decay in luciferin with time.
The luciferin update rule is given by:
li(t + 1) = (1 − ρ)li(t) + γJ(xi(t + 1)) (2.1)
where, li(t) represents the luciferin level associated with glow-
worm i at time t, is the luciferin decay constant (0 < ρ < 1), γ
is the luciferin enhancement constant.
Movement Phase: During the movement phase, each glow-
worm decides, using a probabilistic mechanism, to move towards
a neighbor that has a luminescence value more than its own, that
is, they are attracted to neighbors that glow brighter.For each
glowworm i, the probability of moving towards a neighbor j is
given by:
pj(t) =
τj(t)
j Ni(t) τj(t)
(2.2)
where j Ni(t), Ni(t) = j : d(i, j) < ri
d and τi(t) < τj(t), t is the
time index, d(i, j) represents the euclidean distance between
glowworms i and j, τj(t) represents the luminescence level asso-
ciated with glowworm j at time t, and rs represents the radial
range of the luminescence sensor.
Let glowworm i select a glowworm j Ni (t) with pi j (t)
given by (2.2). Then, the discrete-time model of the glowworm
movements can be stated as:
xi(t + 1) = xi(t) + s
xj(t) − xi(t)
||xj(t) − xi(t)||
(2.3)
5
where, xi(t) Rm
is the location of glowworm i , at time t, in
the m-dimensional real space Rm
, |..| represents the Euclidean
norm operator, and s(>0) is the step size.
A suitable function is chosen to adaptively update the local-
decision domain range of each glowworm. This is given by:
ri
d(t + 1) =
rs
1 + βDi(t)
(2.4)
Di(t) =
Ni(t)
πr2
(2.5)
Neighborhood range update phase: Each agent i is associ-
ated with a neighborhood whose radial range rid is dynamic in
nature (0 < ri
d <= rs).
GSO uses an adaptive neighborhood range in order to detect the
presence of multiple peaks in a multimodal function landscape.
Let r0 be the initial neighborhood range of each glowworm (that
is, ri
d(0) = r0∀i).
To adaptively update the neighborhood range of each glowworm,
the following rule is applied:
ri
d(t + 1) = min{rs, max{0, ri
d(t) + β(nt − |Ni(t)|)}} (2.6)
where, β is a constant parameter and nt is a parameter used
to control the number of neighbors.
6
Chapter 3
Psuedocode and
Implementation of GSO
3.1 Algorithm Flow Chart
Fig 3.1 GSO Flowchart
7
3.2 GSO Algorithm
8
3.3 Python Code
We peresent an example of 20 worms on a 10 x 10 grid optimizing
for maximum. Given a worms location, its’ score is determined
by the fitness function, which in this example was made up to
provide multiple local maximums within the area.
import numpy as np
import matplotlib .cm as cm
import matplotlib . pyplot as plt
import matplotlib . patches as mpatches
from matplotlib . c o l l e c t i o n s import PatchCollection
from scipy . s p a t i a l import distance as d i s t
import copy
%matplotlib i n l i n e
# Since the f i t n e s s function rates some worms negatively ,
#the lower bound e x i s t s
# to add to a l l of the scores so they are
#p o s i t i v e before normalization
# The influence f a c t o r i s divided form a l l the
#p o s i t i v e scores to determine the
# range of influence .
dims = 10
num worms = 20
nturns = 100
lower bound = 70
i n f l u e n c e f a c t o r = 30
max jitter = .2
def f i t n e s s f u n c t i o n ( xy tuple ) :
x = xy tuple [ 0 ] / 2
y = xy tuple [ 1 ] / 2
return (np . sin (x∗∗3+ (y−5)∗∗3) + np . cos (( y−5)∗∗2) ∗10
+ np . cos (x∗2) ∗ 12 ∗ (y−5))
def s t a r t i n g p o i n t s ( ) :
return np . random . rand (num worms , 2 ) ∗ 10
9
def g e t s c o r e ( pop ) :
temp = [ ( f i t n e s s f u n c t i o n ( tup )) for tup in pop ]
normal = [ x + lower bound for x in temp ]
return [ x / i n f l u e n c e f a c t o r for x in normal ]
# This returns a matrix with the distances between each
#worm c a l c u l a t e d i f the
# worm in the row i s influenced by the worm in the column ,
#e l s e 0
def influence matrix (pop , score ) :
graph = np . array ( [ np . zeros (num worms ) ] ∗ num worms)
for i in range(num worms ) :
for j in range(num worms ) :
i f i == j :
graph [ i ] [ j ] = 0
e l i f d i s t . euclidean ( pop [ i ] , pop [ j ] ) <= score [ j ] :
graph [ i ] [ j ] = d i s t . euclidean ( pop [ i ] , pop [ j ] )
else :
continue
return graph
def next turn (pop , score , im ) :
n turn = copy . deepcopy ( pop )
# X and Y movement i s determined by the r a t i o of
#distance between worms and
# the radius of the i n f l u e n c i n g worm
# This ensures that c l o s e r worms w i l l have more
# influence than f u r t h e r worms
# with the same pull , and at the same time worms with
# large i n f l u e n c e s w i l l
# have more p u l l than other worms of the same distance
for i in range(num worms ) :
x move = 0
y move = 0
for j in range(num worms ) :
percent move = 1 − (im [ i ] [ j ] / score [ j ] ) i f
im [ i ] [ j ] != 0 else 0
x move += ( pop [ j ] [ 0 ] − pop [ i ] [ 0 ] ) ∗
percent move / 10 i f score [ i ] < score [ j ] else 0
y move += ( pop [ j ] [ 1 ] − pop [ i ] [ 1 ] ) ∗
10
percent move / 10 i f score [ i ] < score [ j ] else 0
j i t t e r x = max jitter ∗ np . random . rand () ∗ np . random . randint ( −1 ,2)
j i t t e r y = max jitter ∗ np . random . rand () ∗ np . random . randint ( −1 ,2)
n turn [ i ] [ 0 ] += x move + j i t t e r x
n turn [ i ] [ 1 ] += y move + j i t t e r y
n turn [ i ] [ 0 ] = keep in bounds ( n turn [ i ] [ 0 ] , dims )
n turn [ i ] [ 1 ] = keep in bounds ( n turn [ i ] [ 1 ] , dims )
return n turn
def keep in bounds (x , dims ) :
i f x < 0:
return 0
e l i f x > dims :
return dims
else :
return x
### START ###
pop = s t a r t i n g p o i n t s ()
for each in range( nturns ) :
score = g e t s c o r e ( pop )
### PLOT ###
plt . r c d e f a u l t s ()
fig , ax = plt . subplots ()
x = np . arange (0 , dims , 0.1)
y = np . arange (0 , dims , 0.1)
xx , yy = np . meshgrid (x , y , sparse=True )
z = f i t n e s s f u n c t i o n ( [ xx , yy ] )
im = plt . imshow ( z , i n t e r p o l a t i o n=’ b i l i n e a r ’ ,
o r i g i n=’ lower ’ , cmap=cm. gray , extent =(0 , dims , 0 , dims ))
plt . contour (x , y , z , alpha =0.1)
plt . plot ( pop [ : , 0 ] , pop [ : , 1 ] , ’ ro ’ )
patches = [ ]
for i in range (0 , num worms ) :
patches . append ( mpatches . Circle (( pop [ i ] [ 0 ] ,
11
pop [ i ] [ 1 ] ) , score [ i ] , ec = ”none” ) )
c o l o r s = np . linspace (0 , 1 , len ( patches ))
c o l l e c t i o n = PatchCollection ( patches ,
cmap=plt .cm. hsv , alpha =0.05)
c o l l e c t i o n . set array (np . array ( c o l o r s ))
ax . a d d c o l l e c t i o n ( c o l l e c t i o n )
#####
plt . show ()
#print ()
name = ”0000000” + str ( each )
name = name[ −4:] + ’ . png ’
#p l t . s a v e f i g (name , bbox inches =’ t i g h t ’)
im = influence matrix (pop , score )
pop = copy . deepcopy ( next turn (pop , score , im ))
plt . c l o s e ( ” a l l ” )
These are the result of the code when implemented:
12
Fig 3.2 Python Implementation Of GSO
13
References
[1] K.N. Krishnanand and D. Ghose. Detection of multiple
source locations using a glowworm metaphor with appli-
cations to collective robotics. In Proceedings of the IEEE
Swarm Intelligence Symposium, pages 8491. Pasedena, Cal-
ifornia, June 2005.
[2] K.N. Krishnanand. Glowworm Swarm Optimization: A
Multimodal Function Optimization Paradigm with Appli-
cations to Multiple Signal Source Localization Tasks. PhD
thesis, Indian Institute of Science, Bangalore, 2007.
[3] K.N. Krishnanand, P. Amruth,M.H. Guruprasad, S.V.
Bidargaddi, and D. Ghose. Glowworminspired robot swarm
for simultaneous taxis towards multiple radiation sources.
In Proceedings of the IEEE International Conference on
Robotics and Automation, pages 958963. Orlando, Florida,
May 2006.
[4] K.N. Krishnanand and D. Ghose. Multimodal function op-
timization using a glowworm metaphor with applications
to collective robotics. In Proceedings of the Indian Interna-
tional Conference on Artificial Intelligence, pages 328346.
Pune, India, 2005.
[5] K.N. Krishnanand and D. Ghose. Glowworm swarm based
optimization algorithm for multimodal functions with col-
lective robotics applications. Multiagent and Grid Systems,
2(3):209 222, 2006.
14
[6] K.N. Krishnanand and D. Ghose. Design and Control of In-
telligent Robotic Systems, chapter AGlowworm Swarm Op-
timizationBased Multi-robot System for Signal Source Lo-
calization, pages 4968. Springer Berlin Heidelberg, Berlin,
Heidelberg, 2009.
[7] K.N. Krishnanand and D. Ghose. Glowworm swarm opti-
mization for simultaneous capture of multiple local optima
of multimodal functions. Swarm Intelligence, 3(2):87124,
2009.
[8] K.N. Krishnanand and D. Ghose. Handbook of Swarm In-
telligence: Concepts, Principles and Applications, chap-
ter Glowworm swarm optimization for multimodal search
spaces, pages 451467. Springer Berlin Heidelberg, Berlin,
Heidelberg, 2011.
[9] K.N. Krishnanand, A. Puttappa, G.M. Hegde, S.V. Bidar-
gaddi, and D. Ghose. Ant Colony Optimization and Swarm
Intelligence: 5th International Workshop, ANTS 2006,
Brussels, Belgium, September 47, 2006. Proceedings, chap-
ter Rendezvous of Glowworm-Inspired Robot Swarms at
Multiple Source Locations: A Sound Source Based Real-
Robot Implementation, pages 259269. Springer Berlin Hei-
delberg, Berlin, Heidelberg, 2006.
[10] K.N. Krishnanand andD.Ghose. Glowworm swarm optimi-
sation: a newmethod for optimising multi-modal functions.
International Journal of Computational Intelligence Stud-
ies, 1(1): 93 119, 2009.
[11] X-S Yang. Proceedings of the 5th International Sympo-
sium on Stochastic Algorithms: Foundations and Applica-
tions, Sapporo, Japan, chapter Firefly algorithms for multi-
modal optimization, pages 169178. Springer Berlin Heidel-
berg, Berlin, Heidelberg, October 2009.
15
[12] K.N. Krishnanand, D. Ghose, Detection of Multiple Source
Locations using a Glowworm Metaphor with Applications
to Collective Robotics, Swarm Intelligence Symposium,
2005, pp. 84-91.
[13] Kaipa, K. and Ghose, D. (2017). Glowworm Swarm Op-
timization:Theory, Algorithms, and Applications. Cham:
Springer.
16

More Related Content

What's hot

Numerical methods and its applications
Numerical methods and its applicationsNumerical methods and its applications
Numerical methods and its applicationsHaiderParekh1
 
Time response of discrete systems 4th lecture
Time response of discrete systems 4th lectureTime response of discrete systems 4th lecture
Time response of discrete systems 4th lecturekhalaf Gaeid
 
SMART DUSTBIN FOR SMART CITIES
SMART DUSTBIN FOR SMART CITIESSMART DUSTBIN FOR SMART CITIES
SMART DUSTBIN FOR SMART CITIESVED PRAKASH
 
Random Matrix Theory in Array Signal Processing: Application Examples
Random Matrix Theory in Array Signal Processing: Application ExamplesRandom Matrix Theory in Array Signal Processing: Application Examples
Random Matrix Theory in Array Signal Processing: Application ExamplesFörderverein Technische Fakultät
 
Show ant-colony-optimization-for-solving-the-traveling-salesman-problem
Show ant-colony-optimization-for-solving-the-traveling-salesman-problemShow ant-colony-optimization-for-solving-the-traveling-salesman-problem
Show ant-colony-optimization-for-solving-the-traveling-salesman-problemjayatra
 
Computing DFT using Matrix method
Computing DFT using Matrix methodComputing DFT using Matrix method
Computing DFT using Matrix methodSarang Joshi
 
Particle Swarm Optimization: The Algorithm and Its Applications
Particle Swarm Optimization: The Algorithm and Its ApplicationsParticle Swarm Optimization: The Algorithm and Its Applications
Particle Swarm Optimization: The Algorithm and Its Applicationsadil raja
 
WIRELESS FLOOR CLEANING ROBOT
WIRELESS FLOOR CLEANING ROBOTWIRELESS FLOOR CLEANING ROBOT
WIRELESS FLOOR CLEANING ROBOTAsish Nayak
 
Soft computing (ANN and Fuzzy Logic) : Dr. Purnima Pandit
Soft computing (ANN and Fuzzy Logic)  : Dr. Purnima PanditSoft computing (ANN and Fuzzy Logic)  : Dr. Purnima Pandit
Soft computing (ANN and Fuzzy Logic) : Dr. Purnima PanditPurnima Pandit
 
HUMAN FOLLOWING ROBOT
HUMAN FOLLOWING ROBOTHUMAN FOLLOWING ROBOT
HUMAN FOLLOWING ROBOTHaris946223
 
Ant Colony Optimization (ACO)
Ant Colony Optimization (ACO)Ant Colony Optimization (ACO)
Ant Colony Optimization (ACO)Mahmoud El-tayeb
 
Metaheuristic Algorithms: A Critical Analysis
Metaheuristic Algorithms: A Critical AnalysisMetaheuristic Algorithms: A Critical Analysis
Metaheuristic Algorithms: A Critical AnalysisXin-She Yang
 
FL-01 Introduction.pptx
FL-01 Introduction.pptxFL-01 Introduction.pptx
FL-01 Introduction.pptxSourabhRuhil4
 
Speed control of dc motor by fuzzy controller
Speed control of dc motor by fuzzy controllerSpeed control of dc motor by fuzzy controller
Speed control of dc motor by fuzzy controllerMurugappa Group
 
swarm intelligence seminar
swarm intelligence seminarswarm intelligence seminar
swarm intelligence seminarRadhikaGupta173
 

What's hot (20)

Numerical methods and its applications
Numerical methods and its applicationsNumerical methods and its applications
Numerical methods and its applications
 
Time response of discrete systems 4th lecture
Time response of discrete systems 4th lectureTime response of discrete systems 4th lecture
Time response of discrete systems 4th lecture
 
SMART DUSTBIN FOR SMART CITIES
SMART DUSTBIN FOR SMART CITIESSMART DUSTBIN FOR SMART CITIES
SMART DUSTBIN FOR SMART CITIES
 
Random Matrix Theory in Array Signal Processing: Application Examples
Random Matrix Theory in Array Signal Processing: Application ExamplesRandom Matrix Theory in Array Signal Processing: Application Examples
Random Matrix Theory in Array Signal Processing: Application Examples
 
Show ant-colony-optimization-for-solving-the-traveling-salesman-problem
Show ant-colony-optimization-for-solving-the-traveling-salesman-problemShow ant-colony-optimization-for-solving-the-traveling-salesman-problem
Show ant-colony-optimization-for-solving-the-traveling-salesman-problem
 
Computing DFT using Matrix method
Computing DFT using Matrix methodComputing DFT using Matrix method
Computing DFT using Matrix method
 
FILTER BANKS
FILTER BANKSFILTER BANKS
FILTER BANKS
 
Particle Swarm Optimization: The Algorithm and Its Applications
Particle Swarm Optimization: The Algorithm and Its ApplicationsParticle Swarm Optimization: The Algorithm and Its Applications
Particle Swarm Optimization: The Algorithm and Its Applications
 
WIRELESS FLOOR CLEANING ROBOT
WIRELESS FLOOR CLEANING ROBOTWIRELESS FLOOR CLEANING ROBOT
WIRELESS FLOOR CLEANING ROBOT
 
Firefly algorithm
Firefly algorithmFirefly algorithm
Firefly algorithm
 
Soft computing (ANN and Fuzzy Logic) : Dr. Purnima Pandit
Soft computing (ANN and Fuzzy Logic)  : Dr. Purnima PanditSoft computing (ANN and Fuzzy Logic)  : Dr. Purnima Pandit
Soft computing (ANN and Fuzzy Logic) : Dr. Purnima Pandit
 
HUMAN FOLLOWING ROBOT
HUMAN FOLLOWING ROBOTHUMAN FOLLOWING ROBOT
HUMAN FOLLOWING ROBOT
 
Practical Swarm Optimization (PSO)
Practical Swarm Optimization (PSO)Practical Swarm Optimization (PSO)
Practical Swarm Optimization (PSO)
 
Human Detection Robot
Human Detection Robot Human Detection Robot
Human Detection Robot
 
Ant Colony Optimization (ACO)
Ant Colony Optimization (ACO)Ant Colony Optimization (ACO)
Ant Colony Optimization (ACO)
 
Metaheuristic Algorithms: A Critical Analysis
Metaheuristic Algorithms: A Critical AnalysisMetaheuristic Algorithms: A Critical Analysis
Metaheuristic Algorithms: A Critical Analysis
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithms
 
FL-01 Introduction.pptx
FL-01 Introduction.pptxFL-01 Introduction.pptx
FL-01 Introduction.pptx
 
Speed control of dc motor by fuzzy controller
Speed control of dc motor by fuzzy controllerSpeed control of dc motor by fuzzy controller
Speed control of dc motor by fuzzy controller
 
swarm intelligence seminar
swarm intelligence seminarswarm intelligence seminar
swarm intelligence seminar
 

Similar to Glowworm Swarm Optimisation

Glowworm swarm optimization (Presentation)
Glowworm swarm optimization (Presentation)Glowworm swarm optimization (Presentation)
Glowworm swarm optimization (Presentation)Younis Al-Ibrahim
 
Lecture 2: Stochastic Hydrology
Lecture 2: Stochastic Hydrology Lecture 2: Stochastic Hydrology
Lecture 2: Stochastic Hydrology Amro Elfeki
 
Auto encoders in Deep Learning
Auto encoders in Deep LearningAuto encoders in Deep Learning
Auto encoders in Deep LearningShajun Nisha
 
Basics of edge detection and forier transform
Basics of edge detection and forier transformBasics of edge detection and forier transform
Basics of edge detection and forier transformSimranjit Singh
 
PSO and Its application in Engineering
PSO and Its application in EngineeringPSO and Its application in Engineering
PSO and Its application in EngineeringPrince Jain
 
Q-Metrics in Theory and Practice
Q-Metrics in Theory and PracticeQ-Metrics in Theory and Practice
Q-Metrics in Theory and PracticeMagdi Mohamed
 
Q-Metrics in Theory And Practice
Q-Metrics in Theory And PracticeQ-Metrics in Theory And Practice
Q-Metrics in Theory And Practiceguest3550292
 
Derivatives and it’s simple applications
Derivatives and it’s simple applicationsDerivatives and it’s simple applications
Derivatives and it’s simple applicationsRutuja Gholap
 
[shaderx5] 4.2 Multisampling Extension for Gradient Shadow Maps
[shaderx5] 4.2 Multisampling Extension for Gradient Shadow Maps[shaderx5] 4.2 Multisampling Extension for Gradient Shadow Maps
[shaderx5] 4.2 Multisampling Extension for Gradient Shadow Maps종빈 오
 
Programmable PN Sequence Generators
Programmable PN Sequence GeneratorsProgrammable PN Sequence Generators
Programmable PN Sequence GeneratorsRajesh Singh
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)IJERD Editor
 
signal and system Dirac delta functions (1)
signal and system Dirac delta functions (1)signal and system Dirac delta functions (1)
signal and system Dirac delta functions (1)iqbal ahmad
 
EC8553 Discrete time signal processing
EC8553 Discrete time signal processing EC8553 Discrete time signal processing
EC8553 Discrete time signal processing ssuser2797e4
 
Time Series Analysis
Time Series AnalysisTime Series Analysis
Time Series AnalysisAmit Ghosh
 

Similar to Glowworm Swarm Optimisation (20)

Glowworm swarm optimization (Presentation)
Glowworm swarm optimization (Presentation)Glowworm swarm optimization (Presentation)
Glowworm swarm optimization (Presentation)
 
Lecture 2: Stochastic Hydrology
Lecture 2: Stochastic Hydrology Lecture 2: Stochastic Hydrology
Lecture 2: Stochastic Hydrology
 
Auto encoders in Deep Learning
Auto encoders in Deep LearningAuto encoders in Deep Learning
Auto encoders in Deep Learning
 
Basics of edge detection and forier transform
Basics of edge detection and forier transformBasics of edge detection and forier transform
Basics of edge detection and forier transform
 
PSO and Its application in Engineering
PSO and Its application in EngineeringPSO and Its application in Engineering
PSO and Its application in Engineering
 
Q-Metrics in Theory and Practice
Q-Metrics in Theory and PracticeQ-Metrics in Theory and Practice
Q-Metrics in Theory and Practice
 
Q-Metrics in Theory And Practice
Q-Metrics in Theory And PracticeQ-Metrics in Theory And Practice
Q-Metrics in Theory And Practice
 
Derivatives and it’s simple applications
Derivatives and it’s simple applicationsDerivatives and it’s simple applications
Derivatives and it’s simple applications
 
505 260-266
505 260-266505 260-266
505 260-266
 
Dsp manual
Dsp manualDsp manual
Dsp manual
 
[shaderx5] 4.2 Multisampling Extension for Gradient Shadow Maps
[shaderx5] 4.2 Multisampling Extension for Gradient Shadow Maps[shaderx5] 4.2 Multisampling Extension for Gradient Shadow Maps
[shaderx5] 4.2 Multisampling Extension for Gradient Shadow Maps
 
Lti system
Lti systemLti system
Lti system
 
Programmable PN Sequence Generators
Programmable PN Sequence GeneratorsProgrammable PN Sequence Generators
Programmable PN Sequence Generators
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)
 
Dsp Lab Record
Dsp Lab RecordDsp Lab Record
Dsp Lab Record
 
MS Project
MS ProjectMS Project
MS Project
 
signal and system Dirac delta functions (1)
signal and system Dirac delta functions (1)signal and system Dirac delta functions (1)
signal and system Dirac delta functions (1)
 
EC8553 Discrete time signal processing
EC8553 Discrete time signal processing EC8553 Discrete time signal processing
EC8553 Discrete time signal processing
 
PhD defense talk slides
PhD  defense talk slidesPhD  defense talk slides
PhD defense talk slides
 
Time Series Analysis
Time Series AnalysisTime Series Analysis
Time Series Analysis
 

Recently uploaded

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 

Recently uploaded (20)

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 

Glowworm Swarm Optimisation

  • 1. SYSTEM PROGRAMMING PROJECT Report Optimisation Algorithm : Glowworm Swarm Optimistaion (4th Semester Project) BTech. in Information Technology Submitted by Roll No Names of Students B416014 Arijeet Satapathy B416044 Seva Mahapatra B416063 Ritesh Kr. Pandey Under the guidance of Prof. Pushpanajli Mahapatra Department of Computer Science and Engineering International Institute Of Information Technology Bhubaneswar,Odisha -751003 Spring 2018
  • 2. Contents 1 Optimization Algorithms and Methods 1 1.1 Multi Modal Optimization . . . . . . . . . . . . . . . . . . . . 1 2 Glowworm Swarm Optimization 2 2.1 The Glowworm Swarm Optimization (GSO) Algorithm . . . . 2 2.1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 2.1.2 Different phases of GSO . . . . . . . . . . . . . . . . . 3 2.2 Algorithm Flow Chart . . . . . . . . . . . . . . . . . . . . . . 4 2.3 Algorithm Description . . . . . . . . . . . . . . . . . . . . . . 4 3 Psuedocode and Implementation of GSO 7 3.1 Algorithm Flow Chart . . . . . . . . . . . . . . . . . . . . . . 7 3.2 GSO Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.3 Python Code . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 References 14 i
  • 3. Chapter 1 Optimization Algorithms and Methods Optimization algorithms, which try to find the minimum val- ues of mathematical functions, are everywhere in engineering. Among other things, theyre used to evaluate design tradeoffs, to assess control systems, and to find patterns in data. 1.1 Multi Modal Optimization Multi-modal optimization Optimization problems are often multi- modal; that is, they possess multiple good solutions. They could all be globally good (same cost function value) or there could be a mix of globally good and locally good solutions. Obtaining all (or at least some of) the multiple solutions is the goal of a multi-modal optimizer. This Project present the following Optimization Algorithm: 1. Glowworm Swarm Optimization[12][13] 1
  • 4. Chapter 2 Glowworm Swarm Optimization In this chapter, the development of the glowworm swarm op- timization (GSO) algorithm is presented. Initially, the basic working principle of GSO is introduced, which is followed by a description of the phases that constitute each cycle of the algorithm.GSO, in its present form, has evolved out of several significant modifications incorporated into the earlier versions of the algorithm. Many ideas were considered in the development process before converging upon the current GSO version. 2.1 The Glowworm Swarm Optimization (GSO) Algorithm 2.1.1 Introduction Glowworm swarm optimization (GSO), a swarm intelligence al- gorithm modeled after the behavior of glowworms (also known as fireflies or lightning bugs). GSO was introduced by Krish- nanand and Ghose in 2005 [1]. Subsequently,the authors used GSO in various applications and several papers on this work have appeared in the literature [2, 3, 4]-[8, 9, 10]. Later, other researchers have proposed the firefly algorithm [11], which es- 2
  • 5. sentially follows the same logic as GSO with some minor vari- ations. GSO is originally developed for numerical optimization problems that involve computing multiple optima of multimodal functions, as against other swarm intelligence algorithms which aim to identify the global optimum. 2.1.2 Different phases of GSO Each glowworm is attracted by, and moves toward, a single neighbor whose glow is brighter than that of itself; when sur- rounded by multiple such neighbors, it uses a probabilistic mech- anism to select one of them. Each glowworm uses an adaptive neighborhood to identify neigh- bors; it is defined by a local-decision domain that has a variable range bounded by a hard-limited sensor range rs(0 < ri d <= rs).A glowworm i considers another glowworm j as its neighbor if j is within the neighborhood range of i and the luciferin level of j is higher than that of i . Fig 2.1 Agent i is in the sensor range of (and is equidistant to) both j and k. But, they have different decision-domains.Hence, only j uses the information of i. 3
  • 6. For instance, in Fig. 2.1, glowworm i is in the sensor range of (and is equidistant to) both j and k. However, j and k have different neighborhood sizes, and only j uses the information of i. 2.2 Algorithm Flow Chart Fig 2.2 GSO Flowchart 2.3 Algorithm Description Initially, all the glowworms contain an equal quantity of luciferin l0. Each cycle of the algorithm consists of a luciferin update phase, a movement phase, and a neighborhood range update phase (Fig. 2.2). The GSO algorithm is given in Fig. 2.3. 4
  • 7. Luciferin update phase: During the luciferin-update phase, each glowworm adds, to its previous luciferin level, a luciferin quantity proportional to the fitness of its current location in the objective function space. Also, a fraction of the luciferin value is subtracted to simulate the decay in luciferin with time. The luciferin update rule is given by: li(t + 1) = (1 − ρ)li(t) + γJ(xi(t + 1)) (2.1) where, li(t) represents the luciferin level associated with glow- worm i at time t, is the luciferin decay constant (0 < ρ < 1), γ is the luciferin enhancement constant. Movement Phase: During the movement phase, each glow- worm decides, using a probabilistic mechanism, to move towards a neighbor that has a luminescence value more than its own, that is, they are attracted to neighbors that glow brighter.For each glowworm i, the probability of moving towards a neighbor j is given by: pj(t) = τj(t) j Ni(t) τj(t) (2.2) where j Ni(t), Ni(t) = j : d(i, j) < ri d and τi(t) < τj(t), t is the time index, d(i, j) represents the euclidean distance between glowworms i and j, τj(t) represents the luminescence level asso- ciated with glowworm j at time t, and rs represents the radial range of the luminescence sensor. Let glowworm i select a glowworm j Ni (t) with pi j (t) given by (2.2). Then, the discrete-time model of the glowworm movements can be stated as: xi(t + 1) = xi(t) + s xj(t) − xi(t) ||xj(t) − xi(t)|| (2.3) 5
  • 8. where, xi(t) Rm is the location of glowworm i , at time t, in the m-dimensional real space Rm , |..| represents the Euclidean norm operator, and s(>0) is the step size. A suitable function is chosen to adaptively update the local- decision domain range of each glowworm. This is given by: ri d(t + 1) = rs 1 + βDi(t) (2.4) Di(t) = Ni(t) πr2 (2.5) Neighborhood range update phase: Each agent i is associ- ated with a neighborhood whose radial range rid is dynamic in nature (0 < ri d <= rs). GSO uses an adaptive neighborhood range in order to detect the presence of multiple peaks in a multimodal function landscape. Let r0 be the initial neighborhood range of each glowworm (that is, ri d(0) = r0∀i). To adaptively update the neighborhood range of each glowworm, the following rule is applied: ri d(t + 1) = min{rs, max{0, ri d(t) + β(nt − |Ni(t)|)}} (2.6) where, β is a constant parameter and nt is a parameter used to control the number of neighbors. 6
  • 9. Chapter 3 Psuedocode and Implementation of GSO 3.1 Algorithm Flow Chart Fig 3.1 GSO Flowchart 7
  • 11. 3.3 Python Code We peresent an example of 20 worms on a 10 x 10 grid optimizing for maximum. Given a worms location, its’ score is determined by the fitness function, which in this example was made up to provide multiple local maximums within the area. import numpy as np import matplotlib .cm as cm import matplotlib . pyplot as plt import matplotlib . patches as mpatches from matplotlib . c o l l e c t i o n s import PatchCollection from scipy . s p a t i a l import distance as d i s t import copy %matplotlib i n l i n e # Since the f i t n e s s function rates some worms negatively , #the lower bound e x i s t s # to add to a l l of the scores so they are #p o s i t i v e before normalization # The influence f a c t o r i s divided form a l l the #p o s i t i v e scores to determine the # range of influence . dims = 10 num worms = 20 nturns = 100 lower bound = 70 i n f l u e n c e f a c t o r = 30 max jitter = .2 def f i t n e s s f u n c t i o n ( xy tuple ) : x = xy tuple [ 0 ] / 2 y = xy tuple [ 1 ] / 2 return (np . sin (x∗∗3+ (y−5)∗∗3) + np . cos (( y−5)∗∗2) ∗10 + np . cos (x∗2) ∗ 12 ∗ (y−5)) def s t a r t i n g p o i n t s ( ) : return np . random . rand (num worms , 2 ) ∗ 10 9
  • 12. def g e t s c o r e ( pop ) : temp = [ ( f i t n e s s f u n c t i o n ( tup )) for tup in pop ] normal = [ x + lower bound for x in temp ] return [ x / i n f l u e n c e f a c t o r for x in normal ] # This returns a matrix with the distances between each #worm c a l c u l a t e d i f the # worm in the row i s influenced by the worm in the column , #e l s e 0 def influence matrix (pop , score ) : graph = np . array ( [ np . zeros (num worms ) ] ∗ num worms) for i in range(num worms ) : for j in range(num worms ) : i f i == j : graph [ i ] [ j ] = 0 e l i f d i s t . euclidean ( pop [ i ] , pop [ j ] ) <= score [ j ] : graph [ i ] [ j ] = d i s t . euclidean ( pop [ i ] , pop [ j ] ) else : continue return graph def next turn (pop , score , im ) : n turn = copy . deepcopy ( pop ) # X and Y movement i s determined by the r a t i o of #distance between worms and # the radius of the i n f l u e n c i n g worm # This ensures that c l o s e r worms w i l l have more # influence than f u r t h e r worms # with the same pull , and at the same time worms with # large i n f l u e n c e s w i l l # have more p u l l than other worms of the same distance for i in range(num worms ) : x move = 0 y move = 0 for j in range(num worms ) : percent move = 1 − (im [ i ] [ j ] / score [ j ] ) i f im [ i ] [ j ] != 0 else 0 x move += ( pop [ j ] [ 0 ] − pop [ i ] [ 0 ] ) ∗ percent move / 10 i f score [ i ] < score [ j ] else 0 y move += ( pop [ j ] [ 1 ] − pop [ i ] [ 1 ] ) ∗ 10
  • 13. percent move / 10 i f score [ i ] < score [ j ] else 0 j i t t e r x = max jitter ∗ np . random . rand () ∗ np . random . randint ( −1 ,2) j i t t e r y = max jitter ∗ np . random . rand () ∗ np . random . randint ( −1 ,2) n turn [ i ] [ 0 ] += x move + j i t t e r x n turn [ i ] [ 1 ] += y move + j i t t e r y n turn [ i ] [ 0 ] = keep in bounds ( n turn [ i ] [ 0 ] , dims ) n turn [ i ] [ 1 ] = keep in bounds ( n turn [ i ] [ 1 ] , dims ) return n turn def keep in bounds (x , dims ) : i f x < 0: return 0 e l i f x > dims : return dims else : return x ### START ### pop = s t a r t i n g p o i n t s () for each in range( nturns ) : score = g e t s c o r e ( pop ) ### PLOT ### plt . r c d e f a u l t s () fig , ax = plt . subplots () x = np . arange (0 , dims , 0.1) y = np . arange (0 , dims , 0.1) xx , yy = np . meshgrid (x , y , sparse=True ) z = f i t n e s s f u n c t i o n ( [ xx , yy ] ) im = plt . imshow ( z , i n t e r p o l a t i o n=’ b i l i n e a r ’ , o r i g i n=’ lower ’ , cmap=cm. gray , extent =(0 , dims , 0 , dims )) plt . contour (x , y , z , alpha =0.1) plt . plot ( pop [ : , 0 ] , pop [ : , 1 ] , ’ ro ’ ) patches = [ ] for i in range (0 , num worms ) : patches . append ( mpatches . Circle (( pop [ i ] [ 0 ] , 11
  • 14. pop [ i ] [ 1 ] ) , score [ i ] , ec = ”none” ) ) c o l o r s = np . linspace (0 , 1 , len ( patches )) c o l l e c t i o n = PatchCollection ( patches , cmap=plt .cm. hsv , alpha =0.05) c o l l e c t i o n . set array (np . array ( c o l o r s )) ax . a d d c o l l e c t i o n ( c o l l e c t i o n ) ##### plt . show () #print () name = ”0000000” + str ( each ) name = name[ −4:] + ’ . png ’ #p l t . s a v e f i g (name , bbox inches =’ t i g h t ’) im = influence matrix (pop , score ) pop = copy . deepcopy ( next turn (pop , score , im )) plt . c l o s e ( ” a l l ” ) These are the result of the code when implemented: 12
  • 15. Fig 3.2 Python Implementation Of GSO 13
  • 16. References [1] K.N. Krishnanand and D. Ghose. Detection of multiple source locations using a glowworm metaphor with appli- cations to collective robotics. In Proceedings of the IEEE Swarm Intelligence Symposium, pages 8491. Pasedena, Cal- ifornia, June 2005. [2] K.N. Krishnanand. Glowworm Swarm Optimization: A Multimodal Function Optimization Paradigm with Appli- cations to Multiple Signal Source Localization Tasks. PhD thesis, Indian Institute of Science, Bangalore, 2007. [3] K.N. Krishnanand, P. Amruth,M.H. Guruprasad, S.V. Bidargaddi, and D. Ghose. Glowworminspired robot swarm for simultaneous taxis towards multiple radiation sources. In Proceedings of the IEEE International Conference on Robotics and Automation, pages 958963. Orlando, Florida, May 2006. [4] K.N. Krishnanand and D. Ghose. Multimodal function op- timization using a glowworm metaphor with applications to collective robotics. In Proceedings of the Indian Interna- tional Conference on Artificial Intelligence, pages 328346. Pune, India, 2005. [5] K.N. Krishnanand and D. Ghose. Glowworm swarm based optimization algorithm for multimodal functions with col- lective robotics applications. Multiagent and Grid Systems, 2(3):209 222, 2006. 14
  • 17. [6] K.N. Krishnanand and D. Ghose. Design and Control of In- telligent Robotic Systems, chapter AGlowworm Swarm Op- timizationBased Multi-robot System for Signal Source Lo- calization, pages 4968. Springer Berlin Heidelberg, Berlin, Heidelberg, 2009. [7] K.N. Krishnanand and D. Ghose. Glowworm swarm opti- mization for simultaneous capture of multiple local optima of multimodal functions. Swarm Intelligence, 3(2):87124, 2009. [8] K.N. Krishnanand and D. Ghose. Handbook of Swarm In- telligence: Concepts, Principles and Applications, chap- ter Glowworm swarm optimization for multimodal search spaces, pages 451467. Springer Berlin Heidelberg, Berlin, Heidelberg, 2011. [9] K.N. Krishnanand, A. Puttappa, G.M. Hegde, S.V. Bidar- gaddi, and D. Ghose. Ant Colony Optimization and Swarm Intelligence: 5th International Workshop, ANTS 2006, Brussels, Belgium, September 47, 2006. Proceedings, chap- ter Rendezvous of Glowworm-Inspired Robot Swarms at Multiple Source Locations: A Sound Source Based Real- Robot Implementation, pages 259269. Springer Berlin Hei- delberg, Berlin, Heidelberg, 2006. [10] K.N. Krishnanand andD.Ghose. Glowworm swarm optimi- sation: a newmethod for optimising multi-modal functions. International Journal of Computational Intelligence Stud- ies, 1(1): 93 119, 2009. [11] X-S Yang. Proceedings of the 5th International Sympo- sium on Stochastic Algorithms: Foundations and Applica- tions, Sapporo, Japan, chapter Firefly algorithms for multi- modal optimization, pages 169178. Springer Berlin Heidel- berg, Berlin, Heidelberg, October 2009. 15
  • 18. [12] K.N. Krishnanand, D. Ghose, Detection of Multiple Source Locations using a Glowworm Metaphor with Applications to Collective Robotics, Swarm Intelligence Symposium, 2005, pp. 84-91. [13] Kaipa, K. and Ghose, D. (2017). Glowworm Swarm Op- timization:Theory, Algorithms, and Applications. Cham: Springer. 16