L* Algorithm—A Linear Computational Complexity Graph Searching Algorithm for Path Planning

The state-of-the-art graph searching algorithm applied to the optimal global path planning problem for mobile robots is the A* algorithm with the heap structured open list. In this paper, we present a novel algorithm, called the L* algorithm, which can be applied to global path planning and is faster than the A* algorithm. The structure of the open list with the use of bidirectional sublists (buckets) ensures the linear computational complexity of the L* algorithm because the nodes in the current bucket can be processed in any sequence and it is not necessary to sort the bucket. Our approach can maintain the optimality and linear computational complexity with the use of the cost expressed by floating-point numbers. The paper presents the requirements of the L* algorithm use and the proof of the admissibility of this algorithm. The experiments confirmed that the L* algorithm is faster than the A* algorithm in various path planning scenarios. We also introduced a method of estimating the execution time of the A* and the L* algorithm. The method was compared with the experimental results.


Introduction
The graph searching algorithms are used for various applications.One of them is the mobile robot optimal path planning.The optimal 1 path planning problem has been widely investigated in the last 50 years.Many path planning methods for collision-free optimal path finding were discovered and developed.They can be divided into two main groups: • roadmap methods (e.g., Voronoi diagrams [23], visibility graphs [22], probabilistic roadmaps [24]), • potential methods (e.g., potential fields [10]).
The main focus of interest of this paper is the global path planning problem.It can be defined as a process of finding an ordered set of intermediate points connecting the start point and the goal point.Each point of this set must be located in the free configuration space of the mobile robot.
One of the most popular graph searching algorithms is the A* algorithm.It was presented by Nilsson, Hart, and Raphael in 1968 [8].It was widely investigated and commonly used for developing new modified methods of mobile robot path planning.In this paper, our algorithm will be compared with the best version of the A* algorithm (with the heap structured open list).
For comparison of various algorithms, the notion of the computational complexity is used [1].It says how fast the number of the basic operations of the algorithm increases with the growth of the input of the algorithm.The space complexity says how fast the memory resources increase with the increase of the input of the algorithm.
In this paper, we present a new method of graph searching, in particular, applied to the path planning problem.It is a modification of the A* algorithm.The L* algorithm uses a modified heuristic cost function and a modified open list based on the bucket structure.It is not necessary to maintain each bucket sorted.The proposed algorithm has a linear computational complexity.For this reason, it is called the L* algorithm.We present this graph searching algorithm in the path planning on a 2D occupancy grid map as a leading example.This approach was widely used in other works concerning path planning for the holonomic mobile robots which have the 2D configuration space, e.g., [9,13,19].It is usually assumed that a mobile robot can move to one of four or eight neighboring cells.However, the same algorithms of graph searching can be used for the nonholonomic mobile robots with 3D configuration space (position x, position y, orientation o) [16].This paper also presents the admissibility of the L* algorithm and shows our method of estimation of the execution time of both L* and A* graph searching algorithms.The main purpose of the paper is a presentation of the properties of the L* algorithm.
The rest of this paper is organized as follows: in Section 2 the problem is formulated.The most popular graph searching methods are described in Section 3. Section 4 presents the modification of the A* algorithmthe L* algorithm with the restrictions for its use.Section 5 presents the properties of the L* algorithm with its most significant advantage-linear computational complexity.Section 6 contains the results of the simulation tests of the path planning with the use of the A* and the L* algorithm.We compared our L* algorithm to A* with heap based open list as well as the bucket based open list.In Section 7, conclusions are presented.

Problem Statement
The A* algorithm nowadays is used in the global path planning.However, in the case of detecting new obstacles on the map, the path replanning is executed with the use of modifications of the A* algorithm (e.g., dynamic A* algorithm-the D* algorithm [19] and similar [18,20]).These algorithms can react better to the changes in the workspace and do not need to explore all of the nodes again after detecting the change.Most of these dynamic path planning algorithms also need to use the list of nodes for expansion that has to be sorted by the key value.
Most of the graph searching algorithms use the open list as a priority queue of the nodes expansion.In the A* algorithm, the nodes on this list are sorted by the f cost which is the total cost of the node: where: g(N) is the cost of the path from the start node to the node N and h(N) is the heuristic estimate of the cost of the path from the node N to the goal.The g(N) is calculated as follows: g(N) = g(pred(N)) + dg(pred(N), N), (2) where: pred(N) is the predecessor node of the node N in the graph and dg is the cost of the graph edge from the node pred(N) to N.
If the heuristic function h fulfills the admissibility restriction, the A* algorithm always returns the optimal path from the start node to the goal node if it exists.Such algorithm is said to be admissible.The admissibility restriction can be written as follows: where h * (N) is the true cost of the path from node N to the goal node N g .Moreover, if the heuristic function fulfills the monotone requirement, it ensures that for every node selected for the expansion from the open list, the algorithm has already found the optimal path.The monotone restriction can be formulated as follows: where N is the successor node of the node N in the current spanning tree In the A* algorithm and its modifications, the most effective approach is the use of the heap structure of the open list.In the path planning problems, the common approach is that the number of edges connected to each node is the same (or it can be bounded above).Given so, we can assume that the complexity of the algorithm depends on the total number of nodes in the graph.The binary heap open list structure provides the O(nlog(n)) computational complexity of the algorithm, where n is the total number of nodes in the graph.This feature, for huge maps, may cause longer computation time which rises rapidly with the growth of the open list.
Considering the increasing requirements for the data processing systems of the mobile robots, the necessity of the path planning on larger and larger maps, the need of considering more parameters (not only the length) in the optimal path planning problem, the idea of lowering the computational complexity of the graph searching algorithm can be crucial.Therefore, the L* algorithm can be a good alternative to the A* algorithm.

