The Robot Path Planning Based on Improved Artificial Fish Swarm Algorithm

Path planning is critical to the efficiency and fidelity of robot navigation. The solution of robot path planning is to seek a collisionfree and the shortest path from the start node to target node. In this paper, we propose a new improved artificial fish swarm algorithm (IAFSA) to process the mobile robot path planning problem in a real environment. In IAFSA, an attenuation function is introduced to improve the visual of standard AFSA and get the balance of global search and local search; also, an adaptive operator is introduced to enhance the adaptive ability of step. Besides, a concept of inertia weight factor is proposed in IAFSA inspired by PSO intelligence algorithm to improve the convergence rate and accuracy of IAFSA. Five unconstrained optimization test functions are given to illustrate the strong searching ability and ideal convergence of IAFSA. Finally, the ROS (robot operation system) based experiment is carried out on a Pioneer 3-DX mobile robot; the experiment results also show the superiority of IAFSA.


Introduction
With the popularity and wide application of mobile robots in the engineering field, the issue of path planning is going to be a spotlight in the navigation of mobile robots in the future.The goal of path planning is to find an optimal collision-free and the shortest path from a start node to a target node in a given real environment [1,2].The optimal collision-free path is usually measured by some criterions, such as distance, time, or energy; distance and time are the most commonly adopted criterions [3].Hence, a lot of algorithms are applied to solve the problem of path planning, such as genetic algorithm, ant colony algorithm, PSO, neural networks, and fuzzy logic [4,5].Artificial fish swarm algorithm (AFSA) [6], a branch of Swarm Intelligence, was firstly brought forward by Li et al. in 2002.Through simulating the social behavior of fish in nature, the algorithm is widely used to process the optimization problem [7][8][9].
Recently, with its strong capacity of global search, fast convergence rate, and good robustness, AFSA is used to deal with robot path planning problem [10].Therefore, plenty of researchers made some attempts to improve the performance of AFSA.In [11], a new artificial fish swarm optimization is proposed to improve the forging behavior of AFSA, which is closer to reality in order to increase a look at the ambient link of fish foraging behavior.By examining the environment, artificial fish can screen the information from the surroundings to obtain an optimal state for the best direction of movement.Yao and Ren reported a hybrid adaptive artificial fish swarm algorithm (HAAFSA) with the adaptive enhanced prey behavior and the segmented adaptive strategy of artificial fish's view and step, which have been verified on research; the HAAFSA was applied to coalmine rescue robot path planning and the performance of the optimal path is improved [12].In [13], the adaptive hybrid sequences niche artificial fish swarm algorithm (AHSN-AFSA) is presented to solve the vehicle routing problem, and the concept of ecological niche is also proposed to improve the shortcoming of traditional AFSA to obtain an optimal solution.In [14], a new idea based on least squares support vector machine (LSSVM), whose parameters are optimized by artificial fish swarm algorithm (AFSA), has been used to improve location accuracy of three-dimensional sensor modes of wireless sensor network.The experimental 2 Mathematical Problems in Engineering result shows that, compared with other localization methods, the proposed method can improve the accuracy of sensor nodes.A modified version of artificial fish swarm algorithm (MAFSA) with a mechanism to dynamically control the parameter vision is also being introduced to select the optimal feature subset to improve the classification accuracy for support vector machines; experimental results show that the performance of the proposed method is superior to standard AFSA [15].In [16], a novel AFSA algorithm, socalled NAFSA, has been proposed to improve weak points of standard AFSA and accelerate convergence velocity of the algorithm.Also, a multiswarm algorithm based on NAFSA was introduced to conquer particularly the dynamic environment by proposing some new mechanism including multiswarm mechanism for finding and diversity increase mechanism and covering potential optimum peaks.Extensive experiments show that the proposed algorithm can get better performance for optimization in dynamic environments.
All the above algorithms are successful in improving the weak point of standard AFSA and get better performance in the corresponding fields.Despite the fact that the mentioned methods can improve the performance in some cases, they still cannot reach the ideal result when it comes to some special optimization problems.In this paper, a new improved artificial fish swarm algorithm (IAFSA) is proposed and applied in the path planning problem.In IAFSA, an attenuation function  is introduced to improve the visual.Also, an adaptive operator based on Gaussian distribution function is introduced to enhance the adaptive ability of step.Besides, inspired by PSO algorithm, an inertia weight factor is introduced in IAFSA to improve the fish behaviors and balance the exploration and exploitation.Simulation shows that IAFSA is more effective, especially when it is used to deal with multipeak and large search space function optimization problem.
The remainder of this paper is organized as follows.Section 2 introduces the standard artificial fish swarm algorithms.In Section 3, the proposed method is presented.Section 4 shows the simulation cases and analyzes the results.Section 5 studies the experiment in mobile robot and analyzes the result.Finally, conclusion and discussion are given in Section 6.

