Abstract

The optimal performance of the ant colony algorithm (ACA) mainly depends on suitable parameters; therefore, parameter selection for ACA is important. We propose a parameter selection method for ACA based on the bacterial foraging algorithm (BFA), considering the effects of coupling between different parameters. Firstly, parameters for ACA are mapped into a multidimensional space, using a chemotactic operator to ensure that each parameter group approaches the optimal value, speeding up the convergence for each parameter set. Secondly, the operation speed for optimizing the entire parameter set is accelerated using a reproduction operator. Finally, the elimination-dispersal operator is used to strengthen the global optimization of the parameters, which avoids falling into a local optimal solution. In order to validate the effectiveness of this method, the results were compared with those using a genetic algorithm (GA) and a particle swarm optimization (PSO), and simulations were conducted using different grid maps for robot path planning. The results indicated that parameter selection for ACA based on BFA was the superior method, able to determine the best parameter combination rapidly, accurately, and effectively.

1. Introduction

In the 1990s, Dorigo et al. [1] were inspired by the foraging behavior of ants and proposed an ant colony algorithm (ACA) that had the characteristics of strong robustness, a high degree of parallelism, and positive feedback. The ACA demonstrates high effectiveness and superiority in global optimization and in solving the traveling salesman [2, 3], shop scheduling [47], and robot path planning [810] problems.

However, the optimal performance and efficiency of the ACA are closely related to the chosen parameters that include the information heuristic factor , the expectation heuristic factor , the pheromone evaporation factor , the pheromone strength , and the number of ants [11]. Parameter selection differs for different types of optimization problems. Moreover, even for the same type of optimization problem, parameters may change due to the different scales of the problem. Traditional parameter selection methods for the ACA include the empirical selection method, the trial and error method, and the orthogonal experimental design method [12]. The empirical selection method requires a priori knowledge of the problem in question, and the method requires the need to conduct multiple experiments, consuming considerable time and effort, rendering it difficult to obtain the optimum parameters. Hei and Du [13] applied the trial and error method, which required a large number of digital simulations to obtain the parameters, and the authors determined that it was difficult to guarantee that the obtained parameters were optimal. Gan and Li [14] studied parameter selection for ACA based on the orthogonal experimental design method, which ignores coupling between the parameters. This method is computationally intensive, which is a disadvantage. Traditional parameter selection methods for the ACA are mainly based on a large number of replicated experiments, which is inefficient and time consuming. Moreover, traditional parameter selection methods ignore the coupling between the parameters, making it difficult to obtain the optimal parameters.

In the ACA, the parameters are coupled with each other, and it is difficult to achieve the best performance for the algorithm by adjusting only a single parameter. Therefore, it is common to adjust multiple parameters simultaneously to determine the optimal parameter combination. Recently, scholars who have considered the parameter selection in the ant colony algorithm as an optimization problem have applied intelligent algorithms to solve the parameter selection problem in the ACA. Feng [15] proposed a parameter selection method based on a GA. Although this method is effective with regard to global optimization, it had the disadvantage of slow convergence speed. Li et al. [16] applied a PSO, which can avoid subjectivity in parameter selection and obtain optimum parameters rapidly. In spite of that, this method is prone to premature convergence and falling into a local optimal solution. Although GA and PSO are suitable for obtaining ACA parameters quickly and accurately, due to the disadvantages of the methods, the parameter selection can be improved upon. Therefore, a suitable intelligent algorithm that can optimize globally is required to obtain the optimal parameters for the ACA.

The bacterial foraging algorithm (BFA) [17] has a fast convergence speed and searches objects in parallel. The algorithm includes a chemotaxis operator, a reproduction operator, and an elimination-dispersal operator. In addition, the BFA is able to jump out of the local optimal solution. Therefore, the BFA has shown good adaptability for solving the problems of job shop scheduling [18], robot path planning [19], image processing [20], and high dimensional optimization [21]. In this study, ACA parameters are mapped into a multidimensional space, and a chemotactic operator is used to enable each group of parameters to approach the optimal value and speed up the convergence of each set of parameters. A reproduction operator is used to accelerate the optimization for the entire set of parameters. Lastly, the elimination-dispersal operator is utilized to strengthen the global optimization ability of the parameters to avoid falling into a local optimal solution. The BFA is commonly applied to solve the problem of parameter selection for ACA and is able to take into account the coupling between parameters, which allows for adjusting the parameters automatically with little prior knowledge. Therefore, it is appropriate to apply the BFA to obtain the ACA parameters.

