Abstract
Nowadays, the usage of autonomous mobile robots that fulfill various activities in enormous number of applications without human’s interference in a dynamic environment are thriving. A dynamic environment is the robot’s environment which is comprised of some static obstacles as well as several movable obstacles that their quantity and location change randomly through the time. Efficient path planning is one the significant necessities of these kind of robots to do their tasks effectively. Mobile robot path planning in a dynamic environment is finding a shortest possible path from an arbitrary starting point toward a desired goal point which needs to be safe (obstacle avoidance) and smooth as well as possible. To achieve this target, simultaneously satisfying a collection of certain constraints including the shortest, smooth, and collision free path is required. Therefore, this issue can be considered as an optimization problem, consequently solved via optimization algorithms. In this article, a new method based on cuckoo optimization algorithm is proposed for solving the mobile robot path planning problem in a dynamic environment. Furthermore, to diminish the computational complexity, the feature vector is also optimized (i.e. reduced in dimension) via a new proposed technique. The simulation results show the performance of proposed algorithm in finding a short, safe, smooth, and collision free path in different environment conditions.
Introduction
In the modern era, a variety of different aspects of human life have been involved in using intelligent machines that are able to do various activities in dynamic environments. Among them, autonomous mobile robots have been taken into consideration by researchers in last decades. These robots are used in plenty of various activities including human assistant in daily life, working in high-level dangerous environments, fulfilling impossible tasks for human (e.g. exploration in space and discovery operations). Therefore, they need to directly extract information from their surroundings without human interferes, move within the environment, make decision, and finally perform their tasks safely, meaningfully, and independently using the knowledge they already gained. In addition, moving through the environment is the most crucial and fundamental feature they need to possess. Hence, finding an optimum (the shortest, safe and smooth) path from an arbitrary starting point toward the goal point is considered as one of their basic requirements. 1,2
In the autonomous mobile robot path planning research field, there are three kinds of different environments: static environment with fixed obstacles, dynamic environment with movable obstacles, and also dynamic environment with movable obstacles and the target point simultaneously. Dynamic environment is an unknown environment which has several portable obstacles that move at the same time with robot all around the space with random direction, velocity, and speed. It also might include some static obstacles as well (e.g. walls, doors, furniture, etc.). 3
Mobile robots path planning research field commenced in the middle of 1960s. At the beginning, researchers worked on static environments and used statistical and mathematical methods such as Artificial Potential Field1–5 and Visibility Graph to solve the problem. Although these kinds of methods were able to find sufficient paths, they had some natural drawbacks including getting stuck into local minimum, lack of enough margin from obstacles, oscillations in the face of obstacles and narrow passages.
Recently, research on artificial intelligence has flourished rapidly, and many intelligent algorithms have been applied to the mobile robot path planning problem such as artificial neural network (ANN), fuzzy logic (FL), genetic algorithms (GA), particle swarm optimization (PSO), ant colony optimization (ACO), bee colony optimization (BCO), and also hybrid methods. Pandey et al. introduced the literature survey of the various algorithms used for mobile robot navigation. 4 They classified the algorithms for solving the mobile robot navigation problem into three categories: (1) deterministic algorithms (fuzzy logic, neural network, neuro fuzzy), (2) nondeterministic algorithms (GA, PSO, Simulated Annealing (SA), ANT colony), and (3) evolutionary algorithms (fuzzy + nondeterministic algorithm, neural network + nondeterministic algorithm). In Table 1, we summarize a number of different methods used by researchers to solve the mobile robot path planning problem.
Summary of different methods developed in path planning problem.
ANN: artificial neural network; GA: genetic algorithm; ACO: ant colony optimization; FS: fuzzy system; PSO: particle swarm optimization; DE: Differential Evolution.
In this article, we introduce an algorithm for solving the mobile robot path planning problem. The objective of this research is to find a short, safe, and smooth path collision avoidance for mobile robot path planning in dynamic environment and diminish the computational complexity.
Cuckoo optimization algorithm
Cuckoo optimization algorithm (COA) 46 was introduced for solving nonlinear optimization problems in continuous space by Ramin Rajabioun which is inspired by cuckoo’s life style. Cuckoos, on the contrary of other birds, don’t make nest for themselves and always use other bird’s nest to reproduce. Similar to any population-based algorithms, COA starts with an initial population of mature cuckoos. This population, lay some eggs in different nests. Those eggs that have more similarities to the host bird’s eggs have more chance to grow and become a mature cuckoo, whereas, the rest of them that are identified by the host birds will be obliterated. Afterward, the rate of the grown eggs reveals the proper nests for laying among all areas. In other word, the more grown eggs in an area, the more suitable conditions for laying eggs there. When the eggs grow up and become mature cuckoos, they make several societies and each society has its own habitat region. Then, the best habitat region among these societies is considered as the other cuckoo’s destination for immigration; they immigrate and reside in a place near the best habitat region. Afterward, cuckoos start laying in random nests that are located in their laying radius. This process continues until the best area is found. Figure 1 shows the COA flowchart.

