*3.3. Imperialist Competitive Algorithm*

The imperialist competitive algorithm (ICA) is a novel evolutionary algorithm based on human social evolution, developed by Atashpaz-Gargari and Lucas [57]. The ICA belongs to the group of swarm intelligence, which provides a powerful algorithm for solving NP-hard problems through its capability of dealing with continuous optimization. In this algorithm, the primary population is composed of several countries, and they interact with each other to form empires. Assuming the value of the objective function, colonialist and colonial groups are formed based on the existing countries. After ascertaining a colonialist, other countries are randomly allocated to one of the colonizers [57,58]. Every colonialist and its associated colony is called an empire. The algorithm then simulates the competition among imperialists in order to acquire more colonies. The best colonialist typically has more chance to occupy more colonies.

Another way of allocating the colonies to each colonialist is based on their normalized cost, which is calculated via Equation (11):

$$N.T.C\_n = \max\_i \{ T.c\_i \} - T.c\_{n\prime} \tag{11}$$

where *T*.*cn* is the empire's total cost n, and *N*.*T*.*Cn* is the total normalized cost value of that empire. Possession eventuality of the colonization competition by each empire is calculated by Equation (12):

$$P\_{p\_n} = \left| \frac{N.T.\mathcal{C}\_n}{\sum\_{i=1}^{N\_{imp}} N.T.\mathcal{C}\_i} \right| \tag{12}$$

The next phase is to attempt to approach a colonial country to analyze the colonies' cultural and social structures in different political and social layers. The colonies then move to the colonialist country. The colonialist and colony will change their positions; the new colonialist position will continue with the algorithm. The new colonialist country will start applying adjustment to its colonies this time. To calculate the cost function, the total empire cost is given by Equation (13) as follows:

$$T.c\_{\mathfrak{n}} = f(imp) + \mathfrak{s} mean(f(colony))\tag{13}$$

where *f*(*imp*) is the value of the cost function for the colonialist, *f*(*colony*) represents the mean values of the cost function for the colonies, and the constant ᥑis considered a value between 0 and 1.

Finally, the cost of each empire is calculated, and the colonies of weak empires are abolished and join to stronger empires. This process of recruitment or competition between colonialists is continued. In the next stage, empires that have lost all their colonies will be eliminated and will join other colonies. The process is repeated until a single universal empire in the globe is built that is very close to the empire with colonial nations [59].

#### *3.4. Grey Wolf Optimization*

The novel grey wolf optimization (GWO) algorithm, presented by Mirjalili et al. [60], is an inspiration from the hunting behavior of grey wolves and the social hierarchy in nature. Wolves are social animals that live in packs, and they have a hierarchy consisting of four groups. The leader of each group, the alpha wolf (α), makes decisions about hunting, sleeping, and walking time, and all the other group members must follow its directives. In terms of hierarchy, the other wolves fall into three levels, called beta (β), delta (δ), and omega (ω). The beta wolves at the second level assist the alpha in making decisions and devise them. They are the best candidates for alpha replacement. Another notable characteristic is their group hunting, which can be summarized in four stages: (1) encircling prey, (2) hunting, (3) attacking prey (exploitation), and (4) searching for prey (exploring) [61]. The hunting process (optimization) is led by α, β, and δ wolves, and ω wolves have to abide by these three groups.

#### 1. Encircling prey

In the first stage, the grey wolves encircle and surround the prey during hunting. To define this phase mathematically, the following Equations (14) and (15) are proposed. The parameter *<sup>D</sup>* measures the distance between the grey wolf and the prey, and <sup>→</sup> *X* represents the location of the prey:

$$D = \left| \stackrel{\rightarrow}{\mathcal{C}} \stackrel{\rightarrow}{X}\_p(t) - \stackrel{\rightarrow}{\mathcal{X}}(t) \right| \tag{14}$$

$$
\overrightarrow{X}(t+1) = \overrightarrow{X}\_p(t) - \overrightarrow{A}.\overrightarrow{D} \tag{15}
$$