2. Model and Parametric Analysis of the Ant Colony Algorithm

The ACA described in this paper will be applied to robot path planning. Generally, environmental modeling is an important aspect of path planning.

2.1. Environmental Modeling

By the direct encoding format for the data, this study uses the grid method [22] for environmental modeling. is described as a convex polygon, an area of limited motion that contains several static obstacles in a two-dimensional plane. A Cartesian coordinate system is established for . Figure 1 shows a grid sequence diagram with a size of , and the black grids in the figure represent obstacles. is an arbitrary grid within , is the sum of all grids, and, therefore, . are the coordinates of a grid, where its center point coordinates are and . Suppose that is a set of grid sequence number, and this study regards a grid as .

2.2. Model of Ant Colony Algorithm
2.2.1. Rules of Path Selection

is defined as the transition probability that ant walks forward from to , which can be expressed as follows [23]:where is a set of the next feasible grid when ant m arrives at ; is the residual pheromones between and at time; represents the information elicitation factor, which shows the relative importance of ; is the expectation heuristic function between and at time, which can be defined as the reciprocal of the distance between and , namely, ; is the expected heuristic factor, which shows the relative importance of .

2.2.2. Rules of Pheromone Updating

Ants will leave pheromones in their path, and the pheromones will evaporate over time to avoid the masking of heuristic information due to excessive residual pheromones. Supposing that is the pheromone evaporation coefficient, the rules of pheromone updating between and at time can be expressed as follows [23]:where is the pheromone that ant leaves between and , and this paper applies the Ant-Cycle model [1] proposed by Dorigo et al., which can be expressed as follows:where is the pheromone intensity; is the total length of path traversed by ant ; is the set of grids traversed by ant .

2.3. Parametric Analyses of the Ant Colony Algorithm

The parameters for ACA are extremely important to the performance of the algorithm, and appropriate parameters can enhance the global search ability of the algorithm and improve the convergence speed considerably [24]. From the above formulas, it is evident that the parameters with a significant impact on the path selection of the ant are , , , and . We will elaborate further on the relationship between the four parameters and the performance of the ACA.

2.3.1. Information Elicitation Factor

The information elicitation factor , which represents the relative importance of the pheromone, reflects the importance of the accumulation of the pheromone with regard to the ants’ path selection. If is very large, the ants tend to choose the same path that the preceding ants have chosen, resulting in stronger cooperation among the ants. Although the convergence speed of ACA will be accelerated, it is likely for the algorithm to fall into the local optimal solution and reduce the global search ability. Conversely, if is too small, the convergence speed of the ACA is slowed down, regardless of the fact that the global search ability of the algorithm can be improved.

2.3.2. Expected Heuristic Factor

The expected heuristic factor , which represents the relative importance of the visibility, reflects the importance of the heuristic information with regard to the ants’ path selection. If the value is very large, the probability of a state transition is close to that of a greedy algorithm. If is too small, the heuristic information has virtually no effect on path selection, which leads ACA to fall into stagnation or a local optimum.

2.3.3. Pheromone Evaporation Coefficient

The pheromone evaporation coefficient , which represents the degree of pheromone evaporation, reflects the degree of mutual influence among ants. Generally, the value of is , which prevents the infinite accumulation of pheromone effectively. If is too small, the global search ability of ACA will be reduced. Otherwise, if is too large, it will improve the global search ability of ACA; however, the convergence speed will be slow.

2.3.4. Pheromone Intensity

The pheromone intensity , which represents the total pheromone, affects the convergence speed of the ACA to a certain extent. If is large, the pheromone concentration will be highly concentrated, which leads the algorithm to fall into a local optimum. Furthermore, a small results in a slow optimization speed.