COA flowchart. 46 COA: cuckoo optimization algorithm.
Assumptions
In this article, a new approach is presented to solve the dynamic path planning problem for autonomous mobile robots. Since finding a path in a dynamic environment requires satisfying several distinct and certain constraints, the problem is considered as an optimization problem. Afterward, for solving this optimization problem a new method based on COA is defined. There are several assumptions that are considered as follows: The robot works in a 2-D environment, which is represented by a 2-D matrix. Obstacles in environment are defined as polygon shapes. The number and size of obstacles are randomly generated inside the environment. The size of the robot is equivalent to one grid network cell. The robot and obstacles move in every possible direction in the grid network—eight possible directions. The velocity of robot is constant and equals to exactly one cell per step in any eight possible direction. Therefore, the average speed of robot is one cell per step. The speed of obstacles is random and based on the equation (1), which is always either 0 or 1 cell per step (i.e. equal or smaller than the speed of the robot).
where x is a random number based on uniform probability distribution. It is worthy of emphasize: x is separately generated for any single individual obstacle at any step and, consequently, the speed function is run for determining any obstacle’s speed independently.
Proposed algorithm
According to the dynamic environment, the proposed algorithm is executed step-by-step and online. The shortest path between two arbitrary points, presumably, is the straight line between these two points. Therefore, our algorithm picks this line (i.e. the straight line between the start and the goal points) as the reference line (L R). Then, some points are dynamically chosen on this line and considered as feature vector (optimization variables). Afterward, in each step, the COA is run once and the best-found solution is known as the best path for the current step. After that, the robot moves toward the first point (P 1) in the calculated path, after the robot reaches P 1, this point is considered as the new starting point (P s). Thereupon, this operation continues until the robot reaches the goal point (P g). In other words, when P s = P g, the robot reached the goal point and the algorithm will stop. Flowchart of the proposed algorithm is shown in Figure 2, and the algorithm itself is presented as Algorithm 1.

Proposed algorithm flowchart. COA: cuckoo optimization algorithm.
Proposed algorithm.
Reference line (L R)
The reference line (L R) is the straight line between P s and P g. In fact, L R is ideally the shortest possible path between P s and P g. Moreover, the optimal path is aimed to be generated as much as near the L R. Therefore, in the best case (no obstacle collides the L R), the optimal path is the L R itself as it is shown in Figure 3.