Related Work
Although the A* algorithm was presented in 1968, it is still one of the most popular graph searching algorithms used in the path planning problem.This algorithm also has many modifications, e.g., the LPA* algorithm [12], D* algorithm [19], D* Lite [13] or Focused D* [20], Theta* algorithm [3].All of these graph searching algorithms require the priority queue in order to find the optimal path.All of the algorithms mentioned above are based on the expansion of the nodes collected on the open list in the non-descending order of the key value.The typical approach is to use a binary heap as a data structure for the open list.It strongly affects the computational complexity of the algorithm.However, there were several efforts for decreasing the computational complexity of the graph searching algorithm.
One of the first approaches for decreasing of the computational complexity of graph searching was Dial's algorithm [4] based on Dijkstra's algorithm.This method assumes that the cost of each edge is expressed by a positive integer number.Therefore, the cost of each path in the spanning tree is also expressed by the integer value.The open list is divided into a set of buckets.Each bucket contains only the nodes with a specified value of the f cost.Because all of the nodes in each bucket have the same value of the cost, it is not necessary to sort the buckets, hence, the computational complexity of the graph searching algorithm can be decreased.
The main disadvantage of this algorithm is the lack of the heuristic function.It causes that many more nodes have to be expanded than in the A* algorithm in order to find the path to a specific goal node.Moreover, the assumption that the cost is expressed with the integers can be ineffective, especially for the cost functions including components dependent on height differences between the nodes, surface quality or terrain roughness (which are common in non-urbanized terrain path planning).
Bucket based open lists can also be used for the A* algorithm [5].The method is similar to Dial's algorithm.The cost is expressed as the integer numbers.The open list is divided into the buckets.Each bucket contains the nodes with the same f value.In order to speed up the computation, the second level of the buckets can be used [7].In the second level of buckets, the nodes are sorted by the g cost.The strong limitation of this method is the requirement of expressing the cost of the path by the integers.The integerdomain cost functions can be only used in straightforward graph searching problems.In more complex problems, the cost function is usually expressed by floating-point numbers.Obviously, the transition from floating-point numbers to integers can be easily introduced by using the 10 P multiplier (where P is a natural number greater than 0) and omitting the fractional part of the cost after multiplying.However, there is always a problem with selection a priori the appropriate value of the P parameter.Selection of too small multiplier may cause non-optimality of the final path (costs are rounded).Selection of too big multiplier value can cause the huge amount of empty buckets.The number of empty buckets limits the performance of the algorithm.However, it was experimentally proved that, in some workspaces, this approach provides better results than heap structured open list A* algorithm; in particular, when an appropriate value of the multiplier is selected.The bucket based open list is valuable only if the number of nodes with the same total cost is big and the difference between the cost of the nodes is relatively small [11].
If the f cost is expressed by the floating-point numbers, the nodes can also be divided into the buckets.Each bucket contains the nodes with a specific range of cost.In this situation, while selecting a new node from the open list for expansion, the algorithm has to determine the node with the lowest f cost-the only optimal node in the current bucket.Each bucket can be simply sorted by searching node by node.This approach is effective if the number of nodes in each bucket is relatively small.This approach can also give good results in several domains, but the selection of the appropriate range of buckets cost can be crucial.It can be tough to determine the proper range of buckets f cost before starting the graph searching.The number of nodes in each bucket strongly affects the computation time of the algorithm.
Reducing the computational complexity of the A* algorithm can also be obtained with the use of the modified method of the open list processing.The binary heap is one of the most common approaches.However, there are several modifications of this kind of data structure.The modified approaches ensure lower computational complexities in terms of specific conditions.One of them is the Fibonacci heap [6].It is a modification of the binomial queues.The Fibonacci heap consists of a set of heap-ordered trees.It improves the operation of inserting a new node to the heap and the operation of decreasing the cost of a node in the heap (complexity O(1)).The operation of deleting the lowest cost node has the complexity O(log(n)).
A relatively novel approach is to improve the time of heap operation with the use of a strict Fibonacci heap [2].This method is a pointer-based implementation of a standard Fibonacci heap.It achieves the complexity of the Fibonacci heap in the worst case.In the A* algorithm, the heap structured open list is a more general solution than the bucket based open list up to now.

General Idea of the L* Graph Searching Algorithm
In the typical A* algorithm used in the mobile robot path planning, the computational complexity is O(log(n)), where n is the total number of nodes.In the heap based A* as well as the bucket based A*, it is always necessary to determine the node with the lowest f cost (in the heap or the current bucket).In the bucket based A* algorithm with the cost rounded to integers, it is always possible to receive the nonoptimal final path due to the necessity of rounding the costs.For this reason, this approach is not in the scope of this paper.
Our purpose was to develop the algorithm (which will use the f cost expressed with the floating-point numbers) providing the O(n) computational complexity.The main application of the algorithm should be the mobile robot path planning.
In our algorithm, the open list uses the buckets.The main difference between our L* algorithm and the bucket based A* algorithm is the optimality of the nodes in the current bucket.In the heap-based and bucket-based A* algorithm, we are sure that the node with the lowest f cost is optimal.
In the L* algorithm, we are confident that all of the nodes in the current bucket are optimal (when algorithm opens the bucket for the first time, we are sure that the shortest path to each node belonging to this bucket has already been found).This feature causes that the order of the nodes selected for the expansion within the current bucket can be arbitrary.Therefore, it is not necessary to choose the node with the lowest f cost for expansion from the current bucket.This effect was obtained by decreasing the power of the heuristic function and selecting the appropriate interval of the buckets.The heuristic cost is decreased by multiplying the cost by the w coefficient which has to be lower than 1 and greater than or equal to 0. The interval of the buckets depends on the w coefficient value.The interval has to be lower than or equal to (1 − w)dg min , where dg min is the lowest possible cost of the edge in the graph (more details in Sections 4.2-4.5).
In the L* algorithm, the nodes in the current bucket are not sorted and can be selected in arbitrary order.Thus, we have O(1) computational complexity of accessing any node in the bucket, and the complexity of the whole algorithm is O(n), where n is the number of nodes.
The O(n) complexity is a strong advantage of the L* algorithm.However, it is slightly decreased by the necessity of visiting more nodes than the A* algorithm (because the heuristic function for the L* algorithm is less informed than for the A* algorithm).
The assumptions for the use of the L* algorithm are listed in the Section 4.2.The only new assumptions which are not present in the A* algorithm are the value of the dg min and dg max (minimum and maximum cost of the edge in the graph).They have to be known a priori.The rest of Section 4 contains the guidelines for the open list building (bucket based open list) and the comparison of the L* algorithm with the A* algorithm.Section 5 contains the proof of optimality and computational complexity of the L* algorithm and our theoretical method for estimating the expected shortening of the computation time by the use of the L* instead of the A*.This method, as well as the empirical tests shown in paragraph 6, confirmed that the benefit from the use of the L* algorithm raises with the increase of the graph size.For this reason, we suggest using the L* algorithm for large graphs rather than for the small ones.

