2. Cats Behaviors :
Cats spending most of their time in resting, cats have high
alertness and curiosity about their surroundings and moving
objects in their environment.
Thus, you can simply find that the cats usually looks lazy,
lying somewhere, but opening their eyes hugely looking
around. On that moment, they are observing the environment.
They seem to be lazy, but actually they are smart and
deliberate.
This behavior helps cats in finding preys and hunting them
down.
Compared to the time dedicated to their resting, they spend
too little time on chasing preys to conserve their energy.
Inspired by this hunting pattern, Chu and Tsai (2007)
developed CSO with two modes: “seeking mode” for when cats
are resting and “tracing mode” for when they are chasing
their prey.
The Solution Set in the Model -- Cat
No matter what kind of optimization
algorithm, the solution set must be
represented via some way. For
example, GA uses chromosome to
represent the solution set; ACO uses
ant as the agent, and the paths made
by the ants depict the solution sets;
PSO uses the positions of particles to
delineate the solution sets. In our
proposed algorithm, we use cats and
the model of behaviors of cats to solve
the optimization problems, i.e. we use
cats to portray the solution sets.
In CSO, we first decide how many
cats we would like to use, then we
apply the cats into CSO to solve the
problems.
3. Cat swarm optimization (CSO)
In CSO, we first decide how many cats we would like to use, then we apply the cats
into CSO to solve the problems.
Every cat represents a solution set, which has its own position composed of M-
dimensions, velocities for each dimension, a fitness value, which depicts how well the
solution set(cat) is, and a flag to identify whether the cat is in seeking mode or
tracing mode.
Thus, we should first specify how many cats should be engaged in the iteration and run
them through the algorithm. The best cat in each iteration is saved into memory, and
the one at the final iteration will represent the final solution.
In CSO, a population of cats are created and randomly distributed in the M-
dimensional solution space.
This population is divided into two subgroups. The cats in the first sub- group are
resting and keeping an eye on their surroundings (i.e., seeking mode), while the cats in
the second subgroup start moving around and chasing their preys (i.e., tracing mode).
Since the cats spend too little time in the tracing mode, the number of the cats in the
tracing subgroup should be small. This number is defined by using the mixture ratio
(MR) which has a small value.
4. Seeking mode :
Cat swarm
optimization (CSO)
This sub-model is used to model the situation of the cat,
which is resting, looking around and seeking the next
position to move to.
In seeking mode, we define four essential factors:
seeking memory pool (SMP),
seeking range of the selected dimension (SRD),
counts of dimension to change (CDC),
and self-position considering (SPC).
5. How the seeking mode works can be described in 5 steps as follows:
1. Make j copies of the present position of catk, where j = SMP. If the value of
SPC is true, let j = (SMP-1), then retain the present position as one of the
candidates.
2. For each copy, according to CDC calculate a new position by using Eq. (2.1)
(Majumder and Eldho 2016)
in which
𝑋𝑐 current position; 𝑋𝑐𝑛 new position; and
R a random number, which varies between 0 and 1.
3. Calculate the fitness values (FS) of all new positions.
4. If all FS are not exactly equal, calculate the selecting probability of each
candidate point by equation (2.2), otherwise set all the selecting probability of
each candidate point be 1.
5. Based on probability, select one of the candidate points to be the next position
for the cat where candidate points with higher FS have more chance to be
selected, and replace the position of cat.
Seeking mode working :
Cat swarm
optimization (CSO)
𝑋𝑐𝑛 = 1 ± 𝑆𝑅𝐷 × 𝑅 × 𝑋𝑐 (2.1)
6. Tracing mode working :
Cat swarm
optimization (CSO)
where
𝑃𝑖 probability of current candidate cati; 𝐹𝑆𝑖 fitness value of the cati;
𝐹𝑆𝑚𝑎𝑥 maximum value of fitness function; 𝐹𝑆𝑚𝑖𝑛 minimum value of fitness function; and
𝐹𝑆𝑏 = 𝐹𝑆𝑚𝑎𝑥 for minimization problems and 𝐹𝑆𝑏 = 𝐹𝑆𝑚𝑖𝑛 for maximization problems.
The tracing mode simulates the cat chasing a prey. After finding a prey while resting
(seeking mode), the cat decides its movement speed and direction based on the
prey’s position and speed. In CSO, the velocity of cat k in dimension
d is given by
𝑃𝑖 =
𝐹𝑆𝑖 −𝐹𝑆𝑏
𝐹𝑆𝑚𝑎𝑥 −𝐹𝑆𝑚𝑖𝑛
, 𝑤ℎ𝑒𝑟𝑒 0 < 𝑖 < 𝑗 (2.2)
𝑉𝑘,𝑑 = 𝑉𝑘,𝑑 + 𝑟1 × 𝑐1 𝑋𝑏𝑒𝑠𝑡,𝑑 − 𝑋𝑘,𝑑 (2.3)
7. Tracing mode working :
Cat swarm
optimization (CSO)
In which
𝑉𝑘,𝑑 velocity of cat k in dimension d;
𝑋𝑏𝑒𝑠𝑡,𝑑 position of the cat with the best solution;
𝑋𝑘,𝑑 position of the catk; 𝑐1 a constant; 𝑟1 a random value in the range of [0,1].
Using this velocity, the cat moves in the M-dimensional decision space and reports
every new position it takes. If the velocity of the cat is greater than the maximum
velocity, its velocity is set to the maximum velocity. The new position of each cat is
calculated by
in which
𝑋𝑘,𝑑,𝑛𝑒𝑤 new position of cat k in dimension d; and 𝑋𝑘,𝑑,𝑜𝑙𝑑 current position of
cat k in dimension d.
𝑋𝑘,𝑑,𝑛𝑒𝑤 = 𝑋𝑘,𝑑,𝑜𝑙𝑑 + 𝑉𝑘,𝑑 (2.4)
8. The termination criterion
determines when the algorithm is
terminated. Selecting a good
termination criterion has an
important role to ensure a correct
convergence of the algorithm. The
number of iterations, the amount
of improvement, and the running
time are common termination
criteria for the CSO.
Termination Criteria :
Cat swarm
optimization (CSO)
Pseudo Code of the CSO Algorithm