Standard AFSA
Artificial fish (AF) is a fictitious entity of true fish.Generally, fish moves to a position with better food consistency by performing social search behaviors [10].AF has approximately four social behaviors: prey behavior, follow behavior, swarm behavior, and leap behavior [17].We use these behaviors to conduct the analysis and explanation of the problem.
Suppose the state of individual artificial fish is vector .We can denote the vector  = ( 1 ,  2 , . . .,   ), where   ( = 1, 2, . . ., ) is the optimization variable of fishes.The food concentration in the current position of the artificial fish can be expressed as  = (), where  is the value of target function.Visual is the range in which AFs can search and step is the maximum length which an AF can move.The distance of two AFs between   and   can be expressed by Euclidean distance as the following equation: The crowd factor  (0 <  < 1) is a control parameter to control AFs' crowd around a positon and the best position which AFs ever found will be loaded in bulletin.In the following subsection, behaviors of AFs will be described in detail.
(1) Prey Behavior.In nature, prey behavior is a basic biological behavior for fish to find food.We can determine the position   in the visual scope of the AF  randomly.  is the current position of AF ,   is a random state of its visual distance, and  is the food concentration which can be expressed as the objective function  = ().The position   can be calculated by the following equation: and   determine the food concentration of   and   ; if   <   , AF moves forward a step from its current position to   , which is done by If   >   , we select a state   randomly again and judge whether its food consistence satisfies the forward condition.When after try number times the AF  is not satisfied with the forward condition, the concerned AF performs leap behavior.
(2) Swarm Behavior.In order to keep swarm generality, AFs attempt to move towards the center position in every time of iterations.The central position can be determined as the following equation: where   is the arithmetic average of all AF swarm.And  is the size of the population.Denote   as the number of AF swarms in the visual scope of   .If   / <  and   >   , which means the center position of the swarm has better food consistence and population is not a crowd, AF  moves forward a step to the companion center by Otherwise, AF performs prey behavior.
(3) Follow Behavior.During the moving process of the AF, when a single fish or several ones find food, the neighbor fishes will follow and reach the position quickly.Suppose the current position of the AF  is   , and position   is the neighbor in its visual scope.Denote   as the number of AF swarms in the visual scope of   ; if   <   and   / < , AF  moves forward a step to the neighbor   .The expression is determined as follows: If there are no neighbors around   or all of them dissatisfied the condition, then AF  executes the prey behavior.
(4) Leap Behavior.Leap behavior is the basic behavior to seek food or companions in large ranges, which can effectively prevent local optimum.AF  performs the leap behavior and changes the parameter to leap out of the current position.It chooses a state in the visual and moves towards this state to avoid the local extreme values.Hence,

Improved AFSA
In standard AFSA, the visual and step are fixed.The visual determines the search scope, while the step determines the convergence rate and accuracy of standard AFSA.At the initial state of optimization process of standard AFSA, the large values of visual and step lead the AFs to quickly move close to the global optimal solution and improve the convergence speed.However, after the AFs move close to the target position, the large values of visual and step will make the AFs miss the position with better food concentration.Conversely, if the values of visual and step are too small, the local search ability is increased, while the global search ability is decreased.As a result, AFs may pass the global optimal solution and fall into local optimum; the accuracy of the result is decreased.In order to improve those shortcomings of standard AFSA, we proposed a new algorithm with some improved parameters.

