Multimodal Optimization by Sparkling Squid
Populations
Videh Seksaria
Lexington High School
Department of Computer Science
01vssv10@gmail.com

arXiv:1401.0858v1 [cs.NE] 5 Jan 2014

Abstract
The swarm intelligence of animals is a natural paradigm to apply to optimization problems. Ant colony, bee colony, firefly and bat algorithms are
amongst those that have been demonstrated to efficiently to optimize complex
constraints. This paper proposes the new Sparkling Squid Algorithm (SSA) for
multimodal optimization, inspired by the intelligent swarm behavior of its namesake. After an introduction, formulation and discussion of its implementation,
it will be compared to other popular metaheuristics. Finally, applications to
well - known problems such as image registration and the traveling salesperson
problem will be discussed.

Key words. heuristics, multimodal optimization, NP problems, particle swarm,
genetic algorithm.

Contents
1 Introduction

2

2 Optimization
2.1 Particle Swarm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2 Variations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2
3
4

3 Behaviour of Sparkling Squid
3.1 Behaviour of Sparkling Squid . . . . . . . . . . . . . . . . . . . . . . .
3.2 Light Intensity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5
5
5

4 Sparkling Squid Heuristics
4.1 Primary and Secondary Swarms .
4.2 Attraction and Randomness . . .
4.3 Predator - Prey Swarms . . . . .
4.4 Sparkling Squid Algorithms . . .

.
.
.
.

6
6
6
7
8

5 Multimodal Optimization
5.1 Benchmark Validation . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2 Comparative Results with Particle Swarm and Genetic Algorithms . .

8
8
10

6 Conclusions

15

1

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

1

Introduction

Optimization problems are formulated based on the practical situations in which they
occur in. The resultant model is grossly unfit for processing by classical algorithms in
many ways. Primarily, there are few simplifying assumptions that can be made. Such
algorithms often require the constraints to be eased, which can impact the quality
of the solution produced. In addition, there efficiency depends on the complexity of
the objective and scope and structure of the solution space. Instead of providing a
general solution, they offer a specific solution that can be rendered useless by adding
a single variable [2, 3, 7]. This makes classical algorithms a poor choice for large, non
- linear optimization tasks [17].
A more fit design paradigm is that of the multipurpose heuristic (metaheuristics)
algorithm. Crafted to be able to solve an entire class of problems, metaheuristics
are fast, and flexible to be tailored to precise specifications. These algorithms use
iterative refinement and evolutionary methods to improve a solution candidate with
regard to a fitness function [12, 15]. One particular class of interest is based on swarm
intelligence. Swarm intelligence uses the cooperative behavior of animal societies to
design algorithms. As in the real world, this allows a large solution space to be quickly
searched, while also providing fault tolerance and parallelism [1, 4, 5, 6, 10].
Though diverse in their inspiration throughout nature, swarm algorithms depend
on individual orientation and a fair division of labor. The ability for individuals to
react to external stimuli also removes the need of processing cycle - consuming central
hive - mind. Popular examples of such algorithms include particle swarm (PSO), ant
colony, artificial bee colony (ABC), firefly (FA), and various cellular networks. These
methods have been shown to be superior to previous optimization strategies such
as genetic algorithms (GA) and simulated annealing (SA). Other swarm strategies
based on physical nature (as opposed to biological nature) include water droplets,
electromagnetism, river dynamics, and musical based metrics [3, 7, 8, 9, 10, 13, 14,
16, 18, 22, 24, 28, 36]. In addition to being more accurate, these strategies tend to be
easier to implement and more robust. More recent advancements like particle swarm
algorithms also have the added benefit of only using real numbers in computation as
opposed to complex mutation functions as in genetic algorithms [20, 23, 31].
In this work, the sparkling squid algorithm (SSA) will be introduced and its performance investigated when compared with other relevant algorithms. Before outlining
the sparkling squid algorithm, the particle swarm algorithm will be briefly outlined.
The rest of the paper is organized as follows. In section 2, the particle swarm
algorithm is described, and various applications are introduced. In sections 3 and 4,
the sparkling squid algorithm is defined and its behavior studied. In section 5, it is
compared with pertinent algorithms, and evaluated in section 6.

2

Optimization

Particle swarm optimization is an optimization paradigm which travels the search
space while attempting to optimize an objective function. It does so by tweaking the
motion of individual particles (agents) as they traverse the space. The idea originates
from the study of the swarming behavior of fish or birds. Though many variants of
PSO exist, the idea by Eberhart and Kennedy (1995) is discussed below.

2

As the name suggest, PSO is a strategy for finding the values of parameters that
give the optimum value of an objective function. This is critical if one wishes to
maximize a certain value, such as profit or yield. That is:

Given f : Rn → R

(1)

b ∈ Rn , f (b
Find x
x) ≤ f (x) , x ∈ Rn

(2)

Of course, is one wishes to minimize (b
x ∈ Rn , f (b
x) ≥ f (x) , x ∈ Rn ), they can
n
maximize the value of −f . The domain R of f z represents the search (parameter)
space. Every element is a possible o, and so is referred to as a candidate solution.
The dimension of this space is equivalent to the number of variables, EQ, while the
fitness space of the fitness function has only a single dimension[5].
This problem is trivial to solve if we are sure of the function f . However, in
optimization tasks, the objective function within a “black - box”, which prevents
the methods of calculus from being applicable. One also may have to content with
constrained optimization tasks where additional constraints such as positivity or primality are enforced[17].
The simplest example of an optimization task can be seen below in figure 1. The
relevant interval of a function f is shown. This function maps the candidate solutions
on the x - axis, to the result of the objective function on the y - axis. In general,
this fitness landscape shows the one - dimensional parameter space versus the one
- dimensional fitness value. In addition, there is the presence of a local maximum,
the maximum if we restrict the domain of candidate solutions, and a separate global
maximum. Many variants of the PSO algorithm exist to find such local maximum;
the PSO described here, is designed to find the global maximum[12].

2.1

Particle Swarm

PSO searches through the fitness landscape by having particles known as agents fly,
while attempting to find the optimal value. Each particle is randomly instantiated,
and evaluated at each stage by the objective function. Thus, the particles represent
candidate solutions. As previously stated, the PSO algorithm runs within a “black box”, and so all iterative refinements are based on the particles, with no awareness of
the presence of abnormalities in the objective function[23].
As shown above (figure 1), particles are created as candidate solutions on the
fitness landscape. Each particle (xi ) is aware of its position (ri ), velocity (vi ), and
the best position it has previously reached. Its position is comprised of both the
candidate solution and its related fitness. The best position it previously reached is
comprised of its individual best candidate and its individual best fitness. Similarly,
the swarm as a single entity maintains its global best comprised of its global best
candidate and its global best fitness[23].
The PSO algorithm itself functions quite similarly to a parallel iterative refinement
method. It repeats three steps until its stopping condition (e.g. E ≤ .01).
1. Evaluate current finesses
2. Update individual (and global) best positions
3. Update velocity and position for all agents
3