where *<sup>t</sup>* denotes the current iteration, and <sup>→</sup> *Xp* and <sup>→</sup> *X* denote the position vectors of the prey and the grey wolves, respectively. The <sup>→</sup> *<sup>A</sup>* and <sup>→</sup> *C* coefficient vectors are defined as follows:

$$
\overrightarrow{\dot{A}} = 2a.r\_2 - a \tag{16}
$$

$$
\overrightarrow{C} = 2.\overrightarrow{r\_1}\tag{17}
$$

where components of *a* are linearly decreased from 2 to 0 over the course of iterations, and *r*<sup>1</sup> and *r*<sup>2</sup> are random vectors between [0,1].

#### 2. Hunting

After the encircling of the prey, the hunting phase is guided by α, β, and δ since they are supposed to have compressive knowledge about the prey's position. This can be computed using following formulas:

$$
\stackrel{\rightarrow}{D}\_{a} = \begin{vmatrix} \stackrel{\rightarrow}{C}\_{1} \stackrel{\rightarrow}{X}\_{a} - \stackrel{\rightarrow}{X} \end{vmatrix}, \stackrel{\rightarrow}{D}\_{\beta} = \begin{vmatrix} \stackrel{\rightarrow}{C}\_{2} \stackrel{\rightarrow}{X}\_{\beta} - \stackrel{\rightarrow}{X} \end{vmatrix}, \stackrel{\rightarrow}{D}\_{\delta} = \begin{vmatrix} \stackrel{\rightarrow}{C}\_{3} \stackrel{\rightarrow}{X}\_{\delta} - \stackrel{\rightarrow}{X} \\ \end{vmatrix} \tag{18}
$$

$$
\stackrel{\rightarrow}{X}\_1 = \stackrel{\rightarrow}{X}\_4 - \stackrel{\rightarrow}{A}\_1 \stackrel{\rightarrow}{D}\_1 \stackrel{\rightarrow}{X}\_2 = \stackrel{\rightarrow}{X}\_\not p - \stackrel{\rightarrow}{A}\_2 \stackrel{\rightarrow}{D}\_2 \stackrel{\rightarrow}{X}\_3 = \stackrel{\rightarrow}{X}\_\not \delta - \stackrel{\rightarrow}{A}\_3 \stackrel{\rightarrow}{D} \tag{19}
$$

where <sup>→</sup> *X*1, → *X*2, → *<sup>X</sup>*<sup>3</sup> denote the position of *<sup>α</sup>*, *<sup>β</sup>* and *<sup>δ</sup>*, wolves respectively. <sup>→</sup> *A*1, → *A*2, → *A*<sup>3</sup> and → *C*1, → *C*2, → *C*<sup>3</sup> are the respective coefficient vectors. The position of a grey wolf in the search space can be updated as follows:

$$
\stackrel{\rightarrow}{X}(t+1) = \frac{\stackrel{\rightarrow}{X}\_1 + \stackrel{\rightarrow}{X}\_2 + \stackrel{\rightarrow}{X}\_3}{3} \tag{20}
$$

The other wolves update their positions randomly according to the position of the prey.

#### 3. Attacking prey

The process of hunting ends when the prey stops moving and gray wolves attack the prey. It is important to note that the fluctuation range of <sup>→</sup> *A* is [−2*a*, 2*a*], where *a* is linearly decreased from 2 to 0. The exploration trend happens when → *A* < 1 and → *C* < 1. At this moment, the wolves attack the prey.

#### 4. Search for prey

The grey wolves track and chase the prey. The pursuing of the prey is known as the exploration phase in the GWO algorithm [62]. The parameters *α*, *β*, and *δ* have guidance responsibility in this process. If → *A* > 1, it means the grey wolves are split and distributed in diverse ways for searching of the prey. After finding it, they congregate to attack. The coefficient <sup>→</sup> *C* provides a random weight for the prey while → *C* > 1 and promotes the exploration phase. In addition, <sup>→</sup> *C* models the natural hindrances in hunting for the grey wolves.