The Assumptions
The L* algorithm is an evolved A* algorithm with the nonstandard structure of the open list.It is used to search a weighted graph G = (V , E), where V is the set of vertices (nodes), and E is the set of edges connecting these nodes.The assumptions of the L* algorithm are as follows: • weight dg of each graph edge e is positive but not infinite, • the minimum value of graph edge weight dg min is known a priori: • the maximum value of graph edge weight dg max is known a priori: • heuristic cost function h(N) fulfilling the requirement (3) and ( 4) is known, • total f cost function for each node N can be written as follows: where 0 ≤ w < 1 is the L* algorithm coefficient, which is constant during the graph searching process.The f cost function is allowed to be expressed by the floating-point values.
The knowledge of the dg min and dg max seems to be the most limiting, especially when dg cost depends on many arguments; not only the length of the path, and because dg cost has to fulfill restriction (5), the cost function has to be bounded below.Furthermore, because the equation of dg cost is known, the dg min cost is known a priori.In the simplest path planning problem, the dg cost depends on the distance between the nodes on the map.Therefore, dg min is the shortest distance between two adjacent nodes.In more complex problems, the dg min has to be determined by the analysis of the cost function variability.
The knowledge of dg max is not necessary for the L* algorithm optimality.It is only useful for the determination of the number of buckets for the open list priority queue-in the same way as in the bucket based A* algorithm.If we do not know the dg max a priori, the infinite list of buckets has to be used, but the L* algorithm maintains the optimality.

The Open List Structure
Because h L (N) < h(N), the L* algorithm is less informed than the A* algorithm [14], it means that each node expanded by the A* algorithm will also be expanded by the L* algorithm.
If the heuristic cost function h L (N) = wh(N) is used, the difference of the f cost between two adjacent nodes N and N (N is the successor of N) which are connected with the edge in the current spanning tree can be expressed according to the equation: Marking df as a minimum difference between f (N ) and f (N) in the whole graph, it can be written that: Because for each pair of adjacent nodes the difference of the total f cost is positive and bigger than or equal to the value (1 − w)dg min , the list of nodes that need to be expanded, called the open list O, can be organized in a table of non-sorted bidirectional sublists (buckets) S: Each bucket S is the set of nodes with the f cost value from a specific f cost range.The bucket S i can be written as follows: where s is the interval (step) of the buckets.The interval of the buckets depends on the value of w coefficient (more details in Section 5).The example of the open list was shown in Table 1.
All of the nodes in Table 1 are shown in N j i configuration where i is the number of the node, j is the number of its predecessor in the current spanning tree.The open list is organized in the form of a table of unsorted bidirectional buckets.In order to determine which bucket S is appropriate for node N, the following equation is used: The idea of the L* algorithm is to keep each bucket unsorted and fulfill the admissibility restriction.In the subsequent part, the only considered version of the graph searching algorithm will be this one which also fulfills the monotone restriction.In the A* algorithm, fulfilling the monotone restriction means that after selecting any node for the expansion and deleting it from the open list, the optimal path to this node has already been found and this node will never be back on the open list [17].In the L* algorithm, fulfilling the monotone restriction causes the same property as for the A* algorithm.
In the L* algorithm the buckets are non-sorted by the value of the f cost.Therefore, while selecting the nodes in any sequence from the considered bucket, the linear computational complexity can be maintained.Because we also want to keep the optimality of the path, it is necessary to maintain the nodes in the bucket optimal at the moment of accessing the bucket for the first time.The proposed method to keep the nodes (in the current bucket) optimal is to provide that when any node is taken for expansion from the considered bucket, its neighbors are added to one of the next buckets, never to the same bucket.If they were added to the same bucket, the priority queue would be damaged because of the possibility of existing the multiple paths to the same node.In the classic bucket based A*, the neighbor can be added to the same bucket as the parent.While, in the L* algorithm, the searching of the bucket is omitted.The problem is to find the appropriate value of the buckets interval s in order to fulfill the monotone and admissibility restriction.The interval s is strictly dependent on the minimum df cost increase between two adjacent nodes.
In the following part, it will be proven that for s ≤ df , the L* algorithm fulfills both monotone and admissibility restriction, and provides finding the optimal path with the linear computational complexity.

