*2.3. The Bat Optimization Algorithm*

Bats hunt for prey using echolocation. In the initial search stage, they emit high amplitude/low frequency ultrasound impulses, with low emission rate (10–20 imp/sec), decoding in real time the reflected waves in order to identify the approximate position of the prey. When a potential target is identified, the bat increases the pulse rate up to 200 imp/sec, and the pulse frequency, which enables it to search accurately the space separating it from the prey, identifying the obstacles in its path and precisely locating the victim and its movement pattern.

The bat optimization algorithm [41] uses the PSO principle of changing the speed and position of the population members (here called 'bats'), but the speed update formula is more elaborated, considering the principle of raising the signal frequency and pulse rate as the bats are getting close to the prey, i.e., to the optimal solution. The basic flowchart of a BOA iteration is depicted in Figure 5.

**Figure 5.** The flowchart of a BOA iteration.

The bats' speeds are initialized in the same manner as in the PSO algorithm but are accompanied by the initial signal amplitude, *Aj*, maximum pulse rate, *rj,max* and random pulse frequency *fj* ∈ [*fmin, fmax*], *j* = 1, ..., *N*.

In each iteration *it*, every bat from the population performs three operations:

• Frequency update:

$$f\_j = f\_{\min} + md \cdot (f\_{\max} - f\_{\min}) \tag{4}$$

• Speed update, with an equation inspired from (2):

$$\left(\mathrm{sp}\_{j}^{(it)} = w \cdot \mathrm{sp}\_{j}\right)^{(it-1)} + f\_{j} \cdot \mathrm{r}nd\_{1} \cdot \left(\mathbf{x}\_{j, \mathrm{r}rt}^{(it)} - \mathbf{x}\_{j, \mathrm{best}}^{(it)}\right) \tag{5}$$

• Position update, identical to the formulation from (3):

$$\mathbf{x}\_{j}^{(it+1)} = \mathbf{x}\_{j}^{(it)} + \mathbf{s}\mathbf{p}\_{j}^{(it)} \tag{6}$$

The BOA also includes a local search. The best individuals from the population are randomly moved in the search space, with

$$\mathbf{x}\_{j}^{(it+1)} = \mathbf{x}\_{j}^{(it+1)} + pp \cdot \overline{A}, \quad j = 1 \dots M, \quad M < N \tag{7}$$

where *A* is the average bat amplitude for iteration *it* and *pp* ∈ [–1, 1].

The new bat positions computed with Equations (4) to (7) are accepted in the population with random probability and only if the newly obtained position is better than the previous.

At the end of each iteration, if a bat improves its position, its signal amplitude is decreased:

$$\mathcal{A}\_{\dot{\jmath}}^{(\text{it}+1)} = \boldsymbol{\alpha} \cdot \mathcal{A}\_{\dot{\jmath}}^{(\text{it})} \tag{8}$$

and its pulse emission rate increases:

$$r\_{\dot{\jmath}}^{\cdot(it+1)} = r\_{\dot{\jmath}}^{\cdot(it)} \cdot (1 - e^{-\gamma \cdot it}) \tag{9}$$

where α ∈ (0, 1) and γ > 0.

This behavior, much like the inertia term for PSO, increases the probability of performing local searches when the iteration count is nearing *itmax*.
