Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Metaheuristic is a set of soft computing techniques which considers the design of intelligent search algorithms based on the analysis of several natural and social phenomena. Many metaheuristic methods have been suggested to solve a wide range of complex optimization applications. Even though these schemes have been designed to satisfy the requirements of general optimization problems, no single method can solve all problems adequately. Consequently, an enormous amount of research has been dedicated to producing new optimization methods that attain better performance indexes. In this chapter, metaheuristic algorithm called Locust Search (LS) is presented for solving optimization tasks. The LS method considers the simulation of the behavior presented in swarms of locusts as a metaphor. In the algorithm, individuals imitate a group of locusts which operate according to the biological laws of the swarm. The algorithm defines two distinct behaviors: solitary and social. Depending on the behavior, each element is undergone to a set of evolutionary operators that emulate the distinct collective behaviors typically present in the swarm.

4.1 Introduction

The collective intelligent behavior of insect or animal groups in nature such as flocks of birds, colonies of ants, schools of fish, swarms of bees and termites have attracted the attention of researchers. The aggregative conduct of insects or animals is known as swarm behavior. Even though the single members of swarms are non-sophisticated individuals, they are able to achieve complex tasks in cooperation. The collective swarm behavior emerges from relatively simple actions or interactions among the members. Entomologists have studied this collective phenomenon to model biological swarms while engineers have applied these models as a framework for solving complex real-world problems. The discipline of artificial intelligence which is concerned with the design of intelligent multi-agent algorithms by taking inspiration from the collective behavior of social insects or animals is known as swarm intelligence [1]. Swarm algorithms have several advantages such as scalability, fault tolerance, adaptation, speed, modularity, autonomy and parallelism [2].

Several swarm algorithms have been developed by a combination of deterministic rules and randomness, mimicking the behavior of insect or animal groups in nature. Such methods include the social behavior of bird flocking and fish schooling such as the Particle Swarm Optimization (PSO) algorithm [3], the cooperative behavior of bee colonies such as the Artificial Bee Colony (ABC) technique [4], the social foraging behavior of bacteria such as the Bacterial Foraging Optimization Algorithm (BFOA) [5], the simulation of the herding behavior of krill individuals such as the Krill Herd (KH) method [6], the mating behavior of firefly insects such as the Firefly (FF) method [7] the emulation of the lifestyle of cuckoo birds such as the Cuckoo Search (CS) [8], the social-spider behavior such as the Social Spider Optimization (SSO) [9], the simulation of the animal behavior in a group such as the Collective Animal Behavior [10] and the emulation of the differential evolution in species such as the Differential Evolution (DE) [11].

In particular, insect swarms and animal groups provide a rich set of metaphors for designing swarm optimization algorithms. Such methods are complex systems composed by individuals that tend to reproduce specialized behaviors [12]. However, most of swarm algorithms and other evolutionary algorithms tend to exclusively concentrate the individuals in the current best positions. Under such circumstances, these algorithms seriously limit their search capacities.

Although PSO and DE are the most popular algorithms for solving complex optimization problems, they present serious flaws such as premature convergence and difficulty to overcome local minima [13, 14]. The cause for such problems is associated to the operators that modify individual positions. In such algorithms, during their evolution, the position of each agent for the next iteration is updated yielding an attraction towards the position of the best particle seen so-far (in case of PSO) or towards other promising individuals (in case of DE). As the algorithm evolves, these behaviors cause that the entire population rapidly concentrates around the best particles, favoring the premature convergence and damaging the appropriate exploration of the search space [15, 16].

The interesting and exotic collective behavior of insects have fascinated and attracted researchers for many years. The intelligent behavior observed in these groups provides survival advantages, where insect aggregations of relatively simple and “unintelligent” individuals can accomplish very complex tasks using only limited local information and simple rules of behavior [17]. Locusts (Schistocerca gregaria) are a representative example of such collaborative insects [18]. Locust is a kind of grasshopper that can change reversibly between a solitary and a social phase, which differ considerably in behavior [19]. The two phases show many differences including both overall levels of activity and the degree to which locusts are attracted or repulsed among them [20]. In the solitary phase, locusts avoid contact each other (locust concentrations). As consequence, they distribute throughout the space, exploring sufficiently the plantation [20]. On other hand, in the social phase, locusts frantically concentrate around the elements that have already found good food sources [21]. Under such a behavior, locust attempt to efficiently find better nutrients by devastating promising areas within the plantation.

In this chapter, the Locust Search (LS) is analyzed for solving optimization tasks. The LS algorithm is based on the simulation of the behavior presented in swarms of locusts. In LS, individuals emulate a group of locusts which interact to each other based on the biological laws of the cooperative swarm. The algorithm considers two different behaviors: solitary and social. Depending on the behavior, each individual is conducted by a set of evolutionary operators which mimic the different cooperative behaviors that are typically found in the swarm. Different to most of existent swarm algorithms, in LS approach, the modeled behavior explicitly avoids the concentration of individuals in the current best positions. Such fact allows not only to emulate in a better realistic way the cooperative behavior of the locust colony, but also to incorporate a computational mechanism to avoid critical flaws commonly present in the popular PSO and DE algorithms, such as the premature convergence and the incorrect exploration–exploitation balance. In order to illustrate the proficiency and robustness of the LS approach, it is compared to other well-known evolutionary methods. The comparison examines several standard benchmark functions which are commonly considered in the literature. The results show a high performance of the LS method for searching a global optimum in several benchmark functions.