The New AF Population.
Opposition-based reinforcement learning is a machine intelligence scheme for learning in dynamic, probabilistic environments.Considering opposite actions simultaneously enables individual states to be updated more than once, shortening exploration and expediting convergence; it is widely applied in machine learning.
In this paper, we introduce opposition-based reinforcement learning to optimize the location distribution of artificial fish swarm in the problem space and to obtain better fitness value compared with the initial one, which can speed up the convergence of AFSA.Consider  and  as the upper and lower limits of problem space; suppose the current position of AF  is   (  ∈ [, ],  ∈ [1, ]), the opposite position of   is defined as X , and X can be calculated by the following equation: We can get the opposite position of each artificial fish and construct the opposite artificial fish swarm by (8).The food concentrations of   and X are (  ) and ( X ).If (  ) > ( X ), we choose   as the new individual; otherwise, we choose X .The process is described as follows: After the above process is completed, the new artificial fish swarm, which is constituted with new individuals, is generated.

Parameter Variation on IAFSA
(1) Visual.In order to satisfy the requirement of convergence rate and the balance of global search and local search, a parameter  is introduced to improve the visual of AF.The parameter  is determined as follows: where  denotes the current iteration number,  max denotes the maximum iteration number, and the range of values for parameter  is 1 to 20.  is an attenuation function which can minimize the value of  while AF moves close to the target position during the iteration process.In Figure 1, the varying graph of parameter  in different value of  is displayed.In the early stage of iteration process, if the value of  is small, the attenuation velocity of  is quick; conversely, if the value of  is too large, the attenuation of  is slow.Thus, in IAFSA, the value of  is set to 3. The improved visual is determined as follows: where visual min is the minimum determined by the requirement of the problem space.In the initial stage of the iteration process, the value of visual is relatively large and the global search ability is great; AFs can move to better positions easily in relative area.While the value of visual is gradually becoming smaller, the global search ability is decreased and local search ability is enhanced.
(2) Step.To balance the accuracy of solution and iteration speed, the Gaussian distribution function is introduced to improve the step of AF.The expression of Gaussian distribution function is determined as follows: where  denotes the mathematical expectation and  denotes the standard deviation.Here, we set  to 0. We introduce Gaussian distribution function as the adaptive operator to enhance the adaptive step.The expression of adaptive step is determined as follows: Step where step min is the minimum determined by the requirement of the problem space.In the initial stage of the iteration process, the step is relatively large, and the convergence speed is fast; the AF can get close to the better position easily in relative area.However, during the iteration process, as the step gradually gets smaller, the accuracy of solution is enhanced.
(3) Inertia Weight Factor.In standard AFSA, AF moves to the next position by performing swarm behavior, follow behavior, leap behavior, or prey behavior.All the social behaviors play an important role in the process of optimization, especially the swarm behavior and follow behavior.In the above two behaviors, each AF moves to the next position based on a random percentage of step, from the last position in each iteration.As shown in (3) and ( 5), the last position and random step make a big effect in the moving process.In the early stage of optimization, the last position makes the global search ability decrease; but at the end of optimization, the random step makes the local search ability decrease.Thus, to a certain extent, in this search mechanism, the moving flexibility of AFs is weak.Consequently, AFs cannot get the balance between global search and local search abilities.To increase the moving flexibility and balance the global search and local search ability of AFs, the inertia weight factor, which is inspired by the PSO algorithm, is introduced in IAFSA.In PSO, the inertia weight factor defines the impact of particle's velocity on the current one and controls the range of the search effectively [18].Besides, with the application of inertia weight factor, PSO algorithm can get the balance between exploration and exploitation [19].Here, we choose an appropriate constant for  to compromise between global exploration and local exploitation in IAFSA.The inertia weight factor  is determined as follows: where  denotes the current iteration number and  max denotes the maximum iteration number;  start and  end are the inertia weight at the beginning and at the end, respectively.In Figure 2, the varying graphs of parameters  and (1 − ) in different values of  start and  end are displayed.In the early stage of the iteration process, the value of  is large and (1−) is small; the global search ability is enhanced.And, during the process of iteration, the value of  is gradually decreasing and (1−) is gradually increasing; the local search ability is enhanced.Therefore, in IAFSA, AFs can get the balance between global search and local search abilities.