3. Parameters Selection of ACA Based on BFA

In 2002, Passino put forward a bacterial foraging algorithm [17], based on the foraging behavior of Escherichia coli in the human intestinal tract. This algorithm includes a chemotaxis operator, a reproduction operator, and an elimination-dispersal operator. The algorithm is able to search in parallel and jump out of the local minima easily. In this paper, we will transfer any set of parameters to four-dimensional arrays, which are seen as an individual bacteria , where . is a bacterial population, and . Because the application of the algorithms discussed in this paper is aimed at the problem of robot path planning in a grid map environment, the objective of this study is the selection of optimal parameters for the ACA. is the path for a robot under the individual bacteria , and . Therefore, the fitness function of BFA can be expressed as follows: where is adopted to calculate the length of a path.

3.1. Chemotaxis Operator

The chemotaxis operator represents the core of the BFA, and it determines changes in the location of the bacteria that are searching for food. Therefore, the chemotaxis operator plays a decisive role in finding a food source for the bacteria, which has an important influence on the performance and convergence of the algorithm. is the bacterial population, and . And the chemotaxis operator can be expressed as follows:.

Supposing that and , this paper adjusts the position of a bacteria in accordance with the formula (6), which can be expressed as follows [25]:where represents the current location of the bacterial individual ; is the number of the chemotaxis operator; is the number of the reproduction operator; is the number of the elimination-dispersal operator; represents the step that the bacteria moves forward each time; is the direction of random tumbling; represents a random position in the neighborhood of the current individual.

In the chemotaxis operator, the movement patterns of the bacteria include flipping and moving. The bacteria move forward in any direction with a unit step, which is defined as the flipping operator. After executes the flipping operator, namely, , and the fitness value of is not improved, namely, , jumps out of the loop. If the fitness value of is improved, namely, , keeps moving in the same direction until the fitness value cannot be improved further, or the algorithm achieves the maximum number of flipping, which is defined as the moving operator.

3.2. Reproduction Operator

The reproduction operator ensures the improvement in the performance of the bacterial population, which encourages the population to move towards the optimal direction. The reproduction operator is conducive to achieving the global optimal, which can be expressed as follows:

Supposing that is the fitness value of the bacterial population after performing the chemotaxis operator, which can be expressed as follows:

With the standard of , this paper gets that is half of the bacterial population with a bad fitness value and that represents half of the bacterial population with a good fitness value. Therefore, . Then, this paper replaces with to get , and .

3.3. Elimination-Dispersal Operator

The elimination-dispersal operator generates a new individual with a certain probability, which has a different location compared to the dead individual. The operator has a promoting effect on the algorithm, because the new individual may be closer to the food source, which is more conducive to jumping out of the local optimal solution and finding the global optimal solution. The elimination-dispersal operator can be expressed as follows:, . In this paper, some bacteria individuals pass away in a certain probability. Supposing that is the probability of death for the individual. If , passes away, and , where is a new bacterial individual generated randomly.

3.4. Steps of the Algorithm

See Algorithm 1.

Begin
 Initialize: the bacterial population ; times of chemokines ; maximum
steps of chemokines ; step ; times of reproduction ; times of
elimination-dispersal ; probability of elimination-dispersal ;
maximum generations .
;
While
  For
   For
    For
     While
        ;
        ;
     End
    End
       ;
   End
   If
       ;
   End
  End
  ;
End
End

4. Experimental Analysis

In order to analyze the application performance of the parameter selection for the ACA based on the BFA, we ran a simulation for robot path planning in a grid map environment.

4.1. Establishing Grid Maps