Reference line L R and reference points P R.
Feature vector
Given the definition of problem, the aim of the algorithm is to find a set of consecutive points in a 2-D space and make a path between two arbitrary points by connecting these points together; therefore, these points are considered as the feature vector. Moreover, due to the inevitable impact of the number of feature vector’s variables (N) on algorithm’s performance, it needs to be calculated dynamically. Selecting a constant value for N, instead, leads to ignore the environment’s dynamic condition (e.g. the number of obstacles, the length of L R and obstacles’ distance through L R) which eventually affects the algorithm’s performance in the converge speed and accuracy as well. In the proposed algorithm, the value of N is calculated dynamically based on the environment’s conditions as shown in equation (2).
where d denotes the Euclidean distance between the start and the goal points, and CN
is the number of obstacles that L
R crosses them. After choosing a suitable value for N, the idea is to find a set of N consecutive points (i.e. starting from P
s and finishing at P
g) and link them together to generate a path. In this article, a new technique is proposed for reducing the search space dimension. In our technique, 2-D feature vector is mapped to 1-D; as a result, the search space is circumscribed. Consequently, by reducing the search space as well as the feature vector’s dimension, not only the computational complexity will be reduced but also the execution time will meaningfully be improved. In our approach, instead of using 2-D coordinate of points
As a result, the perpendicular distance of each points from their corresponding reference points