New Behaviors
(1) New Prey Behavior.This behavior is an individual behavior and each AF performs it without considering other AFs.Each AF does a local search around itself.Suppose the position of AF  is   () and   ( + 1) is the position randomly generated ( 2  − 10 cos (2  ) + 10)  = (0, 0, . . ., 0) 0 = (0, 0, . . ., 0) 0 in the visual of AF.The position   ( + 1) is determined as follows: If the food concentration of position   ( + 1) is better than of the current position   (), this position will be replaced by (2) New Swarm Behavior.In the new swarm behavior, the central position of the AF swarm is calculated by (4); it is the arithmetic average of all the AF individual positions.The next position   ( + 1) is obtained by If the food concentration of position   ( + 1) is better than of position   (), the current AF  moves towards   with a random distance in the visual.
(3) New Follow Behavior.In standard AFSA, the current AF moves towards the better AF (according to fitness value) in its visual scope, but, in IAFSA, each fish moves some distance towards the best AF in the swarm by the following expression: 3.4.The Procedure of IAFSA.The improved AFSA mainly includes the following steps.
Step 1. Initialize the parameters of artificial fish, such as step, visual, try number, and maximum number of iterations.
Step 2. Construct the opposite artificial fish and form the new artificial fish population by ( 8) and ( 9).
Step 3. Select the optimal value of each fish, and record it in the bulletin.
Step 4. Implement prey behavior, swarm behavior, follow behavior, and leap behavior.
Step 5.The optimal value in the bulletin board is updated by the better individual optimum.
Step 6.If termination condition is satisfied, output the optimization result; otherwise, return to Step 2.
The flow chart of IAFSA is shown in Figure 3.

Simulation and Discussion
In this section, five unconstrained benchmark functions are used as measurement to evaluate the performance of IAFSA.The benchmark functions with their optimal value and optimal variable are shown in Table 1.Easom, Booth, and Rastrigin functions are multipeak functions with several local minimums, and Sum Squares and Bohachevsky functions are single-peak functions which have no local minimum except the global one.We can find the global minimum by analysis for the function expression.
In standard AFSA and IAFSA, the initial value of visual and step has been considered to be 30% and 10% of the range length of the fitness function variables, respectively.The inertia weight factors  start and  end are 0.2 and 0.9.The fish number is 100, crowd factor is 0.6, and the numbers of iterations are 50, 100, and 200, respectively.The algorithm is run 50 times for each iteration number.Here, we used the mean (average optimal value) to evaluate the optimal performance of the algorithms.The result is shown in Table 2.
The dimensions of the Rastrigin function and Sum Squares function are taken as 10, and those of Easom, Booth, and Bohachevsky functions are taken as 2. From Table 2, we can see that the average optimal value which is got by IAFSA is better than the standard AFSA.The tests show that the proposed algorithm has higher accuracy in function optimization problem, especially for multiextreme optimization problem.
To evaluate the convergence speed of the algorithm, the two algorithms are run about 100 times and record the max convergence iteration number, the min convergence iteration number, and the average convergence iteration number.The data is shown in Table 3.And the optimization process is shown in Figure 2.
In Table 3, we can see that, with the improved AFSA, the max convergence iteration number, the min convergence iteration number, and the average convergence iteration number of the five test functions are smaller than standard  AFSA.The table shows that, compared with standard AFSA, the search ability of IAFSA is enhanced.
As shown in Figure 4, the search ability of IAFSA is stronger than of AFSA, and the convergence speed is faster.IAFSA is shown to have better performance in improving search accuracy and speed; also, to a certain extent, the searching efficiency, global optimization ability, and accuracy of the solution are improved.

Introduction of Experiment Platform.
The experiment in a real environment is further investigated on the platform of Pioneer 3-DX (Figure 5) mobile robot which is equipped with ROS (robot operation system).With its modest and balanced size combined with reasonable hardware, the mobile robot is suitable for indoor laboratory or classroom navigation.This framework uses the idea of nodes, messages, packages, services, and topic [20].