The L* Algorithm-Step by Step
The L* algorithm is presented in a comparison to the A* algorithm.The comparison is presented in Table 2.The A* algorithm is shown in the case that both admissibility and monotone restrictions are fulfilled.
In the first step of the L* algorithm, the open list is initialized.Required parameters for the open list building  are computed-the f cost of the start node f 0 = h(N s ) and the minimum difference of the f cost of two adjacent nodes df in the whole graph.With the use of these two parameters, the open list is divided into a set of empty buckets (line 020).Then the start node is placed in the first position of the first bucket (line 030) and is added to a spanning tree.
The currentBucketReadIdx variable is set to 1 and the main while-loop begins reading the nodes from the first bucket.
In each iteration, one node from the bucket is collected and deleted from the currently set bucket (line 060).It does not matter which node from the bucket will be collected, but for simplification, it was assumed that only the first node is always available.While adding a new node to the bucket, it will also be added to the first position.
The first step after acquiring the node from the open list is to check whether it is the goal node (lines 070-100).If the goal node is selected, then, the algorithm exits the whileloop (lines 090 and 260) and reconstructs the path (lines 270-280).
If a node selected for the expansion (line 060) is not a goal node, its successors are visited similarly to the A* algorithm.Newly visited nodes (line 120) are added to the buckets corresponding to their f cost values (lines 130-150).If the node was visited before and if its new g cost is lower than its current g cost (registered in the current spanning tree), it is deleted from the previous bucket and added to another one, always at the first position (lines 160-210).
After computing all of the nodes adjacent to the currently expanded node N, the algorithm selects for expansion the next node from the bucket indexed by the value of currentBucketReadIdx if the next node in the current bucket exists.Otherwise, it goes to the next non-empty bucket (line 246).The next while-loop iteration begins with collecting the first node from the bucket marked with the current value of index currentBucketReadIdx.
Leaving the while-loop is possible in one of two ways: • that the algorithm finds the path from N s to N g and exits the loop by jumping to the label A, • that the algorithm does not find the path from N s to N g because this path does not exist; then, the algorithm leaves the while-loop due to the lack of any more nodes on the open list (one node is deleted from the open list in each iteration and does not return to the open list, therefore, if the graph is finite, the open list becomes empty if the path from the start node to the goal node does not exist).
Depending on that which way the algorithm exited the while-loop, the value of variable pathExist is different.Therefore, the L* algorithm returns a reconstructed path if it exists or returns failure otherwise.

The Open List Operations
The main difference between the A* algorithm and the L* algorithm is the structure of the open list and the heuristic cost function.The heuristic cost function of the L* algorithm should be less informed than in the A* algorithm (the coefficient w < 1).It causes that after selecting an appropriate value of the interval of the buckets s, it is not necessary to determine the node with minimum f cost in the bucket.The open list is organized as a table of bidirectional sublists (called buckets).Each bucket stores only the pointer to the first node in the bucket and provides the direct access only to the first node in the bucket.The rest of the bucket is organized in the form of pointers attached to each node (typical for bidirectional lists).Each node stores the pointer to the parent node in the bucket and the pointer to the child node in the bucket.Each node also stores the bucket number which it is stored in.
The operations which the L* algorithm executes on the open list are the standard bidirectional list operations: • adding a new node to the open list (the insL() procedure), • deleting a node from the open list (the delL() procedure), • getting the first node from the current bucket and deleting it from the open list (the firstL() procedure).
The procedure of adding a new node N to the open list can save this new node on any available position of the bucket corresponding to the f cost of the node (from the point of view of the L* algorithm admissibility).However, only for simplification, it was assumed that the algorithm has a direct access only to the first node in each bucket.For this reason, the new node can be stored only in the first position of the bucket which corresponds to its f cost.The complexity of adding a new node to the open list is O (1).
The procedure of deleting a node N from a bucket S of the open list is executed when the L* algorithm detects a better path (with the lower g cost) than the path currently stored in the current spanning tree.It is necessary to know what is the parent node N p and the child node N c of the node N in the bucket S.These values are assigned to the node when it is added to the open list for the first time.It is also necessary to know which bucket the node N is stored in.The complexity of this procedure is O (1).
The procedure of acquiring the first node in the bucket and deleting it from the open list firstL() requires the same operations as the procedure delL() described above.For firstL() procedure the node which has to be deleted is located in the first position of the list.The complexity of this procedure is O(1).

Proof of the L* Algorithm Admissibility and the Monotone Restriction
Fulfilling the monotone restriction for the A* algorithm means that when selecting for expansion the lowest f cost node from the open list, the optimal path to this node has already been found.
The L* algorithm is developed based on such kind of heuristic function h which fulfills the monotone restriction (4) for the A* algorithm.It can be modified to obtain a heuristic function which provides fulfilling the monotone restriction in the L* algorithm with the open list structured according to the method described in Section 4. In the L* algorithm, we assume that the heuristic function fulfills the monotone restriction.For this reason, there it is not necessary to put the closed nodes to the open list again.There is also no need to come back to the closed buckets.In this case, first, the monotone restriction will be proven.