Figure 2 shows six grid maps, where the white grid represents an accessible area and the black grid is a barrier. The ACA based on the parameters obtained using the BFA is used to determine the robot’s optimal path in the map without running into obstacles. The upper left corner grid is the starting point, and the lower right corner grid is the end point. Beginning at the starting point, the robot has the potential to move into 8 different directions, including the front, rear, left, right, left front, left rear, right front, and right rear. Excluding the grids with obstacles or already gone, the robot moves one grid at a time. Details of the grid maps are shown in Table 1, including the size, the number of grids, the number of obstacles, and the coverage rate. Maps 1–4 are of the same size, but the complexity is different for each map. Although Map 5 is small, its complexity is high. Map 6 is not only large, but also highly complex. In general, the larger and the more complex the grid map is, the more difficult robot path planning becomes.

4.2. Simulation

To analyze further the application performance of the parameters obtained by using the BFA for the ACA, we conducted the tests for the different grid maps using MATLAB and compared the results with the GA and the PSO. The following parameters were used: parameter initialization of ACA: ; parameter initialization of GA: size of population: 20, probability of selection: 0.08, probability of crossover: 0.3, probability of mutation: 0.1, maximum generation: 32; parameter initialization of PSO: number of particles: 20, inertia weight: 0.5, parameter of speed adjusting: 1.9 and 0.8; parameter initialization of BFA: , , , , , , and . Prior to using the different intelligent algorithms to determine ACA parameter selection, we initialized , , , and , , , and .

Formula (4) was used as the fitness function for BFA, which was used to compare the parameter performance. In order to ensure the rigor of the experiment, formula (4) was also used as the fitness function of GA and PSO. was adopted to calculate the length of the route of the bacterial individual . Therefore, ACA was used for path planning to obtain the different route under different map environments for the GA, PSO, and BFA. Due to the randomness of ACA, a fixed mathematical formula for ACA could not be used for path planning. As long as GA, PSO, and BFA call the fitness function, these algorithms have to use ACA for path planning, which increases the complexity and simulation time for the algorithms, but cannot be avoided. For example, for Map 6, Table 2 shows the performance comparison of GA, PSO, and BFA. It is evident that the fitness function is invoked multiple times for either algorithm in Table 2. The chemotaxis operator and reproduction operator of the BFA are based on the fitness value of individual bacteria for the evolution of the evaluation criteria. As a result, BFA had the highest number for invoking the fitness function, resulting in the longest simulation time for BFA. However, this study was mainly concerned with path planning based on global maps, which did not require rapid real-time performance. Therefore, it was acceptable to use the BFA for ACA parameter selection. In Table 2, the performance for parameter selection for GA and PSO for 30 optimizations was inferior compared to the performance of BFA for 10 optimizations, which demonstrated that BFA had fast convergence speed and superior performance.

The test results for the use of GA, PSO, and BFA are shown in Table 3. The maximum, minimum, and average values were the best for BFA, indicating that the BFA algorithm was the preferred method for determining the combination of optimal parameters. The chemotactic operator that adjusts the parameters in an adaptive manner ensures that each group of parameters approaches the optimal value in order to speed up the convergence. The reproduction operator accelerates the speed of optimization for the entire set of parameters. Therefore, the parameters obtained using BFA were the most appropriate to achieve the shortest path for the robot using ACA. The standard deviation for BFA was slightly larger than for PSO due to the elimination-dispersal operator, which introduced new parameter combinations. The new parameter combinations with unknown performance increased the diversity of the parameter combinations, which improved the global optimization and avoided the algorithm to fall into a local optima. Furthermore, the initial path of the robot was relatively long. The test results shown in Map 1–5 demonstrate that the performance based on GA was the worst, that of BFA was the best, and that of PSO was close to BFA. The test results shown in Map 6 indicate that BFA performed best, demonstrating that BFA was most suitable for parameter optimization in a complex environment. Therefore, the test results proved that parameter selection for ACA based on BFA was highly effective and superior to the other algorithms.