Calculating distance between points Pi
and
The feature vector of the path in Figure 4 is explained in Table 2 that are only the perpendicular distance of each points to their corresponding P R on L R. This feature vector, afterward, fed to COA as a habitat.
An example of a 1-D feature vector based on Figure 4.
Execute COA
The proposed algorithm uses COA to optimize the mentioned distances by considering the upper and lower bound of each reference points. Bear in mind, the value ∞ shows that there is no point on the perpendicular line on the reference point
Fitness function
Given the fact that the mobile robot path planning problem is considered as a minimization problem, first, the cost function and, then the fitness function is defined. Since the optimal path should be short, smooth, safe, and also obstacle avoidance, the cost function is composed of four subfunctions as below. Bear in mind, in all following subfunctions, N represents the number of points that forms the whole path (the whole path is formed by
1. Smoothness subfunction:
A smooth path is a path that the angle between any two consecutive sublines (which formed a part of the path) be high enough not to force the robot to change its movement suddenly with a steep angle. Equation (3) shows the smoothness subfunction
where
2. Length subfunction:
The length subfunction is calculated by equation (4) based on Euclidean distance method
where xi and yi represent the coordinate of point i.
3. Safety subfunction:
A safe path is as far as possible from the obstacles. In other word, the path would be generated with a safe distance from obstacles. Equation (5) demonstrates the safety subfunction.
where
4. Collision-free subfunction:
This subfunction is designed to detect and punish unreachable (infeasible) path that has at least one collision and is defined by equation (6)
where
Finally, the cost function is defined as shown in equation (7)
where w 1, w 2, w 3, and w 4 are the coefficients of smoothness, length, safety, and collision-free subfunctions, respectively. The way that these coefficients are multiplied to their related subfunctions shows that the smoothness sub-function, as well as the safety subfunction, ought to be maximized; on the other hand, the length and collision-free subfunctions should be minimized. Therefore, different coefficients will generate different paths (e.g. if the safety coefficient (w3) is considered too high, then the safest path will be generated instead of the shortest one). Afterward, the fitness function for COA in the proposed algorithm is defined as equation (8)
Furthermore, from the time complexity perspective, the complex cost function of the proposed algorithm—that is presented in equation (7)—needs to get optimized through a fast optimization algorithm. Therefore, among all the novel optimization algorithms (e.g. GA, BCO, ACO, and PSO) the COA was chosen due to its great ability of finding better solutions in fewer iterations than GA and PSO, as described in the simulation results of the original article of the COA. 46
Movement modeling
COA is executed for finding the best path in each step, after finding one, the robot moves toward the first point (P
1) in the generated path. To calculate the exact coordinate of point P
1, first of all, the value of

Calculating the exact coordinate of point P 1.
After calculating the exact coordinate of point P
1, the robot moves toward it while all obstacles move with random speed and directions simultaneously. In this circumstance, there is a probability of collision between the robot and obstacles. To prevent this unwilling accident, first, the number of required step points for robot to reach the point P
1 is calculated, then, the exact coordinate of each step-points is obtained. Finally, if and only if there is no obstacle in the unicellular radius from the first step-point exists, then robot performs the first step; otherwise, robot cannot accept the collision risk and rejects the path (i.e. COA runs again for finding another feasible path). This process continues for each step-points until robot reaches the point

Moving the robot toward point P 1.
Although, theoretically, in a crowded environment, the robot might have collision while moving toward P 1, the simulation results has shown the probability of this collision is substantially low. Moreover, another subfunction can be defined in the cost function to prevent any possible collisions through robot movement toward point Pi , which leads to increase the computational cost.
Simulation results
The simulation results show the performance and the power of proposed algorithm to find a short, safe, collision free (as far as possible from obstacles) path. Bear in mind, any changes in corresponding coefficients of four subfunctions in fitness function in equation (7) will affect the algorithm’s performance and how the path is generated (i.e. described in “Feature vector” section). All experimental results are based on coefficients shown in Table 3, which is obtained by trial and error manner, in which the collision-free subfunction is more important than the length subfunction. In the following, the result of the proposed algorithm is shown in small, medium, and large environments, in which their size is 20 × 20 cm2, 100 × 100 cm2, and 200 × 200 cm2, respectively. Figures 7 and 8 represent the generated path in small environment with two and four dynamic obstacles, respectively. Furthermore, Figures 9 and 10 show the generated path in medium environment that is comprised of 10 and 20 dynamic obstacles, respectively. Finally, Figure 11 shows the algorithm’s performance to find the optimum path in large environment with 20 dynamic obstacles.
Value of coefficients of fitness function’s subfunctions in simulation.

Result of proposed algorithm in the small environment with two dynamic obstacles: (a) initialize setting; (b) roughly 1/3 of the generated path; (c) roughly 2/3 of the generated path; and (d) the whole generated path.

Result of proposed algorithm in the small environment including four dynamic obstacles: (a) initialize setting; (b) roughly 1/3 of the generated path; (c) roughly 2/3 of the generated path; and (d) the whole generated path.

Result of proposed algorithm in the medium environment comprised of 10 dynamic obstacles: (a) initialize setting; (b) roughly 1/3 of the generated path; (c) roughly 2/3 of the generated path; and (d) the whole generated path.

Result of proposed algorithm in the medium environment with 20 dynamic obstacles: (a) initialize setting; (b) roughly 1/5 of the generated path; (c) roughly 2/5 of the generated path; (d) roughly 3/5 of the generated path; (e) roughly 4/5 of the generated path; and (f) the whole generated path.

Result of proposed algorithm in the large environment which has 20 dynamic obstacles: (a) initialize setting; (b) roughly 1/5 of the generated path; (c) roughly 2/5 of the generated path; (d) roughly 3/5 of the generated path; (e) roughly 4/5 of the generated path; (f) the whole generated path.
Note that, in the following figures, the black, red, blue, and gray cells are the start point, goal point, obstacles, and robot path by the time, respectively.
Conclusion
In the modern era, autonomous mobile robots, which work in a dynamic environment that is composed of several static and movable obstacles, play a vital rule in many aspects of daily life from industry to human-aid usage. The foundation of fulfilling their tasks is to find the efficient path between two arbitrary points to move through the dynamic environment effectively. Therefore, mobile robot path planning is to finding a shortest possible path between two points, which also needs to be safe (i.e. no collision with any obstacle) and smooth as well. In this article, a new method based on COA has been formed for solving the mobile robot path planning problem in a dynamic environment—comprised of several static and movable obstacles in different random polygon shapes. Plus, a new technique has been proposed to reduce the feature vector’s dimension (i.e. mapping 2-D matrix to 1-D vector) to overcome the overall computational complexity. The simulation results show the performance and power of proposed algorithm in generating a short, safe, smooth, and collision-free path in different environmental conditions. For our future trend, we will extend our method in a dynamic environment with a movable goal point, which is considered as complex as the real-world environment.
Footnotes
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) received no financial support for the research, authorship, and/or publication of this article.