Theorem
The L* algorithm which uses the heuristic function h L less informed than the heuristic function h fulfilling the requirements (3) and ( 4): where w is the constant coefficient such that 0 ≤ w < 1, returns the optimal path from the start node N s to any node N that it selects for expansion if the bucket interval s of the open list is lower than or equal to the lowest possible increase df of the f cost between two adjacent nodes N and N : where N is the successor of N in the optimal spanning tree.
Proof We assume that the node N 0 is selected for expansion from the bucket S k : The f cost of the node N 0 is f (N 0 ) = g(N 0 ) + wh(N 0 ).In order to prove that the g cost of this node g(N 0 ) is optimal, we show that if in one of the following iterations a node N 1 (which has the edge e(N 1 , N 0 ) − N 0 is a successor, N 1 is predecessor) is selected for expansion, the new cost g new (N 0 ) is greater than or equal to g(N 0 ).One of the following options is possible: • the node N 1 is in the same bucket as the node N 0 , we can write: • the node N 1 is in the further bucket than N 0 , we can write: The node N 1 cannot be located in the previous bucket than N 0 because (according to the code of the algorithm presented in Table 2) when a current bucket becomes empty, then, the algorithm goes to the next non-empty bucket and never goes back.
If the node N 1 with the f cost f (N 1 ) = g(N 1 ) + +wh(N 1 ) is connected with an edge to the node N 0 (which is visited), it is necessary to check whether a new path to N 0 via N 1 is better than the path registered in the current spanning tree.A new g cost of the node N 0 is computed: Based on that, we can write the difference between the new g cost and the previous g cost of the node N 0 : We know that N 1 belongs to the same or the further bucket than N 0 .Thus, according to the Eqs.17 and 18, we can write: Equation 21 corresponds to the worst option-when the nodes N 1 and N 0 belong to the same bucket, and the difference of their f costs is the difference between the lower and upper bound of the f cost of this bucket.
From the Eqs.14 and 15 we know that: Including Eqs.21 and 22 in Eq. 20, we have: We know that s ≤ df (15).Given so, we can write: Equation 24 is equivalent to a conclusion, that it is not possible to obtain a new path to the node N 0 (which has already been selected for expansion in one of the previous iterations), such that the new cost g new (N 0 ) of the path to N 0 via any node N 1 (selected for expansion later than N 0 ) is better than the cost of the node N 0 at the moment when it was chosen for expansion and deleted from the open list.It was proven that when the L* algorithm selects any node from the current bucket for expansion, the lowest g cost path to this node has already been found (every node in the current bucket is optimal).This node will never go back to the open list.Fulfilling the requirements ( 14) and ( 15) the L* algorithm provides that although the nodes from one bucket can be taken for the expansion in any sequence, the monotone restriction of any two adjacent nodes is fulfilled and the lowest g cost path to any node selected for expansion has already been found.Following this, it will be proven that the L* algorithm fulfilling the monotone restriction always returns the optimal path from the start node to the goal node if it exists.

Theorem (admissibility restriction)
The L* algorithm fulfilling the monotone restriction always returns the optimal path from the start node to the goal node if it exists or returns failure otherwise.
Proof We note that the L* algorithm can terminate only if: • it finds the path from the start node to the goal node, • the open list is empty and there are no more nodes for expansion.
If the graph is finite, there is a finite number of nodes which have the f cost lower than cost f (N g ).The L* algorithm expands all available nodes till the open list is empty.If it does not find the path, it terminates and returns failure.In the case of a finite graph, in each iteration, the L* algorithm adds to the open list the finite number of the successors and deletes from the open list one node which is currently expanded.It means that the L* algorithm must find the path to the goal node before the open list becomes empty if the finite path exists.
In the case of an infinite graph, it is not possible to return failure because an infinite branch of the spanning tree exists.If the path from the start to the goal exists, the algorithm must find it.
We proved that the L* algorithm must find a path from the start node to the goal node if it exists, instead of returning failure.Now we prove that the path which was found is optimal.
We know that the L* algorithm fulfilling the monotone requirement finds the optimal path to any node that it selects for expansion.Therefore, when it selected the N g node for expansion, the optimal path to this node was found.Thus, when L* terminated by selecting N g from the open list, the optimal path to this node was found.
In the case of a finite graph the L* algorithm, in the pessimistic case, finds the path to the goal in the last iteration (if the path exists).In the case of an infinite graph, on the open list, there is always at least one node from the optimal path.In the beginning, it is the start node, when it is expanded-all its successors-including the second point of the optimal path, and so on.Because each node has a finite number of successors and each edge has the cost dg(N, N ) ≥ dg min , there is a finite number of nodes which have the cost f lower than the cost f (N g ) + s.It means that when the L* algorithm selects the goal node for expansion, the optimal path to the goal node is found.
To sum up, for the use of the L* algorithm, it is necessary to determine the w parameter which fulfills the requirement: Then, the interval of the buckets can be computed depending on the values of w and dg min with the use of the equation: Fulfilling the requirements (25) and (26) always maintains the correctness of the algorithm (the optimality of the final path) and the linear computational complexity with respect to the number of nodes in the graph.
The selection of the w coefficient affects the number of iterations of the L* algorithm (the strength of the heuristic function) and the number of empty buckets on the open list.The bigger the w coefficient is, the less iteration the L* algorithm has to perform.However, the bigger the w coefficient is, the lower the interval of the buckets s becomes (the number of empty buckets may grow up).To find a balance between this two features, the suggestion (based on the experimental results) is to select the w value between 0,99 and 0,9999.It causes a slight increase in the number of iterations (while comparing with the A* algorithm) but the number of empty buckets is relatively small and does not affect the performance of the L* algorithm.For lower values of the w coefficient, the L* is less efficient.