The initial number of parameter combinations was 20 for each algorithm. Using Map 6 as an example, Figures 3, 4, and 5 show the distribution of parameters under different optimal generation for the three algorithms. In Figure 3, the distribution of parameters underwent a process of aggregating diverging and aggregating. Therefore, it was difficult for the parameters to approach the optimal value continuously. The distribution of parameters obtained using PSO is illustrated in Figure 4, and it shows that the position and velocity of a particle are updated constantly based on the population information and individual experience in order to obtain the optimal parameters. The distribution of the 20-parameter combinations exhibited a gradual trend to aggregate. The parameters aggregated quickly from the 1st optimization to the 12th optimization. However, after the 18th optimization, the aggregating trend was almost unchanged, indicating that PSO fell into a local optimal solution and underwent premature convergence. Figure 5 depicts the parameter distribution obtained using BFA and shows that the 20 parameter combinations aggregate continuously due to the chemotactic operator and reproduction operator. These results demonstrated the effectiveness and superiority of parameter selection for ACA using BFA.

Figure 6 shows the evolution curves of the distances using the three algorithms in the environment of Map 6. The average evolution curves indicate that the convergence speed was highest for BFA. The average evolution curves for GA and PSO exhibited relatively large fluctuations. The convergence speed of GA and PSO was slow, indicating that GA and PSO fell into a local optimal solution. The optimal evolution curves show that BFA had the strongest optimization ability. Moreover, the optimization process for BFA was the most stable. The optimization processes for GA and PSO had large fluctuations.

The parameters of ACA for the shortest path are illustrated in Table 4, where the shortest path represents the minimum value shown in Table 3. The results indicated that the shortest distance obtained by the different algorithms was the same for the same grid map. Nevertheless, the corresponding parameter combinations were different, which proved that the ACA parameters were coupled with each other. Therefore, to find the relationship between the parameters and the performance of ACA, some researchers use the control variable method and change a single parameter for an experiment, which is considered not rigorous.

The performance of the parameter combinations in Table 4 was determined using the fitness function. The fitness function performs path planning for the current grid map, which means that the performance is based on chance and randomness. To validate further the performance of the parameter combinations, tests were conducted based on ACA with different parameter combinations and using Map 6 for robot path planning. It was assumed that the number of ants was 40 and the cycle time was 40.

The results of this test are shown in Table 5. Based on the maximum, minimum, and average values, it was evident that the use of BFA resulted in the best performance regarding parameter combination. The initial path selection of the ants was poor. As the cycle increased, the path became shorter. The ants found the best route based on the parameters obtained by BFA, and the path was much shorter than the initial path, resulting in a large standard deviation. To some extent, the large standard deviation proved the effectiveness and superiority of BFA used for parameters selection for ACA.

The optimal paths using different parameter combinations are shown in Figure 7. The use of ACA based on the parameters obtained using BFA, resulted in the shortest path, indicating that BFA was able to obtain the most appropriate parameters. Figure 8 illustrates the evolution curves of the distance under different parameter combinations, and it is evident that the parameters obtained by GA or PSO led to ACA falling into the local optimal solution and to an apparent premature convergence. However, using ACA based on parameters obtained by BFA resulted in the optimal path. The test results in this paper showed that the parameters had a large impact on the performance of ACA. Choosing suitable parameters enabled ACA to achieve an optimal performance. However, unsuitable parameters resulted in ACA falling into a local optima. The test results showed that the use of BFA could determine optimal parameters for ACA to achieve the best performance.

5. Conclusion

Optimal performance of ACA mainly depended on suitable parameters. However, the parameters were coupled with each other, and the potential number of parameters was large, presenting a considerable challenge for ACA parameter selection. Therefore, multiple parameter selection for ACA based on BFA was proposed. The parameters for ACA were mapped into a multidimensional space, and the optimal parameters were obtained automatically using BFA, demonstrating the superiority of the method. Moreover, the four parameters , , , and could be obtained simultaneously. The parameter optimization process took into account the coupling between the parameters, which ensured the rationality of the parameters. The test results showed that the parameters obtained using BFA for ACA were the most suitable. Compared with GA and PSO, BFA had a better performance for parameter selection of ACA with regard to convergence speed, optimization capability, and stability, which demonstrated the effectiveness and superiority of parameter selection for ACA based on BFA.

Competing Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

Acknowledgments

The project is supported by the National High Technology Research and Development Program of China (863 Program) (Grant no. 2012AA041504) and the Priority Academic Program Development of Jiangsu Higher Education Institutions.