This chapter is organized as follows. In Sect. 4.2, we introduce basic biological aspects and models of the algorithm. In Sect. 4.3, the novel LS algorithm and its characteristics are both described. Section 4.4 presents the experimental results and the comparative study. Finally, in Sect. 4.5, conclusions are drawn.

4.2 Biological Fundamentals

Social insect societies are complex cooperative systems that self-organize within a set of constraints. Cooperative groups are better at manipulating and exploiting their environment, defending resources and brood, and allowing task specialization among group members [22, 23]. A social insect colony functions as an integrated unit that not only possesses the ability to operate at a distributed manner, but also to undertake enormous construction of global projects [24]. It is important to acknowledge that global order in insects can arise as a result of internal interactions among members.

Locusts are a kind of grasshoppers that exhibit two opposite behavioral phases, solitary and social (gregarious). Individuals in the solitary phase avoid contact each other (locust concentrations). As consequence, they distribute throughout the space, exploring sufficiently the plantation [20]. In contrast, locusts in the gregarious phase form several concentrations. These concentrations may contain up to 1010 members, cover cross-sectional areas of up to 10 km2, and travel up to 10 km per day for a period of days or weeks as they feed causing devastating crop loss [25]. The mechanism for the switch from the solitary phase to the gregarious phase is complex, and has been a subject of significant biological inquiry. A set of factors recently has been implicated, including geometry of the vegetation landscape and the olfactory stimulus [26].

Only few works [20, 21] that mathematically model the locust behavior have been published. In such approaches, it is developed two different minimal models with the goal of reproducing the macroscopic structure and motion of a group of locusts. Since the method proposed in [20] models the behavior of each locust in the group, it is used to explain the algorithm LS in this chapter.

4.2.1 Solitary Phase

In this section, it is described the way in which the position of each locust is modified as a consequence of its behavior under the solitary phase. Considering that \( {\mathbf{x}}_{i}^{k} \) represents the current position of the ith locust in a group of N different elements, the new position \( {\mathbf{x}}_{i}^{k + 1} \) is calculated by using the following model:

$$ {\mathbf{x}}_{i}^{k + 1} = {\mathbf{x}}_{i}^{k} + \Delta {\mathbf{x}}_{i} , $$
(4.1)

where \( \Delta {\mathbf{x}}_{i} \) corresponds to the change of position experimented by \( {\mathbf{x}}_{i}^{k} \) as a consequence of its social interaction with all the other elements in the group.

Two locusts in the solitary phase exert forces on each other according to basic biological principles of attraction and repulsion (see, e.g., [20]). Repulsion operates very strongly over a short length scale in order to avoid concentrations. Attraction is weaker, and operates over a longer length scale, providing the social force necessary for maintaining the cohesion in the group. Therefore, it is modeled the strength of these social forces using the function:

$$ s(r) = F \cdot e^{ - r/L} - e^{ - r} $$
(4.2)

Here, r is a distance, F describes the strength of attraction, and L is the typical attractive length scale. We have scaled the time and space coordinates so that the repulsive strength and length scale are unity. We assume that F < 1 and L > 1 so that repulsion is stronger and shorter-scale, and attraction in weaker and longer-scale. This is typical for social organisms [21]. The social force exerted by locust j on locust i is:

$$ {\mathbf{s}}_{ij} = s(r_{ij} ) \cdot {\mathbf{d}}_{ij} , $$
(4.3)

where \( r_{ij} = \left| {{\mathbf{x}}_{j} - {\mathbf{x}}_{i} } \right| \) is the distance between the two locusts and \( {\mathbf{d}}_{ij} = ({\mathbf{x}}_{j} - {\mathbf{x}}_{i} )/r_{ij} \) is the unit vector pointing from \( {\mathbf{x}}_{i} \) to \( {\mathbf{x}}_{j} \). The total social force on each locust can be modeled as the superposition of all of the pairwise interactions:

$$ {\mathbf{S}}_{i} = \sum\limits_{\begin{subarray}{l} j = 1 \\ j \ne i \end{subarray} }^{N} {{\mathbf{s}}_{ij} } , $$
(4.4)

The change of position \( \Delta {\mathbf{x}}_{i} \) is modeled as the total social force experimented by \( {\mathbf{x}}_{i}^{k} \) as the superposition of all of the pairwise interactions. Therefore, \( \Delta {\mathbf{x}}_{i} \) is defined as follows:

$$ \Delta {\mathbf{x}}_{i} = {\mathbf{S}}_{i} , $$
(4.5)