Computational Complexity
In the A* algorithm, while adding or deleting a node from the open list, it is necessary to perform various operations which increase the computational complexity.In the best case, it is O(nlog(n)) where n is the total number of nodes in the graph.Due to increased requirements for the time of computation and necessity of processing large amounts of data while operating on large maps, lowering the complexity of the graph searching algorithm can significantly improve the calculation time of the path planning process.
In the L* algorithm, the operations of adding or deleting a node from the open list require a constant number of basic operations and their complexity is O(1).The remaining operations which are in fact the same as in the A* algorithm also do not depend on the open list size.Their computational complexity is also O (1).
The only non-constant operations are: • the for-loop (line 110 in Table 2) whose execution time depends on the number of available adjacent nodes of the node selected for the expansion (this is also a feature of A* algorithm) but in the most of the path planning problems the number of successors is constant or can be bounded above), • the procedure of incrementing the variable current-BucketReadIdx which depends on the number of empty buckets, numerical tests showed that there is usually a small number of empty buckets.Therefore, this nonconstant number of operations can be omitted.
None of these non-constant operations depend on the number of nodes on the open list.In the pessimistic case, the number of basic operations while generating the successors in the for-loop is constant (each node has a constant number of successors in the graph), and the number of increments of the currentBucketReadIdx variable is constant in each iteration.Because in the pessimistic case the while-loop repeats n times (algorithm needs to explore all of the nodes to reach the goal node in the last iteration), the number of basic operations of the whole algorithm can be expressed as: where: n-number of nodes in the graph, k preprocconstant number of basic operations before entering the main while-loop, k postproc -constant number of basic operations after exiting the main while-loop, k mainconstant number of basic operations in a single iteration of the main while-loop.
Because G CC (n) can be upper bounded by the linear function F CC (n) = Cn (where C is a constant value), it can be written that the computational complexity of the L* algorithm is expressed as: (28)

State Complexity
The required memory resources of the L* algorithm depend on the implementation of the open list.In Section 4.5 one of the best possible implementations of the open list is presented.We note that in each iteration, the open list contains only the nodes with the f cost between f and f + 2dg max + s where f is the lower boundary of the first non-empty bucket and dg max is the largest weight of the edge in the graph: where N 1 is the maximum f cost node and N 2 is the lowest possible f cost node on the open list (lower bound of the current bucket) in a given iteration.For this reason, the number of required buckets can be significantly reduced.The best implementation is the use of the one-dimensional table containing the pointers only to the first node of each bucket.The size of the table is determined by the difference between the lowest and the largest f cost on the open list in each iteration.It can be upper-bounded by 2dg max + s.Given so, the size of the table K S representing the open list can be expressed as: Then, if the appropriate absolute bucket number S(N) calculated for the node N according to Eq. 13 is greater than K S , assuming that the buckets are numbered from 1 to K S , the appropriate index of the bucket S K (N) can be obtained from the following equation: The rest of each bucket is organized in the structure of the bidirectional list.Assuming that n is the number of nodes in the graph, the number of memory cells required for the L* algorithm implementation can be expressed as: The function G SC (n) can be upper-bounded by F SC (n) = Cn (where C is a constant value), therefore, the state complexity of the L* algorithm can be expressed as: (33)

Comparison of the Execution Time of the L* Algorithm and the A* Algorithm
Although the L* algorithm has a linear computational complexity, better than commonly used graph searching algorithms, it is necessary to note that the L* algorithm is always less informed than the A* algorithm.Therefore, the main disadvantage of the L* algorithm is the necessity of visiting slightly more nodes than the A* algorithm.In this subsection, the analysis of the L* and A* algorithms approximated execution time will be performed with the use of an example of the path planning problem for the mobile robot on a flat 2D map with randomly placed obstacles.

Estimation of the Number of Iterations in the A* Algorithm and the L* Algorithm
The time of execution of both algorithms was estimated with the use of the following assumptions: • a graph edge weight is expressed as dg(N 1 , N 2 ) == L N1,N2 , where L N1,N2 is the Euclidean distance between two adjacent nodes N 1 and N 2 , • the heuristic function h(N) = wL N,Ng , where L N,Ng is the distance between N node and goal node, the coefficient w = 1 for A* algorithm and 0 ≤ w < 1 for L* algorithm, fulfills the admissibility and monotone restriction, • the location of the obstacles on the map is randomized but with the constant average density-it causes that for each node N whose distance to the start node N s is sufficiently large, it can be written that the cost of the optimal path from start to N can be expressed as g(N) ≈ bL Ns,N , where b can be expressed as b = g(N g )/L Ns,Ng (b is always greater than or equal to 1), • the number of required iterations k is expressed by the number of nodes with the f cost lower than the g cost of the goal node g(N g ).Thus, it can be written that k |I |, where: Assuming these requirements, the f cost of the optimal path to the node N can be expressed as: Because g(N g ) = bL Ns,Ng , the I set can be written as: Because b ≥ w, the I set can be upper-bounded by I B set expressed as: Assuming that c is the average density of the nodes on the unit of the workspace area, the total number of nodes within the area of the bounding ellipse can be expressed as: Assuming that for the A* algorithm w = 1, the upper bound of the number of iterations k A performed by the A* algorithm can be found from Eq. 36: Assuming that w < 1, Eq. 36 provides the upper bound of the number of iterations performed by the L* algorithm: An example of the boundary ellipse (36) and the true boundary curve (35) is presented in Fig. 1.Assuming that for the A* algorithm the range of the f cost on the open list is r f (fulfills the restriction (1) for s = 0), the number of nodes on the open list for the A* algorithm in the last iteration can be expressed as:

Estimation of the Number of Nodes on the Open List for the A* Algorithm
Analogously, the number nodes in the last iteration of the L* algorithm can be expressed as: where L/L B coefficient represents the circuit ratio of the boundary ellipse and the true boundary curve of expanded nodes.