Experiment Process
(1) The Self-Created Environment.The experiment of path planning in autonomous navigation is started in a real environment and a self-created environment, respectively.The self-created environment is shown in Figure 6.This environment consists of some other complicated structures like narrow passes, edges, sharp corners, and so forth.The map of the self-created environment is shown in Figure 7.
And points A, B, C, D, and E in the map are the five positions of self-created environment.During the process of path planning, the robot's walk path is represented as its footprint in the map as shown by the blue arrow in Figure 7.
The performance of path planning with the IAFSA application in robot navigation is shown in Figure 8(a).In order to further verify the superiority and effectiveness of IAFSA in robot path planning, IAFSA is compared experimentally with the standard AFSA, A * algorithm, and HAAFSA, respectively.Figures 8(b), 8(c), and 8(d) correspond to the performance of standard AFSA, A * algorithm, and HAAFSA.By comparison experiment shown in Figure 8, it can be observed from the results that all the abovementioned algorithms can finish the robot path planning and enable the robot to avoid the obstacles.The optimal performance of IAFSA is better than of the other three algorithms; the global search ability is better and self-adaptive ability is very strong.The experiment of path planning is performed 50 times in four different paths, respectively.We get the route data of robot walking in a path from the odometer in Pioneer 3-DX mobile robot, and the average values of route in 50 times are given in Table 4.The odometer in Pioneer 3-DX is used for speed measurement and route measurement.And, in ROS, the odometer is used for assistant position.
In Table 4, the route obtained by IAFSA is the shortest.The performance of IAFSA in robot path planning is better than of the other three algorithms, and the accuracy of the   result is enhanced.Also, the global search ability and local search ability are improved.
(2) The Real Environment.The real environment, which consists of a hall, a cubby, hallways, a cupboard, a booth, and a wall, is shown in Figure 9.And the map of the real environment is shown in Figure 10.
In the map, there are five positions, A, B, C, D, and E, and we choose four paths to do the experiment.The path of the robot is shown in Table 5.
To demonstrate the success of the proposed method, we make another three extra comparisons.The proposed algorithm is compared with the standard AFSA, A * algorithm, and HAAFSA, respectively.Figures 11(a 11.By comparison, we can find that the four algorithms get better performance in path planning; the mobile robot can pass through the sufficient area and avoid collision with the obstacle.However, the proposed IAFSA in this paper makes the step smaller, the trajectory smoother, and the total route shorter.The performance of IAFSA is better than of the other three algorithms, and the optimized ability is more powerful. The four algorithms are executed 50 times, respectively, and the mean of the four routes (A-B, A-C, D-B, and E-D) of the robot path planning using the four optimal algorithms is displayed in Table 5.
In Table 5, we can find out that the path got by IAFSA is the shortest, followed by A * algorithm, HAAFSA, and AFSA, respectively.Compared with the other three optimal algorithms, the performance of IAFSA in mobile robot path planning is better.IAFSA is shown to have efficient searching capability in real environment, and the accuracy of the result is enhanced.

Conclusion
In this study, an attenuation function  is introduced to improve the weak point of visual in standard AFSA; also, an adaptive operator is introduced to enhance the adaptive step.Besides, a self-active inertia weight factor is introduced to improve the convergence.The IAFSA is applied to the path planning problem of mobile robot which is equipped with ROS.Five well-known benchmark functions are used to evaluate the performance of IAFSA.Simulation shows that the convergence speed of IAFSA is more efficient; the local search ability is enhanced and the optimal result is more accurate.The performance of IAFSA is better than of standard AFSA.In order to further analyze the superiority and effectiveness of the IAFSA in robot path planning, the IAFSA is compared experimentally with the standard AFSA, A * algorithm, and HAAFSA, both in a self-created environment and in a real environment.Experiment results show that IAFSA can adapt to different environments in the planned trajectories with both satisfactory accuracy and stability.The optimal ability is better and the route, which the robot walked, is the shortest.The space complexity is reduced and the path is smoother.
Future work will be done as follows.First, we will extend the model in a highly complicated environment to evaluate the self-adaptive ability and add practical applicability.Second, we will extend to multiobjective optimizer to search

Figure 1 :
Figure 1: The varying graph of parameter .

Figure 7 :
Figure 7: The map of self-created environment.

Figure 8 :
Figure 8: The path in self-created environment using different algorithms.

Figure 10 :
Figure 10: The map of the real environment.

Table 1 :
Attributes of Cleveland dataset.

Table 2 :
The average optimal value with different iterations.

Table 3 :
The convergence of the optimal result in 100-fold experiment.

Table 4 :
The route of the robot path planning experiment in a selfcreated environment (m).

Table 5 :
The route of the robot path planning experiment in a real environment (m).