In order to illustrate the behavioral model under the solitary phase, Fig. 4.1 presents an example. It is assumed a population of three different members (N = 3) which adopt a determined configuration in the current iteration k. As a consequence of the social forces, each element suffers an attraction or repulsion to other elements depending on the distance among them. Such forces are represented by \( {\mathbf{s}}_{12} ,{\mathbf{s}}_{13} ,{\mathbf{s}}_{21} ,{\mathbf{s}}_{23} ,{\mathbf{s}}_{31} ,{\mathbf{s}}_{32} \). Since \( {\mathbf{x}}_{1} \) and \( {\mathbf{x}}_{2} \) are too close, the social forces \( {\mathbf{s}}_{12} \) and \( {\mathbf{s}}_{13} \) present a repulsive nature. On the other hand, as the distances \( \left| {{\mathbf{x}}_{1} - {\mathbf{x}}_{3} } \right| \) and \( \left| {{\mathbf{x}}_{2} - {\mathbf{x}}_{3} } \right| \) are quite long, the social forces \( {\mathbf{s}}_{13} ,{\mathbf{s}}_{23} ,{\mathbf{s}}_{31} \) and \( {\mathbf{s}}_{32} \) between \( {\mathbf{x}}_{1} \leftrightarrow {\mathbf{x}}_{3} \) and \( {\mathbf{x}}_{2} \leftrightarrow {\mathbf{x}}_{3} \) are from the attractive nature. Therefore, the change of position \( \Delta {\mathbf{x}}_{1} \) is computed as the resultant between \( {\mathbf{s}}_{12} \) and \( {\mathbf{s}}_{13} \) \( \left( {\Delta {\mathbf{x}}_{1} = {\mathbf{s}}_{12} + {\mathbf{s}}_{13} } \right) \). The values \( \Delta {\mathbf{x}}_{2} \) and \( \Delta {\mathbf{x}}_{3} \) of the locusts \( {\mathbf{x}}_{1} \) and \( {\mathbf{x}}_{2} \) are also calculated accordingly.

Fig. 4.1
figure 1

Behavioral model under the solitary phase

In addition to the presented model [20], some studies [27,28,29] suggest that the social force \( {\mathbf{s}}_{ij} \) is also affected by the dominance of the involved individuals \( {\mathbf{x}}_{i} \) and \( {\mathbf{x}}_{j} \) in the pairwise process. Dominance is a property that relatively qualifies the capacity of an individual to survive, in relation to other elements in a group. Dominance in locust is determined for several characteristics such as size, chemical emissions, location with regard to food sources, etc. Under such circumstances, the social force is magnified or weakened depending on the most dominant individual involved in the repulsion-attraction process.

4.2.2 Social Phase

In this phase, locusts frantically concentrate around the elements that have already found good food sources. Under such a behavior, locust attempt to efficiently find better nutrients by devastating promising areas within the plantation.

In order to simulate the social phase, to each locust \( {\mathbf{x}}_{i} \) of the group, it is associated a food quality index \( Fq_{i} \). This index reflex the quality of the food source where \( {\mathbf{x}}_{i} \) is located.

Under this behavioral model, it is first ranked the N elements of the group according to their food quality indexes. Afterward, the b elements with the best food quality indexes are selected \( \left( {b \ll N} \right) \). Considering a concentration radius \( R_{c} \) created around each selected element, a set of c new locusts is randomly generated inside \( R_{c} \). As a result, most of the locusts will be concentrated around the best b elements. Figure 4.2 shows a simple example of behavioral model under the social phase. In the example, it is assumed a configuration of eight locust (N = 8), as it is illustrated in Fig. 4.2a. In the Figure, it is also presented the food quality index for each locust. A food quality index near to one indicates a better food source. Therefore, considering b = 2, the final configuration after the social phase, it is presented in Fig. 4.2b.

Fig. 4.2
figure 2

Behavioral model under the social phase. a Initial configuration and food quality indexes, b final configuration after the operation of the social phase

4.3 The Locust Search (LS) Algorithm

In this chapter, the behavioral principles from a swarm of locusts have been used as guidelines for developing a new swarm optimization algorithm. The LS assumes that entire search space is a plantation, where all the locusts interact to each other. In the LS approach, each solution within the search space represents a locust position in the plantation. Every locust receives a food quality index according to the fitness value of the solution that is symbolized by the locust. The algorithm implements two different behaviors: solitary and social. Depending on the behavior, each individual is conducted by a set of evolutionary operators which mimic the different cooperative behaviors that are typically found in the swarm.

From the implementation point of view, in the LS operation, a population \( {\mathbf{L}}^{k} \left( {\{ {\mathbf{l}}_{1}^{k} ,{\mathbf{l}}_{2}^{k} , \ldots ,{\mathbf{l}}_{N}^{k} \} } \right) \) of N locusts (individuals) is evolved from the initial point (k = 0) to a total gen number iterations \( \left( {k = gen} \right) \). Each locust \( {\mathbf{l}}_{i}^{k} \left( {i \in \left[ {1, \ldots ,N} \right]} \right) \) represents an n-dimensional vector \( \left\{ {l_{i,1}^{k} ,l_{i,2}^{k} , \ldots ,l_{i,n}^{k} } \right\} \) where each dimension corresponds to a decision variable of the optimization problem to be solved. The set of decision variables constitutes the feasible search space \( {\mathbf{S}} = \left\{ {{\mathbf{l}}_{i}^{k} \in {\mathbb{R}}^{n} \left| {lb_{d} \le l_{i,d}^{k} \le ub_{d} } \right.} \right\} \), where \( lb_{d} \) and \( ub_{d} \) corresponds to the lower and upper bounds for the dimension d, respectively. The food quality index associated to each locust \( {\mathbf{l}}_{i}^{k} \) (candidate solution) is evaluated by using an objective function \( f\left( {{\mathbf{l}}_{i}^{k} } \right) \) whose final result represents the fitness value of \( {\mathbf{l}}_{i}^{k} \). In LS, each iteration of the evolution process consists of two operators: (A) solitary and (B) social. Beginning by the solitary stage, the set of locusts is operated in order to sufficiently explore the search space. Then, during the social operation, existent solutions are refined within a determined neighborhood (exploitation).