Steps one and two have been covered above, with fitness being evaluated by evaluating
the objective function with the candidate solution as an argument. Similarly, best
fitness positions are updates by comparing the current best with the current evaluation
for all individual particles and the swarm. However, these steps are identical to those
of a complete search of the entire fitness landscape. The third step gives particles a
position and velocity based on the swarm’s intelligence[23].
The velocity update formula can be subdivided into three independent parts. First,
the formula for the velocity at time t + 1 must take the previous velocity (at time t)
into account. However, this velocity is subject to change due to the particle’s natural
inertia. So, the first component of the formula is wvi (t), where w is a user supplied
coefficient (generally .8 < w < 1.2). This inertial component forces the particle to
continue travelling in the direction that it previously was. The exact value of w allows
the particle to experience acceleration or deceleration. Acceleration makes the swarm
more likely to search a larger position of the fitness landscape, while deceleration
usually makes the stopping condition be met sooner[23].
The second term allows the particle to remember which areas of the fitness landscape have given more fruitful results. This cognitive component, c1 r1 [xbi (t) − xi (t)],
is comprised of the cognitive coefficient c1 (generally c1 ≈ 2) and is related to the
particle’s affinity to move towards its individual best position (xbi ). The third term,
the social component takes the same form as the cognitive component, replacing the
individual best position xbi with the global best position,g(t), and the cognitive coefficient with a social coefficient (c2 ≈ c1 ). The resulting term, c2 r2 [g(t) − xi (t)],,
is related to the particle’s affinity to move towards the current global best position.
Both terms represent the magnitude of the step that should be taken in a particular
direction[23].
The values c1 and c2 represent random coefficients in the cognitive and social
components. These provide a stochastic nature to the velocity which makes particles
move in a pseudo - random way that is constrained by the previous best solutions
(individual and global)[23].
A velocity clamp way be applied to prevent any particles from leaving the desired
search space. For a search space bounded by [−rmax , rmax ], the velocity clamp can
min
min
, k rmax −r
], where k is a user - supplied parameter
be represented as [−k rmax −r
2
2
around[5].
The position of a particle is given in terms of its previous position and the velocity
by:

2.2

xi (t + 1) = xi (t) + vi (t + 1)

(3)

vi (t + 1) = wvi (t) + c1 r1 [xbi (t) − xi (t)] + +c2 r2 [g(t) − xi (t)]

(4)

Variations

As previously stated, this process is repeated indefinitely till a stopping condition is
met. Differences in the stopping condition has led to some variation among the various
implementations of the PSO. Other modifications include the inertial weight, which
was not included in the velocity update, but has since become a standard component
of the PSO. Other variations divide the swarm into separate populations, include an
evolutionary ranking component, and stretching the objective function[5].

4

3

Behaviour of Sparkling Squid

3.1

Behaviour of Sparkling Squid

Watasenia scintillans, or the sparkling squid is a small squid that lives around 1,200
feet deep in the Western Pacific Ocean. The sparkling squid is one of the brightest of
all the bioluminescent creatures of the sea. Every year during summer, Japan’s shores
are greeted to the amazing sight of the water glowing blue as millions of sparkling
squid mate. Each squid has photophores across its body to attract other members of
its species, and photophores on its tentacles and eyes to attract prey. It is also able
to use its photophores across its body for counter - illumination in an impressive form
of camouflage.
The exact behavior and patterns of illumination of the sparkling squid remain
unknown. In order to create a useful model that uses squid behavior, the ambiguity
of the behavior of real squid has to be removed. To do so, we have divided the
squid population into two sub - populations, a primary population and a secondary
population. The primary population primarily moves on mutual attraction, while the
secondary pursues unseen prey in a herd. The primary population operates on two
basic assumptions:
1. All squid are genderless; a less attractive squid will move toward a more attractive squid. The most attractive squid will move randomly.
2. The attractiveness of a squid is based on its brightness. The brightness of a
squid is derived from its location on the fitness landscape.
Similarly, the secondary population is modeled by two simple assumptions:
1. The secondary population pursues unseen prey. The prey are more heavily
populated in more fit areas of the fitness landscape.
2. Each individual squid seeks to improve its location by following the leader, and
two random neighbors. Communication between members of the swarm may
be imperfect.
Using these characteristics, we have developed a stricter set of rules to model
the sparkling squid population. We then use those rules to formulate an algorithmic
procedure.

3.2

Light Intensity

We known that light intensity follows an inverse - square law with distance. Impurities
in the water (and the water itself) cause the intensity of the light to decrease with
distance. As stated previously, the brightness of the squid can be derived from the
squid’s location on the fitness landscape.
Under our model for the squid’s behavior, only two factors have to be accounted
for, the relation between attractiveness and intensity, and the change in light intensity
as a function of distance. The second one of these two problems is much easier to
solve as it requires a purely physical answer.
We say that the distance between squid i and j is rij , and model the intensity
in two parts. Firstly, we use an inverse - square law to represent the change in
intensity with distance: I(r) ∝ r12 . The second part is the absorption of light in
ij

5

imperfect conditions, like the presence of water, impurities and murkiness. Assuming
an absorption coefficient of γ, gives I(r) ∝ e−γrij . These two models can be combined,
assuming an original light intensity of I0 .

I (r) =

I0
1 + γr2

(5)

This model also removes the singularity at rij = 0. we chose to use a rational
approximation over the Gaussian model to expedite computation. Finally, as the
intensity of light decreases asymptotically, it is no longer noticeable by the squid. We
use a piecewise function to make a fixed distinction between little light and no light.
 I0
:x≤`
1+γr 2
I(r) =
0
:x>`
The length scale ` is proportional to our choice of γ. Algorithmically, this separation
speeds up the computation by ignoring extremely unfit solutions. While fine - tuning
the length scale leads to better results, we use ` = γ1 .

4
4.1

Sparkling Squid Heuristics
Primary and Secondary Swarms

The squid population is modeled in two parts, a primary population and a secondary
population. The primary population is more fit, and therefore more attractive. These
are the squid that are able to significantly influence the movement of other squid. The
less - fit squid would be pushed and pulled around, without significantly influencing
the movement of other squid. Therefore, we create a secondary squid population
with those squid. The population division is dynamic, and is updated after every
generation.
We form the populations by ordering all squid xi (t) by −f (xi ). Then, the
primary population is {x0 (t) , · · · , x n2 (t)}. Similarly, the secondary population is
{x1+ n2 (t) , · · · , xn (t)}.By dividing the populations in this way, we allow the primary
swarm to function as a scout, explore the fitness landscape, while the secondary swarm
provides leverage against local extrema, randomness and other abnormalities. It also
reduces the runtime by a constant - factor of 14 .
It is also worth noting that squid change population constantly. The least - fit
squid in the primary swarm will most likely play the role of the leader in the secondary
swarm, while the leader of the secondary swarm will be toyed with in the primary
swarm. This communication allows the two separate swarms to function as a single
unit. On a parallel machine, the population may be further subdivided to trade
accuracy for speed.

4.2

Attraction and Randomness

We have chosen to make β (x) ∝ I(x), and I (x) ∝ f (x). This means that for a
given position vector x, I0 ∝ f (x). By stacking all of our constants into β0 gives an
attraction of:

6

β0 f (x)
1 + γr2

β (r, x) =

(6)

Algorithmically, we remove the position vector x in favor of a pointer to the i-th
squid. The attractiveness of squid i is β0 gives an attraction of:

βi (r) =

βi0
1 + γr2

(7)

Theoretically, γ can hold any value that suits the test problem; we choose assign a
standardized value to γ that depends on l, the average size of the search space in each
dimension and β0 , the average attractiveness at rij = 0.

γ=

1
g 2 (1 + ln (β0 ) )

(8)

Each squid is modeled a random d-dimensional position vector. Based on the
fitness of the function, the squid has a derived attractiveness from its position. The
primary squid population then evolves without interference. However, the population
is prone to finding local optima and getting stuck at nonoptimal locations. Therefore,
we have included a random factor movement factor. The most attractive squid’s
movement are entirely governed by this factor. The random update term is based on
a the simple idea of randomly moving the squid in either direction up to .5 units in
every dimension. This is represented as:



1
rand = α F (0, 1) −
2


, α ∈ [0, 1]

(9)

As solution quality improves, the random effects should decrease. This is accomplished
by a randomness - reduction factor, δ.

random (t) = αδ

t



1
F (0, 1) −
2


, α ∈ [0, 1] , δ ∈ (0, 1]

(10)

The lower the value of δ, the faster the reduction, while a value of δ = 1 represents no
reduction. The random value is generated according to the F , the arcsine distribution.

4.3

Predator - Prey Swarms

The secondary generation is far less individualized. Each squid looks toward the best
squid, and two of its randomly chosen colleagues to choose a new position to move
to. Its own position is only considered if the current squid is in the best position.
Computationally, squid that are updated earlier are also considered in the update of
later squid. At every stage, two distinct random squid (xr 1 and xr 2 ) are chosen. The
next generation population is then created as:
7

xi = xbest(t) + F (xr1 − xr2 )

(11)

F , is a mutation factor in the range F ∈ [0, 2]. We can also add a requirement for the
new position of the squid to be better than the previous one for it to move. It is worth
noting by centering the new swarm around the previous best, a non - zero number of
squid are expected to switch swarms. This helps lagging squid in the primary swarm
escape local optima, and squid in the secondary swarm explore more parts of the
fitness landscape.

4.4

Sparkling Squid Algorithms

Based on our assumptions and model, we can now outline the basic sparkling squid
algorithm. Note that in implementation, distances (rij ) can be calculated using any
metric in d - dimensions. We choose to use the `2 Norm, or Euclidean Norm. It
might also be interesting to use other norms, such as the Frobenius Norm, or Hilbert
- Schmidt Norm in certain applications.
Algorithm 1 Approximate XG
Require: Initial solution to a d - dimensional problem: Xi
Create initial squid population: X
Evaluate fitness of squid population: f (X)
XG ← max(f (X))
for t ← 1 to max do
Sort X by −f (X)
S1 ← X0 , . . . , X n2

S2 ← X1+ n2 , . . . , Xn
for i ← 0 to n2 do
for j ← 0 to n2 do
if f (Xi ) > f (Xj ) then
Calculate distance and attraction
Update position and position - based values
end if
end for
end for
for i ← 1 + n2 to n do
Update position Xi
end for
XG ← Current best solution
t←t+1
end for

5
5.1

Multimodal Optimization
Benchmark Validation

We have used a set of 3 standard functions for the purpose of validation [11, 21, 29,
30]. Beale’s function, Easom’s fucntion and Michalewicz’s function are all standard
8

functions for the purpose of validating and comparing new algorithms. The Beale
function

f (x) = (1.5 − x1 + x1 x2 )2 + (2.25 − x3 + x1 x22 )2 + (2.625 − x1 + x1 x32 )2 , −4.5 ≤ xi ≤ 4.5
(12)
has f (x∗ ) = 0 at x∗ = (3, 0.5).

Credit: Videh

Seksaria

Figure 1: Beale’s Function, with squid paths in blue
Easom’s function

g(x) = − cos(x1 ) cos(x2 ) exp(−(x1 − π)2 − (x2 − π)2 ), −100 ≤ xi ≤ 1000
∗

∗

has g(x ) = −1 at x = (π, π).

Credit: Videh

Seksaria

Figure 2: Easom’s Function, with squid paths in blue
Finally, Michalewicz’s function
9

(13)

−

d
X
i=1

2m

sin(xi ) sin



ix2i
π


, m = 10, 0 ≤ xi ≤ π

(14)

for n = 10 has h(x∗ ) = −9.66015. In all three cases, the SSA found the global
minimum to within  ≤ 1 ∗ 10− 5 within 90 seconds. This was true in over 10, 000
trials.
In the case of the Beale function, the SSA was able to escape the four sharp peaks
around the corners within (approx.) 500 evaluations, and the the valley ridges within
(approx.) 1, 750 evaluations. When tested with the Easom function, the SSA spent
(approx.) 750 evaluations in various ridges, before finding the global minima in (approx.) 2, 000 evaluations. Finally, on the Michaelwicz function, the SSA spent (approx.) 1, 000 evaluations going between the various local minima, and hill climbing.
Finally, after (approx.) 3, 500 evaluations it found the global minima.
Across all 3 benchmark functions, the SSA was able to find the global minima in time
comparable to the PSA and GA. Given additional evaluations, the solution quality
increases negligibly.

5.2

Comparative Results with Particle Swarm and Genetic Algorithms

We have chosen a set of eight common benchmark function to evaluate the performance of SSA against other common evolutionary algorithms[11, 21, 29, 30]. Due
to the existence of countless modifications and improvements to the particle swarm
and genetic algorithms, we have implemented them in their original forms. For PSO,
we use the standard implementation of Kennedy and Eberhart, with α = 2, and a
constant inertial term of I = 1.For GA, we ignore the effects of elitism, use a mutation
probability pm = 0.05 and a crossover probability of 0.95[19, 26, 27, 33, 34, 35].
There are many valid ways of running such a comparision test; we have opted to
run each algorithm 10, 000 times per function and report and best, worst, mean and
standard deviation of the global minima reported. In the interest of fairness, each
algorithm was given 1.50 seconds to run. In addition, comparable population sizes,
etc. were used across all three algorithms. Previous analysis of the SSA, PSO and GA
were used to define optimal parameters under the testing conditions[25, 32, 37, 38, 39].
Simulations were completed using MATLAB, with the code for PSO and GA taken
directly from their source paper. All tests were completed on an Intel i7-2670QM with
2.2GHz per each of 4 cores. Tests were completed with constant minimal background
and system processes. The data is presented in tables following a brief description of
the trial function, followed by results.
The objective function for the first test problem is the Ackley Function. This problem
is given as:

v

u n
u1 X
x2  − exp
f (x) = −20 exp −0.2t
n i=1 i


n

1X
cos (2πxi )
n i=1

!
+ 20 + e

(15)

It has f (x∗ ) = 0 at x∗ = (0, · · · , 0). All three algorithms were able to circumvent
the numerous local minima in Ackley’s function, and find the valley containing the
10

Table 1: Comparison among PSO, GA and SSA on Ackley’s Function(d = 128)
Metric
Best
Worst
Mean
Std. Dev.
Rank

PSO
8.99e-08
7.99e-06
3.31e-07
5.81e-07
2

GA
6.76e-07
8.17e-07
4.66e-06
2.41e-06
3

SSA
4.52e-08
1.62e-07
9.10e-08
4.31e-08
1

global minima. The reported minima from each algorithm depends on how quickly
the algorithms could run. There is a negligible difference between the PSO and SSA,
with the GA as a close third.
For the second test problem, we used the Goldstein - Price Function. It is a function
of two - variables, with several local minima and a large fitness landscape. It is defined
as


2
f (x) = 1 + (x1 + x2 + 1) 19 − 14x2 + 3x21 − 14x2 + 6x1 x2 + 3x22


2
(30 + 2x1 − 3x2 ) 18 − 32x1 + 12x21 + 48x2 − 36x1 x2 + 27x22 − 3

(16)

It has f (x∗ ) = 0 at x∗ = (0, 1).
Table 2: Comparison among PSO, GA and SSA on Goldstein and Price’s Function
Metric
Best
Worst
Mean
Std. Dev.
Rank

Credit: Videh

PSO
6.21e-08
8.92e-07
5.38e-07
3.07e-07
2

GA
2.89e-07
4.09e-06
2.52e-06
1.31e-06
3

Seksaria

11

SSA
2.71e-08
8.12e-08
5.12e-08
1.62e-8
1

Figure 3: Beale’s Function, with squid paths in blue
Like with Ackley’s Function, the SSA and PSO came in first and second place respectively, with the GA in third. This was expected due to the similarity between the two
functions. As above, all three algorithms located the valley and correct ridge with
the global minima. The output value depended on the efficiency of the algorithm,
The objective function for the third test problem is the Griewank Function. This
problem is given as:

 
n
n
1 X 2 Y
xi
xi −
f (x) = 1 +
cos √
4000 i=1
i
i=1

(17)

It has f (x∗ ) = 0 at x∗ = (0, · · · , 0).
Table 3: Comparison among PSO, GA and SSA on Griewank’s Function
Metric
Best
Worst
Mean
Std. Dev.
Rank

PSO
5.92E-07
7.99E-06
2.56E-06
2.98E-07
3

GA
1.51E-08
8.85E-07
3.20E-07
1.31e-06
2

SSA
3.59E-08
9.10E-08
6.18E-08
1.93E-08
1

Once again, all three algorithms were able to find the valley with the global minima,
but PSO got stuck on local ridges in most trials. The GA and SSA algorithms
performed very similarly, due to their ability to escape such footholds and find the
global minima. The difference between the GA and SSA in minuscule, while the PSO
lags behind in third.
The objective function for the third test problem is the Levy Function. This problem
is given as:

f (x) = sin2



πx1 + 3π
4


+

2 

 
2 


d−1 
X
x1 − 1
πx1 + 7π
xd − 1
2πxd + 6π
1 + 10 sin2
+
1 + sin2
4
4
4
4
i=1
(18)
It has f (x∗ ) = 0 at x∗ = (1, · · · , 1). Levy’s Function had some of the closest results in
all of out tests. The jagged landscape of the Levy Funciton proved to be no challenge
for any of our three algorithms. All were able to find the foxhole with the global
minima and reached quite close to the numerical minima.
For the fith test, we chose the popular Rastrigin Function. This problem is given as:

f (x) = 10n +

n
X


x2i − 10 cos (2πxi )

i=1

12

(19)

Table 4: Comparison among PSO, GA and SSA on Levy’s Function(d=16)
Metric
Best
Worst
Mean
Std. Dev.
Rank

PSO
3.06E-08
9.52E-08
6.56E-08
2.61E-08
2

GA
2.16E-08
9.76E-07
5.48E-07
3.67E-07
3

SSA
3.03E-08
9.51E-08
5.83E-08
1.93E-08
1

Table 5: Comparison among PSO, GA and SSA on Rastrigin’s Function)
Metric
Best
Worst
Mean
Std. Dev.
Rank

PSO
4.78E-13
1.04E-08
1.68E-09
3.12E-09
1

GA
1.57E-07
3.86E-06
1.01E-06
1.43E-06
3

SSA
2.18E-08
1.39E-07
8.59E-08
3.67E-08
2

It has f (x∗ ) = 0 at x∗ = (0, · · · , 0).

Credit: Videh

Seksaria

Figure 4: Beale’s Function, with squid paths in blue
The Rastrigin Function is one of two test cases where the PSO shined. Here, PSO
came in a clear first place followed by the SSA and GA in a distant second and third
place. The PSO was able to find the ridge with the global minima consistently, while
the SSA spent most of its time in near - by local minima. Similarly, the GA went
from local minima to local minima, never even reaching the correct ridge.
For the sixth test, we chose the popular Rosenbrock Function. Aptly known as Rosenbrock’s Valley, this test function features a narrow, parabolic valley. This problem is
given by:

13

f (x) =

n−1
X

100 x2i − xi+1

2

2

+ (1 − xi )



(20)

i=1

It has f (x∗ ) = 0 at x∗ = (1, · · · , 1) The Rosenbrock Function was our only test case
Table 6: Comparison among PSO, GA and SSA on Rosenbrock’s Function(d=128)
Metric
Best
Worst
Mean
Std. Dev.
Rank

PSO
7.94E-07
1.06E-05
3.72E-06
3.49E-06
3

GA
3.00E-08
9.00E-08
8.61E-08
2.45E-08
2

SSA
4.66E-08
1.60E-07
7.77E-08
3.25E-08
1

where the GA did not come in third place. The SSA came in first by an extremely
small margin, while the GA defeated the PSO by a large margin. All three algorithms
were able to find the Rosenbrock valley, but the PSO frequently got stuck in an
nonoptimal area of the valley. The results of the GA and SSA, with the SSA coming
ahead by exploring a larger amount of the valley. This also resulted a worse worst
output compared to the GA.
For the seventh test, we chose the Shekel Function. The Shekel Function, is often
known as the foxhole function because of its minima appearing like foxholes on the
fitness landscape. It is defined in terms of a vector β and a matrix C.

f (x) = −

d
X
i=1

β
4.0 1.0
 4.0 1.0
C=
 4.0 1.0
4.0 1.0



−1
4
X
2

(xj − Cji ) + βi 

(21)

j=1

1
= 10
(1, 2, 2, 4, 4, 6, 3, 7, 5, 5)T
8.0 6.0 3.0 2.0 5.0 8.0 6.0 7.0
8.0 6.0 7.0 9.0 3.0 1.0 2.0 3.0
8.0 6.0 3.0 2.0 5.0 8.0 6.0 7.0
8.0 6.0 7.0 9.0 3.0 1.0 2.0 3.0






It has f (x∗ ) = 0 at x∗ = (4, 4, 4, 4). We normalized the Shekel function so that
the global minimum is f (x∗ ) = 0, instead of f (x∗ ) ≈ −10.5364 The results for the
Table 7: Comparison among PSO, GA and SSA on Shekel’s (Foxhole) Function(d=10)
Metric
Best
Worst
Mean
Std. Dev.
Rank

PSO
2.00E-07
2.00E-07
2.00E-07
0.00E+0
2

GA
3.52E-08
8.63E-07
2.22E-07
2.43E-07
3

14

SSA
5.66E-08
2.81E-07
1.38E-07
1.01E-07
1

Shekel Funciton are especially interesting. The PSO show no variation in all 10, 000
trails runs. This is due to it always taking an identical path around the idential set
of foxholes, and finally reaching (and stopping) in a particular ridge near the global
minima. Even so, the PSO came in second place, compared to the SSA in first and
GA in third. All three algorithms located the correct foxhole, and their precision
depended on efficiency.
Finally, we also used DeJong’s First Function. Usually called the Sphere Function,
it is continuous, convex, unimodal d−dimensional hypersphere, with f (x∗ ) = 0 at
x∗ = (0, · · · , 0).

f (x) =

n
X

x2i

(22)

i=1

It has f (x∗ ) = 0 at x∗ = (0, · · · , 0) On the Sphere Function, all three algorithms
Table 8: Comparison among PSO, GA and SSA on De Jong’s First Function
(Sphere)(d=32)
Metric
Best
Worst
Mean
Std. Dev.
Rank

PSO
4.08E-14
3.85E-10
4.02E-11
1.15E-10
1

GA
2.89E-08
8.57E-07
1.60E-07
2.47E-07
3

SSA
3.49E-08
1.90E-07
6.65E-08
4.53E-08
2

quickly located the global minima. Even at worst, they were able to report a precision
of 1E −7. The PSO reported an amazingly accurate 1E −11 on average in the allotted
time, with the SSA and GA close behind. The Sphere Function showed the PSO’s
power in minimizing simple functions like the Sphere Function.
Finally, we have reported a summary of the results of the above tables. In calculating
the success rate, we used a tolerance of 5E − 7, assuming a normal distribution on
the mean and standard deviation. After all 8 tests,
Table 9: Comparison among PSO, GA and SSA
Average
Final
Success Rate

6

PSO
2.00
2
93.88%

GA
2.75
3
94.05%

SSA
1.25
1
100%

Conclusions

We have taken the model of the behavior of the sparkling squid and successfully
formulated a new Sparkling Squid Algorithm (SSA) from it. From initial testing and
benchmark evaluations, we have seen that it is a powerful and promising algorithm.
More specifically, we found that the SSA is able to outperform both PSO and GA
15

at optimizing various functions. This makes it probable that the SSA will be useful
in solving NP - hard problems, a topic for further investigation. In addition, looking
at the convergence behaviour of the SSA shows that it is able to escape from local
optima quite well.
Although quite efficient the SSA is not specifically tailored to any problem. One possible modification would be the addition of an adaptive control parameter. Secondly,
various methods of providing direction to the squid could improve overall performance. More simply, fine - tuning of the various parameters (α, etc.) can improve
overall performance. It might also be interesting to apply the SSA to various NP Hard problems, such as the Traveling Salesman Problem. Lastly, the combination of
the SSA with existing optimization paradigms such as the PSO and GA may prove
fruitful.

References
[1] A. Colorni, M. D. and Maniezzo, V. (1991) Distributed optimization by ant
colonies. Proceedings of the First European Conference on Artificial Life.
[2] Akay, B. and Karaboga, D. (2010) A modified artificial bee colony algorithm for
real - parameter optimization. Information Sciences.
[3] Alatas, B. (2010) Chaotic bee colony algorithms for global numerical optimization. Expert Systems and Applications.
[4] B. Jia, Q. P. Y. W., J. Li and Xie, S. A hybrid particle swarm optimization and
tabu search algorithm for flexible job - shop scheduling problem. International
Journal of Computer Theory and Engineering.
[5] Bergh, F. (2001) An Analysis of Particle Swarm Optimizers. Ph.D. thesis, University of Pretoria.
[6] Blackwell, T. and Bratton, D. (2008) A simplified recombinant pso. Journal of
Artificial Evolution and Applications.
[7] C.D. Gelatt Jr, S. K. and Vecchi, M. (1983) Optimization by simulated annealing.
Science 220 .
[8] Clerc, M. (2006) Particle swarm optimization. International Scientific and Technical Encyclopedia.
[9] C.R. Houck, J. J. and Kay, M. A Genetic Algorithm for Function Optimization:
A Matlab Implementation. North Carolina University.
[10] DiCaro, G. and Dorigo, M. (1999) Ant algorithms for discrete optimization. Master’s thesis, UniversitÃ c libre de Bruxelles.
[11] Dixon, L. C. W. and Szego, G. P. (1978) Towards Global Optimisation 2 . North
- Holland.
[12] E. Bonabeau, M. D. and Theraulaz, G. (1999) Swarm Intelligence: From Natural
to Artificial Systems. Oxford University Press.
[13] Eberhart, R. and Shi, Y. (1998) Parameter selection in particle swarm optimization. Proceedings of Evolutionary Programming VII .
16

[14] Eberhart, R. and Shi, Y. (2000) Comparing inertia weights and constriction factors in particle swarm optimization. Proceedings of the Congress on Evolutionary
Computation.
[15] Eiben, A. and Smith, J. (2003) Introduction to Evolutionary Computing.
Springer.
[16] ?ernÃ 21 , V. (1985) Thermodynamical approach to the traveling salesman problem: An efficient simulation algorithm. Journal of Optimization Theory and Applications.
[17] Ghamdi, F. A. and Mansour, R. (2012) Comparison between artificial immune
system and other heuristic algorithms for protein structure prediction. American
Journal of Bioinformatics Research.
[18] Ghose, D. and Krishnanand, K. (2006) Glowworm swarm based optimization
algorithm for multimodal functions with collective robotics applications. Multiagent and Grid Systems.
[19] Goldberg, D. (1989) Genetic Algorithms in Search, Optimization and Machine
Learning. Addison-Wesley.
[20] J. Kennedy, R. E. and Shi, Y. (2001) Swarm Intelligence. Morgan Kaugmann.
[21] J.J. MorÃ c , B. G. and Hillstrom, K. (1981) Testing unconstrained optimization
software. ACM Transactions on Mathematical Software.
[22] K. Huang, Z. O. Y. W., J. Liu and Zhou, W. (2011) A glowworm swarm optimization algorithm based on definite updating search domains. Journal of Computational Information Systems.
[23] Kennedy, J. and Eberhart, R. (1995) Particle swarm optimization. Proceedings
of the IEEE International Conference on Neural Networks.
[24] L. Ashby, L. H. and Yampolskiy, R. (2012) Wisdom of artificial crowds - a metaheuristic algorithm for optimization. Journal of Intelligent Learning Systems and
Applications.
[25] M. Marinaki, Y. M. and Zopoundis, C. (2010) Honey bee mating optimization
algorithm for financial classification problems. Applied Soft Computing.
[26] M. Meissner, M. S. and Schneider, G. (2006) Optimized particle swarm optimization (opso) and its application to artificial neural network training. BMC
Bioinformatics.
[27] MÃ 41 hlenbein, H. Evolution in Time and Space The Parallel Genetic Algorithm.
[28] Mitchell, M. (1996) An Introduction to Genetic Algorithms. MIT Press.
[29] Molga, M. and Diliman, U. (2005), Test functions for optimization needs. Website.
[30] Molga, M. and Smutnicki, C. (2005) Test functions for optimization needs.

17

[31] S. Cho, S. D. and Roy, R. (2012) A novel particle swarm optimization algorithm
for multi - objective combinatorial optimization problem. International Journal
of Applied Metaheuristic Computing.
[32] Shah-Hosseini, H. (2009) The intelligent water drops algorithm: a nature - inspired swarm - based optimization algorithm. International Journal of Bio Inspired Computation.
[33] Shi, Y. and Eberhart, R. (1998) A modified particle swarm optimizer. Proceedings
of the IEEE International Conference on Evolutionary Computing.
[34] Vose, M. (1999) The Simple Genetic Algorithm: Foundations and Theory. MIT
Press.
[35] Whitley, D. (1994) A genetic algorithm tutorial. Statistics and Computing.
[36] Wu, L. and Zhang, Y. (2012) A novel method for rigid image registration based
on firefly algorithm. International Journal of Research in Soft and Intelligent
Computing.
[37] Yang, X. (2009) Firefly algorithms for multimodal optimization. Stochastic Algorithms: Foundations and Applications.
[38] Yang, X. (2010) Firefly algorithm, stochastic test functions and design optimisation. International Journal Bio - Inspired Computation 2 .
[39] Yang, X. (2013) Bat algorithm: literature review and applications. International
Journal of Bio - Inspired Computing.

18