Execution Time Comparison
In order to estimate the profit of the use of the L* algorithm compared to the A* algorithm, it is necessary to assume the single operation time.It was assumed that t L is the time required for a single while-loop in the L* algorithm.The time of execution of a single while-loop in the A* algorithm consists of a constant part t A (which is nearly the same as for the L* algorithm), and the part depended on the size of the open list.The single f cost comparison (performed during heap operations) is indicated as t h .The total time needed by the A* algorithm for a single whileloop execution can be expressed as t A + t h log 2 q A .It is the time of the longest while-loop so assuming that the open list size is constant during the execution of the A* algorithm, the total time of execution of the algorithm can be estimated by k A (t A + t h log 2 (q A )).In consequence, the relation between the time of execution of the L* and A* can be written as follows: Equation 42 can be used to determine the conditions (L Ns,Ng , w, c, b) when the L* algorithm is more efficient than the A* algorithm.
The presented method of estimation of the execution time and the numerical tests confirmed that the L* algorithm with w coefficient close to 1 always needs less time than the A* algorithm to determine the optimal path (except very short paths).
Each map was tested with different L Ns,Ng distance values.In all tests, we used standard, 8-directional propagation.In the A* algorithm the open list was built with the use of binary heap structure (version 1-A*(H)).In test no. 4 we compared the L* algorithm with the A* algorithm with the heap based open list as well as with the A* algorithm with the bucket based open list.The interval of the buckets was the same as for the L* algorithm.Each bucket was organized with a bidirectional list searched node-by-node (version 2-A*(B)).The L* algorithm was implemented as a traditional serial algorithm.The experiments were run on the computer with configuration: Intel(R) Core (TM) i7-4720HQ CPU @2,60 GHz, 16 GB of RAM, 64-bit operating system.Both algorithms were implemented in C++.The programming framework was the same.In this test, a grid type map with randomly placed obstacles was used.Map sizes were 1100 × 1100, 2200 × 2200, 3300 × 3300, 4400 × 4400 and 5500 × 5500.Obstacle occurrence probability p obs was 5, 10 and 15%.The w coefficient for this test was set to 0,9999.The heuristic cost function was the Euclidean distance from a given node to the goal node: The cost of each edge was dependent only on the distance between the nodes connected by this edge: For comparison of the empirical experiments with the estimated values obtained from the equations presented in Section 5.4, the average computation time was estimated: • the constant time of performing an expansion of the node taken from the open list by the L* algorithm, t L = 0, 000160 ms,    For computation of values t A , t L and t h a microbenchmark test was performed.We used average time values for different types of maps (maze maps, room maps, random maps, Starcraft and Warcraft maps ([Online] http:// www.movingai.com/benchmarks/),2.5D maps including terrain height).According to these values, it was possible to estimate the relationship between the time of the A* algorithm execution and the time of the L* algorithm execution.In the process of computing the estimated execution time ratios, the actual value (from the experiment) of b coefficient was used.The coefficient |I |/|I B | was set to 0,46.It is the average value of the occupancy grid map with randomly placed obstacles with p obs value from 5 to 15%.The coefficient L/L B was set to 0,92.
The results are shown in Table 3 and Fig. 2. The example of the path is presented in Fig. 3.In test no. 1 the A* algorithm needed 71-114% more time than the L* algorithm for finding the optimal path.The L* algorithm was faster, although it had to perform more iterations than the A* algorithm.The number of iterations grows nonlinearly with the distance between the start node and the goal node.In the worst case, the L* algorithm had to perform about 1% more iterations than the A* algorithm.This value depends on the value of w coefficient.The bigger the w coefficient is, the fewer iterations the L* algorithm has to perform.However, the interval of the buckets s becomes lower, and the number of empty buckets may grow up.
The size of the open list grows linearly in the function of the distance between the start and the goal node.In test the open list raised to 11264 nodes (the heap had 14 levels) for L Ns,Ng = 5000 and p obs = 0, 05.It means that the getFirstHeap() procedure had to perform up to 13 f cost comparisons to rebuild the structure of the heap.In the case of adding a new node or changing the position of the visited node, the A* algorithm had to perform fewer operations than in the procedure of deleting the top node.Because all of these heap operations are not present in the L* algorithm, it is faster than the A* algorithm.

Test 2
In the 2nd test, we used the occupancy grid map with randomly placed obstacles, similar to the test no. 1.The difference was in the method of dg cost calculation.In test 2, the cost of each edge was increased in the area close to the obstacles: The coefficient k obs was dependent on the distance to the obstacles.It was set to 1 if no obstacles were present in the neighborhood of the node N and it was greater than 1 if the node N was close to the obstacles.The closer to the obstacles the node was, the greater the value of k obs was.Test 2 was performed on 4000 × 2500 map filled with the obstacles with the probability p obs = 0, 01 or 0,02.The w coefficient of the L* algorithm was set to 0,99.The heuristic cost function was the same as in test no. 1 (43).The startto-goal Euclidean distance was 1000, 2000 and 3000.The coefficient |I |/|I B | was set to 0,37.The coefficient L/L B was set to 1,55.The average r f value was computed as the weighted average value of dg for the cells with obstacles and without obstacles.The results of this experiment are presented in Table 4 and Fig. 4. The example of the path found by both algorithms with respect to the map of the k obs parameter is shown in Fig. 5.
The experimental results showed that the L* algorithm is faster than the A* algorithm for such kind of map.The A* algorithm needed approximately from 1.8 up to 2 times more time than the L* algorithm for executing the procedure of pathfinding.The open list of the A* algorithm reached the number of 44000 nodes (16 heap levels).The number of iterations of the L* algorithm in the worst case was 5% bigger than in the A* algorithm.This value could be decreased by increasing the w coefficient, but it could lead to the growth of the number of empty buckets (due to big differences in the weights of graph edges).

Test 3
In test no. 3 the 2.5D map was used.The map was obtained from the Mars surface digital elevation data.Based on the data from Google Mars ([Online] https://www.google.com/mars/) and NASA ([Online] http://marstrek.jpl.nasa.gov/) the map of 1000 × 1000 cells was prepared.The selected area was located near to the Huygens crater (Fig. 6).In test no.3, it was assumed that the cost of each graph edge dg depends on the distance between the nodes (map cells) and the height difference between the cells according to the equation: where w Hg is the coefficient which represents the robot sensitivity to the height differences.The absolute value of the height difference was added to the edge cost in order to provide that the algorithm would avoid the height differences.The heuristic cost function was represented only by the Euclidean distance to the goal node (42).The graph searching was repeated for different path lengths.The coefficient w Hg was set to 10.The results of the execution time are presented in Table 5 and Fig. 7. Figure 8 shows the path obtained by both algorithms for the L Ns,Ng = 100 with respect to the map of average dg cost calculated for each cell.
The L* algorithm was faster than the A* algorithm in test 3. Due to the bigger differences in dg costs, the open list size increased significantly (to ∼6400 when the start-togoal distance was 900).However, the time execution ratio was lower than in the 1st test because the searched area was lower than in test no. 1 and the iterations ratio k A /k L was lower than in test no. 1.

Test 4
In this test, standard grid-type maps were used.Each map was tested in four versions-scaled 1× , 2×, 4× and 8×.
The maps and the paths (start and goal coordinates) were taken from the research of Sturtevant ([Online] http://www.movingai.com/benchmarks/).For each map, 30 paths were taken into account.The results show average values for these 30 paths.The w coefficient for the L* algorithm was 0,99.
The results are presented in Table 6.The example of the paths found by both algorithms is presented in Fig. 9.
The results confirmed that the L* is faster than the A* algorithm for different path planning scenarios.We also compared the results with the A* algorithm with bucket based open list with the bucket interval the same as the bucket interval in the L* algorithm.In some cases, this implementation of the bucket based A* was faster than the heap based A* version (the maps are quite small, the number of nodes in the buckets is not significant).Nevertheless, in all examples the L* was the fastest algorithm.It was confirmed that the larger the map is, the more the advantage of the bucket based A* algorithm is decreased (many nodes in each bucket has to be checked).The L* algorithm is not sensitive to the number of nodes in each bucket.Moreover, for the larger map sizes, its advantages are more significant.

Conclusion
The performed tests confirmed the advantages of the L* algorithm.The experimental research results showed that the difference between A* and L* execution time depends on the distance between the start and goal node and the shape and positions of the obstacles.The proposed method of dividing the whole open list into buckets (without necessarily determining the lowest f cost node within the bucket) can be implemented in more types of graph searching algorithms instead of selecting the minimum f cost node from the open list.
Our method of estimation of the execution time provides results close to experimental values.The difference becomes lower for the longer paths.For shorter paths, our assumption that the size of the open list is constant for the A* algorithm seems to be too strong.For this reason, the estimated values may not be accurate.Most of the tests were performed on a flat terrain with the use of the cost functions depending only on the distance between the nodes.It is planned to expand the cost function and to include the elements depending on the terrain height, roughness and confidence factor, according to the workspace description proposed in [15].Moreover, it is planned to verify the method for the nonholonomic robot path planning problem using the method of creating the graph nodes presented in [16] and for the dynamic path planning problem.
Although we tested the L* algorithm only for simple graphs for the path planning problem, the method is general-it works for any type of graph (finite or infinite) and ensures that the optimal path is found.In order to achieve the optimality of the L* algorithm, the strength of the heuristic function has to be appropriately decreased (with the use of the w coefficient).Our tests confirm that simply assuming w close to 1 (from 0,99 to 0,9999), the serial L* can be faster than the A* up to 2 times.The values of w bigger than 0,9999 can cause that the number of iterations of the L* algorithm decreases, but the number of empty buckets raises and the performance of the L* algorithm is reduced.
All of the tests were performed with the serial version of the L* algorithm.The future works will also consider the parallel L* algorithm (the open list processing and the nodes generation can be parallelized) with the use of GPU computation.This feature could improve the efficiency of the L* algorithm significantly.
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http:// creativecommons.org/licenses/by/4.0/),which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
Ng < b/wL Ns,Ng }. (36) The I B set corresponds to the ellipse with the focal points located in the nodes N s and N g and the longer axis length b/wL Ns,Ng .Therefore, the number of visited nodes can be expressed as k < |I B |.The |I |/|I B | ratio depends on the value of the coefficient w, the distance between the start node and the goal node and a method of graph nodes creation (4-directional propagation, 8directional propagation, 16-directional propagation).
It is necessary to determine the size of the open list for the A* algorithm because the number of operations in the main while-loop depends on the size of the open list.It is not necessary to estimate the open list size for L* algorithm

Fig. 1
Fig. 1 An example of the path found by the L* algorithm with the expanded nodes and open list nodes

Fig. 2 1 Fig. 3
Fig. 2 The execution time of the L* and the A* algorithm in test no. 1

Fig. 4 2 Fig. 5
Fig. 4 Execution time of the L* and the A* algorithm in test no. 2

Fig. 6
Fig. 6 The Mars map used in test no. 3 (a tested area elevation data, b tested area with respect to Huygens crater)

Fig. 7 3 Fig. 8
Fig. 7 The execution time of the L* and the A* algorithm in test no. 3

Table 1
The structure of the open list (example)

Table 3
Test no.1-experimental results

Table 4
Test no.2-experimental results

Table 5
Test no.3-experimental results

Table 6
Test no.4-experimental results ) map name, (2) map size after scaling, (3) heap based A* algorithm experimental execution time, (4) experimental number of iterations of the heap based A* algorithm, (5) bucket based based A* algorithm experimental execution time, (6) L* algorithm experimental execution time, (7) experimental number of iterations of the L* algorithm, (8) experimental g cost of the goal node, (9) experimental execution time ratio for heap based A* and L* algorithm, (10) experimental execution time ratio for bucket based A* and L* algorithm