4.3.1 Solitary Operation (A)

One of the most interesting features of the LS method is the use of the solitary operator to modify the current locust positions. Under this approach, locusts are displaced as a consequence of the social forces produced by the positional relations among the elements of the swarm. Therefore, near individuals tend to repel with each other, avoiding the concentration of elements in regions. On the other hand, distant individuals tend to attract with each other, maintaining the cohesion of the swarm. Different to the original model [20], in the proposed operator, social forces are also magnified or weakened depending on the best fitness value (the most dominant) of the individuals involved in the repulsion-attraction process.

In the solitary operation, a new position \( {\mathbf{p}}_{i} \left( {i \in \left[ {1, \ldots ,N} \right]} \right) \) is produced by perturbing the current locust position \( {\mathbf{l}}_{i}^{k} \) with a change of position \( \Delta {\mathbf{l}}_{i} \left( {{\mathbf{p}}_{i} = {\mathbf{l}}_{i}^{k} + \Delta {\mathbf{l}}_{i} } \right) \). The change of position \( \Delta {\mathbf{l}}_{i} \) is the result of the social interactions experimented by \( {\mathbf{l}}_{i}^{k} \) as a consequence of its repulsion-attraction behavioral model. Such social interactions are pairwise computed among \( {\mathbf{l}}_{i}^{k} \) and the other N − 1 individuals in the swarm. In the original model, social forces are calculated by using Eq. 4.3. However, in the LS method, it is modified to include the best fitness value (the most dominant) of the individuals involved in the repulsion-attraction process. Therefore, the social force exerted between \( {\mathbf{l}}_{j}^{k} \) and \( {\mathbf{l}}_{i}^{k} \) is calculated by using the following new model:

$$ {\mathbf{s}}_{ij}^{m} = \rho ({\mathbf{l}}_{i}^{k} ,{\mathbf{l}}_{j}^{k} ) \cdot s(r_{ij} ) \cdot {\mathbf{d}}_{ij} + rand(1, - 1), $$
(4.6)

where \( s(r_{ij} ) \) is the social force strength defined in Eq. 4.2 and \( {\mathbf{d}}_{ij} = ({\mathbf{l}}_{j}^{k} - {\mathbf{l}}_{i}^{k} )/r_{ij} \) is the unit vector pointing from \( {\mathbf{l}}_{i}^{k} \) to \( {\mathbf{l}}_{j}^{k} \). Besides, rand(1, −1) is a number randomly generated between 1 and −1.

\( \rho ({\mathbf{l}}_{i}^{k} ,{\mathbf{l}}_{j}^{k} ) \) is the dominance function that calculates the dominance value of the most dominant individual from \( {\mathbf{l}}_{j}^{k} \) and \( {\mathbf{l}}_{i}^{k} \). In order to operate \( \rho ({\mathbf{l}}_{i}^{k} ,{\mathbf{l}}_{j}^{k} ) \), all the individuals from \( {\mathbf{L}}^{k} \left( {\{ {\mathbf{l}}_{1}^{k} ,{\mathbf{l}}_{2}^{k} , \ldots ,{\mathbf{l}}_{N}^{k} \} } \right) \) are ranked according to their fitness values. The ranks are assigned so that the best individual receives the rank 0 (zero) whereas the worst individual obtains the rank N − 1. Therefore, the function \( \rho ({\mathbf{l}}_{i}^{k} ,{\mathbf{l}}_{j}^{k} ) \) is defined as follows:

$$ \rho ({\mathbf{l}}_{i}^{k} ,{\mathbf{l}}_{j}^{k} ) = \left\{ {\begin{array}{*{20}l} {e^{{ - \left( { 5\cdot {\text{rank}}({\mathbf{l}}_{i}^{k} )/N} \right)}} } \hfill & {{\text{if rank}}({\mathbf{l}}_{i}^{k} ) < {\text{rank}}({\mathbf{l}}_{j}^{k} )} \hfill \\ {e^{{ - \left( { 5\cdot {\text{rank}}({\mathbf{l}}_{j}^{k} )/N} \right)}} } \hfill & {{\text{if rank}}({\mathbf{l}}_{i}^{k} ) > {\text{rank}}({\mathbf{l}}_{j}^{k} )} \hfill \\ \end{array} } \right., $$
(4.7)

where the function rank(α) delivers the rank of the α-individual. According to Eq. 4.7, \( \rho ({\mathbf{l}}_{i}^{k} ,{\mathbf{l}}_{j}^{k} ) \) gives as a result a value within the interval (1,0).

The maximum value of one is reached by \( \rho ({\mathbf{l}}_{i}^{k} ,{\mathbf{l}}_{j}^{k} ) \) when one of the individuals \( {\mathbf{l}}_{j}^{k} \) and \( {\mathbf{l}}_{i}^{k} \) is the best element of the population \( {\mathbf{L}}^{k} \) in terms of its fitness value. On the other hand, a value close to zero, it is obtained when both individuals \( {\mathbf{l}}_{j}^{k} \) and \( {\mathbf{l}}_{i}^{k} \) possess quite bad fitness values. Figure 4.3 shows the behavior of \( \rho ({\mathbf{l}}_{i}^{k} ,{\mathbf{l}}_{j}^{k} ) \) considering 100 individuals. In the Figure, it is assumed that \( {\mathbf{l}}_{i}^{k} \) represents one of the 99 individuals with ranks between 0 and 98 whereas \( {\mathbf{l}}_{j}^{k} \) is fixed to the element with the worst fitness value (rank 99).

Fig. 4.3
figure 3

Behavior of \( \rho ({\mathbf{l}}_{i}^{k} ,{\mathbf{l}}_{j}^{k} ) \) considering 100 individuals

Under the incorporation of \( \rho ({\mathbf{l}}_{i}^{k} ,{\mathbf{l}}_{j}^{k} ) \) in Eq. 4.6, social forces are magnified or weakened depending on the best fitness value (the most dominant) of the individuals involved in the repulsion-attraction process.

Finally, the total social force on each individual \( {\mathbf{l}}_{i}^{k} \) is modeled as the superposition of all of the pairwise interactions exerted over it:

$$ {\mathbf{S}}_{i}^{m} = \sum\limits_{\begin{subarray}{l} j = 1 \\ j \ne i \end{subarray} }^{N} {{\mathbf{s}}_{ij}^{m} } , $$
(4.8)

Therefore, the change of position \( \Delta {\mathbf{l}}_{i} \) is considered as the total social force experimented by \( {\mathbf{l}}_{i}^{k} \) as the superposition of all of the pairwise interactions. Therefore, \( \Delta {\mathbf{l}}_{i} \) is defined as follows:

$$ \Delta {\mathbf{l}}_{i} = {\mathbf{S}}_{i}^{m} , $$
(4.9)

After calculating the new positions \( {\mathbf{P}}\left( {\{ {\mathbf{p}}_{1} ,{\mathbf{p}}_{2} , \ldots ,{\mathbf{p}}_{N} \} } \right) \) of the population \( {\mathbf{L}}^{k} (\{ {\mathbf{l}}_{1}^{k} ,{\mathbf{l}}_{2}^{k} , \ldots ,{\mathbf{l}}_{N}^{k} \} ) \), the final positions \( {\mathbf{F}}\left( {\{ {\mathbf{f}}_{1} ,{\mathbf{f}}_{2} , \ldots ,{\mathbf{f}}_{N} \} } \right) \) must be calculated. The idea is to admit only the changes that guarantee an improvement in the search strategy. If the fitness value of \( {\mathbf{p}}_{i} \left( {f({\mathbf{p}}_{i} )} \right) \) is better than \( {\mathbf{l}}_{i}^{k} \left( {f({\mathbf{l}}_{i}^{k} )} \right) \), then \( {\mathbf{p}}_{i} \) is accepted as the final solution. Otherwise, \( {\mathbf{l}}_{i}^{k} \) is retained. This procedure can be resumed by the following statement (considering a minimization problem):

$$ {\mathbf{f}}_{i} = \left\{ {\begin{array}{*{20}l} {{\mathbf{p}}_{i} } & {{\text{if}}\,f ({\mathbf{p}}_{i} ) { < }f ({\mathbf{l}}_{i}^{k} )} \\ {{\mathbf{l}}_{i}^{k} } & {\text{otherwise}} \\ \end{array} } \right. $$
(4.10)

In order to illustrate the performance of the solitary operator, Fig. 4.4 presents a simple example where the solitary operator is iteratively applied. It is assumed a population of 50 different members (N = 50) which adopt a concentrated configuration as initial condition (Fig. 4.4a). As a consequence of the social forces, the set of element tends to distribute through the search space. Examples of different distributions are shown in Fig. 4.4b–d after applying 25, 50 and 100 different solitary operations, respectively.

Fig. 4.4
figure 4

Examples of different distributions. a Initial condition, b distribution after applying 25 operations, c 50 and d 100

4.3.2 Social Operation (B)

The social procedure represents the exploitation phase of the LS algorithm. Exploitation is the process of refining existent individuals within a small neighborhood in order to improve their solution quality.

The social procedure is a selective operation which is applied only to a subset \( {\mathbf{E}} \) of the final positions F (where \( \left. {{\mathbf{E}} \,\subseteq\, {\mathbf{F}}} \right) \). In the operation first is necessary to sort F according to their fitness values and store the sorted elements in a temporal population \( {\mathbf{B}} = \left\{ {{\mathbf{b}}_{1} ,{\mathbf{b}}_{2} , \ldots ,{\mathbf{b}}_{N} } \right\} \). The elements in B are sorted so that the best individual receives the position \( {\mathbf{b}}_{1} \) whereas the worst individual obtains the location \( {\mathbf{b}}_{N} \). Therefore, the subset \( {\mathbf{E}} \) is integrated by only the first g locations of B (promising solutions). Under this operation, a subspace \( C_{j} \) is created around each selected particle \( {\mathbf{f}}_{j} \in {\mathbf{E}} \). The size of \( C_{j} \) depends on the distance \( e_{d} \) which is defined as follows:

$$ e_{d} = \frac{{\sum\nolimits_{q = 1}^{n} {\left( {ub_{q} - lb_{q} } \right)} }}{n} \cdot \beta $$
(4.11)

where \( ub_{q} \) and \( lb_{q} \) are the upper and lower bounds in the qth dimension, \( n \) is the number of dimensions of the optimization problem, whereas \( \beta \in [ 0{,}1 ] \) is a tuning factor. Therefore, the limits of \( C_{j} \) are modeled as follows:

$$ \begin{aligned} uss_{j}^{q} & = b_{j,q} + e_{d} \\ lss_{j}^{q} & = b_{j,q} - e_{d} \\ \end{aligned} $$
(4.12)

where \( uss_{j}^{q} \) and \( lss_{j}^{q} \) are the upper and lower bounds of the qth dimension for the subspace \( C_{j} \), respectively.

Considering the subspace \( C_{j} \) around each element \( {\mathbf{f}}_{j} \in {\mathbf{E}} \), a set of h new particles \( \left( {{\mathbf{M}}_{j}^{h} = \left\{ {{\mathbf{m}}_{j}^{1} ,{\mathbf{m}}_{j}^{2} , \ldots ,{\mathbf{m}}_{j}^{h} } \right\}} \right) \) are randomly generated inside the bounds defined by Eq. 4.12. Once the h samples are generated, the individual \( {\mathbf{l}}_{j}^{k + 1} \) of the next population \( {\mathbf{L}}^{k + 1} \) must be created. In order to calculate \( {\mathbf{l}}_{j}^{k + 1} \), the best particle \( {\mathbf{m}}_{j}^{best} \), in terms of fitness value from the h samples (where \( {{\mathbf{m}}_{j}^{best} \in \left[ {{\mathbf{m}}_{j}^{1} ,{\mathbf{m}}_{j}^{2} , \ldots ,{\mathbf{m}}_{j}^{h} } \right]} \)), is compared to \( {\mathbf{f}}_{j} \). If \( {\mathbf{m}}_{j}^{best} \) is better than \( {\mathbf{f}}_{j} \) according to their fitness values, \( {\mathbf{l}}_{j}^{k + 1} \) is updated with \( {\mathbf{m}}_{j}^{best} \), otherwise \( {\mathbf{f}}_{j} \) is selected. The elements of F that have not been processed by the procedure \( \left( {{\mathbf{f}}_{w} \notin {\mathbf{E}}} \right) \) transfer their corresponding values to \( {\mathbf{L}}^{k + 1} \) with no change.

The social operation is used to exploit only prominent solutions. According to the propose method, inside each subspace \( C_{j} \), h random samples are selected. Since the number of selected samples in each subspace is very small (typically \( \left. {h < 4} \right) \), the use of this operator reduces substantially the number of fitness function evaluations.

In order to demonstrate the social operation, a numerical example has been set by applying the proposed process to a simple function. Such function considers the interval of \( - 3 \le d_{1} ,d_{2} \le 3 \) whereas the function possesses one global maxima of value 8.1 at \( (0{,}1.6) \). Notice that \( d_{1} \) and \( d_{2} \) correspond to the axis coordinates (commonly x and y). For this example, it is assumed a final position population F of six 2-dimensional members (N = 6). Figure 4.5 shows the initial configuration of the proposed example, the black points represents the half of the particles with the best fitness values (the first three element of B, g = 3) whereas the grey points \( \left( {{\mathbf{f}}_{2} ,{\mathbf{f}}_{4} ,{\mathbf{f}}_{6} \notin {\mathbf{E}}} \right) \) corresponds to the remaining individuals. From Fig. 4.5, it can be seen that the social procedure is applied to all black particles \( \left( {{\mathbf{f}}_{5} = {\mathbf{b}}_{1} ,{\mathbf{f}}_{3} = {\mathbf{b}}_{2} } \right. \) and \( {\mathbf{f}}_{1} = {\mathbf{b}}_{3} ,\left. {{\mathbf{f}}_{5} ,{\mathbf{f}}_{3} ,{\mathbf{f}}_{1} \in {\mathbf{E}}} \right) \) yielding two new random particles (h = 2), characterized by the white points \( {\mathbf{m}}_{1}^{1} ,{\mathbf{m}}_{1}^{2} ,{\mathbf{m}}_{3}^{1} ,{\mathbf{m}}_{3}^{2} ,{\mathbf{m}}_{5}^{1} \) and \( {\mathbf{m}}_{5}^{2} \) for each black point inside of their corresponding subspaces \( C_{1} ,C_{3} \) and \( C_{5} \). Considering the particle \( {\mathbf{f}}_{3} \) in Fig. 4.5, the particle \( {\mathbf{m}}_{3}^{2} \) corresponds to the best particle \( \left( {{\mathbf{m}}_{3}^{best} } \right) \) from the two randomly generated particles (according to their fitness values) within \( C_{3} \). Therefore, the particle \( {\mathbf{m}}_{3}^{best} \) will substitute \( {\mathbf{f}}_{3} \) in the individual \( {\mathbf{l}}_{3}^{k + 1} \) for the next generation, since it holds a better fitness value than \( {\mathbf{f}}_{3} \left( {f({\mathbf{f}}_{3} ) < f({\mathbf{m}}_{3}^{best} )} \right) \).

Fig. 4.5
figure 5

Operation of the social procedure

4.3.3 Complete LS Algorithm

LS is a simple algorithm with only five adjustable parameters: the strength of attraction F, the attractive length L, number of promising solutions g, the population size N and the number of generations gen. The operation of LS is divided in three parts: Initialization, solitary operation and the social process. In the initialization (k = 0), the first population \( {\mathbf{L}}^{0} \left( {\{ {\mathbf{l}}_{1}^{0} ,{\mathbf{l}}_{2}^{0} , \ldots ,{\mathbf{l}}_{N}^{0} \} } \right) \) is produced. The values \( \left\{ {l_{i,1}^{0} ,l_{i,2}^{0} , \ldots ,l_{i,n}^{0} } \right\} \) of each individual \( {\mathbf{l}}_{i}^{k} \) and each dimension d are randomly and uniformly distributed between the pre-specified lower initial parameter bound \( lb_{d} \) and the upper initial parameter bound \( ub_{d} \).

$$ l_{i,j}^{0} = lb_{d} + {\text{rand}} \cdot (ub_{d} - lb_{d} ); \quad i = 1,2, \ldots ,N;\, d = 1,2, \ldots ,n. $$
(4.13)

In the evolution process, the solitary (A) and social (B) operations are iteratively applied until the number of iterations \( k = gen \) has been reached. The complete LS procedure is illustrated in the Algorithm 1.

Algorithm 1. Locust Search (LS) algorithm

1:

Input: F, L, \( g \), N and gen

 

2:

Initialize \( {\mathbf{L}}^{0} \) (k = 0)

 

3:

until (k = \( \left. {gen} \right) \)

 

5:

\( {\mathbf{F}} \leftarrow \) SolitaryOperation \( \left( {{\mathbf{L}}^{k} } \right) \)

Solitary operator (3.1)

6:

\( {\mathbf{L}}^{k + 1} \leftarrow \) SocialOperation \( \left( {{\mathbf{L}}^{k} ,{\mathbf{F}}} \right) \)

Social operator (3.2)

8:

k = k + 1

 

7:

end until

 

4.3.4 Discussion About the LS Algorithm

Evolutionary algorithms (EA) have been widely employed for solving complex optimization problems. These methods are found to be more powerful than conventional methods based on formal logics or mathematical programming [30]. In an EA algorithm, search agents have to decide whether to explore unknown search positions or to exploit already tested positions in order to improve their solution quality. Pure exploration degrades the precision of the evolutionary process but increases its capacity to find new potentially solutions. On the other hand, pure exploitation allows refining existent solutions but adversely drives the process to local optimal solutions. Therefore, the ability of an EA to find a global optimal solution depends on its capacity to find a good balance between the exploitation of found-so-far elements and the exploration of the search space [31]. So far, the exploration–exploitation dilemma has been an unsolved issue within the framework of evolutionary algorithms.

Most of swarm algorithms and other evolutionary algorithms tend to exclusively concentrate the individuals in the current best positions. Under such circumstances, these algorithms seriously limit their exploration–exploitation capacities.

Different to most of existent evolutionary algorithms, in the LS approach, the modeled behavior explicitly avoids the concentration of individuals in the current best positions. Such fact allows not only to emulate in a better realistic way the cooperative behavior of the locust colony, but also to incorporate a computational mechanism to avoid critical flaws commonly present in the popular PSO and DE algorithms, such as the premature convergence and the incorrect exploration–exploitation balance.

In order to detect ellipse shapes, candidate images must be preprocessed first by the well-known Canny algorithm which yields a single-pixel edge-only image. Then, the \( (x_{i} ,y_{i} ) \) coordinates for each edge pixel \( p_{i} \) are stored inside the edge vector \( P = \left\{ {p_{1} ,p_{2} , \ldots ,p_{{N_{p} }} } \right\} \), with \( N_{p} \) being the total number of edge pixels.

4.4 Experimental Results

A comprehensive set of 13 functions, collected from Refs. [32,33,34,35,36,37], has been used to test the performance of the LS approach. Tables 4.5 and 4.6 in the Appendix present the benchmark functions used in our experimental study. Such functions are classified into two different categories: Unimodal test functions (Table 4.5) and multimodal test functions (Table 4.6). In these tables, n is the dimension of function, \( f_{opt} \) is the minimum value of the function, and S is a subset of \( R^{n} \). The optimum location \( \left( {{\mathbf{x}}_{opt} } \right) \) for functions in Tables 4.5 and 4.6, are in \( [0]^{n} \), except for \( f_{5} ,f_{12} ,f_{13} \) with \( {\mathbf{x}}_{opt} \) in \( [1]^{n} \) and \( f_{8} \) in \( [420.96]^{n} \). A detailed description of optimum locations is given in Tables 4.5 and 4.6 of the Appendix.

We have applied the LS algorithm to 13 functions whose results have been compared to those produced by the Particle Swarm Optimization (PSO) method [3] and the Differential Evolution (DE) algorithm [11]. These are considered as the most popular algorithms for many optimization applications. In all comparisons, the population has been set to 40 (N = 40) individuals. The maximum iteration number for all functions has been set to 1000. Such stop criterion has been selected to maintain compatibility to similar works reported in the literature [34, 35].

The parameter settings for each of the algorithms in the comparison are described as follows:

  1. 1.

    PSO: In the algorithm, \( c_{1} = c_{2} = 2 \) while the inertia factor (ω) is decreasing linearly from 0.9 to 0.2.

  2. 2.

    DE: The DE/Rand/1 scheme is employed. The parameter settings follow the instructions in [11]. The crossover probability is CR = 0.9 and the weighting factor is F = 0.8.

  3. 3.

    In LS, F and L are set to 0.6 and L, respectively. Besides, g is fixed to 20 (N/2) whereas gen and N are configured to 1000 and 40, respectively. Once these parameters have been determined experimentally, they are kept for all experiments in this section.

  • Uni-modal test functions

Functions \( f_{1} \) to \( f_{7} \) are unimodal functions. The results for unimodal functions, over 30 runs, are reported in Table 4.1 considering the following performance indexes: the average best-so-far solution (ABS), the median of the best solution in the last iteration (MBS) and the standard deviation (SD). According to this table, LS provides better results than PSO and DE for all functions. In particular this test yields the largest difference in performance which is directly related to a better trade-off between exploration and exploitation produced by LS operators.

Table 4.1 Minimization result of benchmark functions in Table 4.5 with n = 30

A non-parametric statistical significance proof known as the Wilcoxon’s rank sum test for independent samples [38, 39] has been conducted with an 5% significance level, over the “average best-so-far” data of Table 4.1. Table 4.2 reports the p-values produced by Wilcoxon’s test for the pair-wise comparison of the “average best so-far” of two groups. Such groups are formed by LS versus PSO and LS versus DE. As a null hypothesis, it is assumed that there is no significant difference between mean values of the two algorithms. The alternative hypothesis considers a significant difference between the “average best-so-far” values of both approaches. All p-values reported in the table are less than 0.05 (5% significance level) which is a strong evidence against the null hypothesis, indicating that the LS results are statistically significant and that it has not occurred by coincidence (i.e. due to the normal noise contained in the process).

Table 4.2 p-values produced by Wilcoxon’s test comparing LS versus PSO and DE over the “average best-so-far” values from Table 4.1
  • Multimodal test functions

Multimodal functions have many local minima, being the most difficult to optimize. For multimodal functions, the final results are more important since they reflect the algorithm’s ability to escape from poor local optima and locate a near-global optimum. We have done experiments on \( f_{8} \) to \( f_{13} \) where the number of local minima increases exponentially as the dimension of the function increases. The dimension of these functions is set to 30. The results are averaged over 30 runs, reporting the performance indexes in Table 4.3 as follows: the average best-so-far solution (ABS), the median of the best solution in the last iteration (MBS) and the standard deviation (SD). Likewise, p-values of the Wilcoxon signed-rank test of 30 independent runs are listed in Table 4.4.

Table 4.3 Minimization result of benchmark functions in Table 4.6 with n = 30
Table 4.4 p-values produced by Wilcoxon’s test comparing LS versus PSO and DE over the “average best-so-far” values from Table 4.3

For \( f_{9} ,f_{10} ,f_{11} \) and \( f_{12} \), LS yields a much better solution than the others. However, for functions \( f_{8} \) and \( f_{13} \), LS produces similar results to DE. The Wilcoxon rank test results, presented in Table 4.4, show that LS performed better than PSO and DE considering the four problems \( f_{9} {-} f_{12} \), whereas, from a statistical viewpoint, there is not difference in results between LS and DE for \( f_{8} \) and \( f_{13} \).

4.5 Conclusions

In this chapter, the Locust Search (LS) has been analyzed for solving optimization tasks. The LS algorithm is based on the simulation of the behavior presented in swarms of locusts. In the LS algorithm, individuals emulate a group of locusts which interact to each other based on the biological laws of the cooperative swarm. The algorithm considers two different behaviors: solitary and social. Depending on the behavior, each individual is conducted by a set of evolutionary operators which mimic the different cooperative behaviors that are typically found in the swarm.

Different to most of existent evolutionary algorithms, in the LS approach, the modeled behavior explicitly avoids the concentration of individuals in the current best positions. Such fact allows not only to emulate in a better realistic way the cooperative behavior of the locust colony, but also to incorporate a computational mechanism to avoid critical flaws commonly present in the popular PSO and DE algorithms, such as the premature convergence and the incorrect exploration–exploitation balance.

LS has been experimentally tested considering a suite of 13 benchmark functions. The performance of LS has been also compared to the following algorithms: the Particle Swarm Optimization method (PSO) [3], and the Differential Evolution (DE) algorithm [11]. Results have confirmed an acceptable performance of the LS method in terms of the solution quality for all tested benchmark functions.

The LS remarkable performance is associated with two different reasons: (i) the solitary operator allows a better particle distribution in the search space, increasing the algorithm’s ability to find the global optima; and (ii) the use of the social operation, provides of a simple exploitation operator that intensifies the capacity of finding better solutions during the evolution process.