Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
2015 Int'l Conference on Intelligent Computing, Electronics Systems and Information Technology (ICESIT-15) Aug. 25-26, 2015 Kuala Lumpur (Malaysia) Applying Dynamic Weight on Theta Star Path-finding Algorithm in 2D Grid Map Le Tran Huu Phuc, and Lee Ki Dong Dijkstra (DA) was introduced to the public by Edsger Dijkstra. By giving a start (source) cell, DA is able to find a shortest path to every cell in the map [1]. DS is a type of pathfinding algorithm that applies the comparison condition to find the path. However, the high cost of computation time is a big problem of Dijkstra. A* is a generic search algorithm which is expanded from Dijkstra by applying a heuristic value. A* explores and exams the cell with the best optimal value and add it on the list. But the path found by this search process looks unnatural. The found path seems to be made by the drunken people [4]. The formula of A* is formula (1) (1) where G is the distance from the start cell to the current cell and H is the estimated distance from the current cell to the goal cell. Theta* was developed by Alex Nash in 2007. This algorithm is a post-smoothing process of the A* algorithm [5]. With the shorter path length, Theta* performs even faster on the process of finding path comparing to other variants of A* such as: AP Theta*, A* PS and FD* [4]. The problem of Theta* is that computation time is more than A* but the path is not guarantee to be the optimal one [19]. Weighted A* is a variant of A* algorithm [5]. In this algorithm, a new parameter called weight will be added to A*’s F formula (2) (2) where G and H is the same as A*, and W is a weight value (0<W<+∞). The weight value will determine the performance of the algorithm. When the applied weight is less than 1, then algorithm concentrates on finding a best optimal path. If weight value equals 0, A* performs like Dijkstra [4]. And applying the weight value is greater than 1 makes the algorithm run faster [19]. HPA* stands for hierarchical path-finding A* algorithm [15], [16]. This method reduces the complexity of the map by dividing the map into the smaller abstract map. These abstract maps are link together into local clusters. At each abstract map, the path-finding algorithm processes to find the optimal path. Then small clusters are grouped together to become some big clusters until the whole map is formed back. Botea et.al proved that HPA* showed to be up to 10 times faster but the increasing in path-length is within 1% [15]. But HPA* is similar to A*, that means the path is not an any-angle path [4]. Abstract--The trade-off between path length and time consuming in the process of path-finding is an interesting research field. Theta* is a path smoothing algorithm which finds a close-tooptimal path with natural look – an any-angle path. [4] But this algorithm cost a quite amount of time in comparison to the original A*. In this article, we introduce an implementation way to reduce the computation time of Theta*. Moreover, we also apply dynamic weight and hierarchical method to Theta* algorithm. And from our experiments’ result, the theory of dynamic weight and hierarchical method can help the Theta* to perform better in finding path-length and running faster. With this fact, in future we can perform deeper analysis on how dynamic and hierarchical method can affect to Theta*. Index Terms-- Dynamic weight, HPA*, path-finding algorithm, Theta*. I. INTRODUCTION Path-finding algorithm is a process of finding a path between two given points in a graph environment. This research topic is used in many fields such as: robotic, game design and network. In the past, path-finding algorithm had to deal with two problems: finding a path between two cells in a graph and the optimal shortest path. In the modern day, there is one more adding problem: find a path within the shortest time. There are several path-finding algorithms have been introduced recently [1], [6], [7], [8], [9]. For example, DeepFirst search, Breadth-First search, Best-First search, Dijkstra, A Star and the most recent path-finding algorithm - Theta Star [9], [10], [11], [12]. All these path-finding algorithms have their own advantages and disadvantages. While some of the algorithms focus on finding the optimal path, others focus on finding a path in the fastest way. There are many ways to reduce the computation time such as applying some different database structures: stack, queue, list and etc [6], [7], [8], [9]. In this paper, we apply a dynamic weight method combining with hierarchical model on the most recent path-finding algorithm – Theta* [3]. And by applying a dynamic weight method on Theta*, we decrease the computation time of the process and keep the increasing of path-length to be small. II. RELATED WORK Deep First Search (DFS) and Breadth First Search (BrFS) are two earliest versions of finding path algorithms. Both of these algorithms focus on finding a path based on the structure of database: stack, queue, list and etc. But they still have a lot of weaknesses on finding a path and costing a lot of time. III. SUGGESTED SOLUTION: APPLYING DYNAMIC WEIGHT AND HIERARCHICAL METHOD Le Tran Huu Phuc and Lee Ki Dong, are with Yeungnam University, South Korea http://dx.doi.org/10.15242/IAE.IAE0815008 In the update vertex algorithm from basic Theta*, Nash et.al only considers about the neighbor cell with the shorter 17 2015 Int'l Conference on Intelligent Computing, Electronics Systems and Information Technology (ICESIT-15) Aug. 25-26, 2015 Kuala Lumpur (Malaysia) path from the current cell [4]. But in reality, this comparing condition will eliminate some possible solutions. He doesn’t consider about the equal value, as in fig. 1. In the 4 directions expansion case, we call A is a current cell. Cell B and C are the north and south cells of A. D is the destination cell. If we only consider about the shorter path, we will eliminate either one of the path A-B-D or A-C-D, as in fig. 2. In the 8 directions expansion case, the same problem happens, as in fig. 3. when the process faces a problem Unlike A*, in Theta*, for each loop, the computer has to check the light of sight between the expanding cell with the parent of the current cell [4]. This step will add more time to find the solution. Moreover, all these previous researches about Weighted A* [1], [3], [4], [18] and [19], a simple weight value is applied from the beginning of the search to the end of the search. The weight is not dynamic in different map environments. If we apply a high value of weight on the complexity area, the process might fail due to some hypothesis introduced by Wilt et.al. [18]. Fig. 1 – update vertex algorithm from Nash Fig. 2 - Expansion in four directions Fig. 3 - Expansion in eight directions In order to solve these mentioned problems, we add an equal condition into the comparing condition in Theta*. And we called this algorithm compared Theta*. Moreover, we applied dynamic weight values on Theta* with a purpose to decrease a computation time cost and also keep a small amount of increasing on path-length. To apply a dynamic weight value, we used HPA* method to divide the map into 2 smaller areas – area contain start cell and area contain destination cell, and each area is applied a specific weight value. The formula of our dynamic weight is described in the formula (3) (3) where G and H is as same as A* in formula (1) and W is a weight value, which is either 0.5 or 2. We called this algorithm Dynamic Weight 2 Theta* because we apply two different weight values: 0.5 and 2.0. 0.5 is http://dx.doi.org/10.15242/IAE.IAE0815008 applied for the area which is contains the destination cell, and 2.0 is applied for the area which is contains the start cell. Moreover, the algorithm called “Author Theta*” is an algorithm that bases on Nash et.al’s Theta*’s pseudo code [4]. This algorithm is our base for comparing these Compared Theta* and Dynamic Weight 2 Theta*’ performance. In this paper, we create an application that user can pick a map containing obstacle cells, a start cell and goal cell. The app is written in Java and tested on Intel Core 2 with 2GB Ram. In the app, we create a class in Java called Node, which have some properties: x, y represents the longitude and latitude position of the cell in the grid map, color to present the status of the map such as: obstacle, goal, start, and path. All of the cell will be combined into a square 2D map size n. The red cells are in the map represent the obstacles cells. The blue cell is the goal – destination cell while green one is the start cell as in fig. 4. The cell has an arrow with the word goal 18 2015 Int'l Conference on Intelligent Computing, Electronics Systems and Information Technology (ICESIT-15) Aug. 25-26, 2015 Kuala Lumpur (Malaysia) cell is a destination cell. The cell has an arrow with the word start cell is a start cell. These cells with white color are the free cells that can be passed through. And the rest cells in the map are these obstacles that can’t be passed. case 4 is the 50x50 cells map. All these sizes of map will have 20% of blocks, which means 20% of these cells are not passable. At each case, we collect three pieces of information: the processed nodes – the number of nodes that the pathfinding processes calculated, the computation time of the process from the beginning of the process to the end of the process, and the path-length of the solution path, which is count by the sum of each path cell’s Euclidean distance to their parents. IV. EXPERIMENT In our experiment, we compare 3 different algorithms: Author Theta*, Compared Theta* and Dynamic Weight 2 Theta* in different sizes of map: case 1 is the 20x20 cells map, case 2 is the 30x30 cells map, case 3 is the 40x40 cells and Fig. 4 - Example of Map Fig. 5 – Case 1 map size 20x20 with 20% blocks Fig. 6 - Case 2 map size 30x30 with 20% blocks http://dx.doi.org/10.15242/IAE.IAE0815008 19 2015 Int'l Conference on Intelligent Computing, Electronics Systems and Information Technology (ICESIT-15) Aug. 25-26, 2015 Kuala Lumpur (Malaysia) Fig. 7 - Case 3 map size 40x40 with 20% blocks Fig. 8 - Case 4 map size 50x50 with 20% blocks V. EXPERIMENT RESULTS & DISCUSSION If we add a weight value which is greater than one into the calculation of F value the run time will be faster but the path is not optimal because of the increasing in its path-length. And if we add a weight value which is smaller than one into the calculation of F value the run time will be slower but the path is closer-to-optimal because of the increasing in accuracy. We found that when we apply the equal condition and the dynamic weight value is either 2 or 0.5, the trade off is positive, as in Table 1, Table 2, Table 3 and Table 4. The path-length does not increase a lot while the run-time is considered shorter, as in fig. 9 and fig. 10. Although the increasing trend of trade-off rate is unstable, but there is a positive point that applying dynamic weight value still reduces the run-time of the algorithm and sometimes make the solution path is closer to be optimal one, as in Table 5. The reason when a dynamic weight Theta* fail is similar to the fail of weighted A* because the relationship between h(n) – the estimate cost of getting from cell n to goal and d*(n) – the number of cells between goal and cell n is weak [18]. And by applying an equal condition on expanding neighbor cell process, we give the algorithm more option to find the optimal path. Before this article, there is no research on that applying dynamic weight on Theta*. The explanation for the fact that there is a trade-off between the path-length and the computation time is stated in previous researches [4], [9] and [18]. The weight value 0.5 is picked because any value <1 doesn’t affect to the optimal path. It just increases the number of number expansion cells [13]. Value 0f 0.5 is in the middle range of 0 and 1 so the increase in expanding cells is not too big but not so small. On the other hand, value of 2 is picked for weight value >1 because this number is average range between 1 and infinite, which means decrease in expanding cells is not too big but not so small [19]. Because of these reasons, weight value 0.5 and 2.0 makes the collected data becomes average. TABLE I RESULT FROM THE CASE 1 http://dx.doi.org/10.15242/IAE.IAE0815008 20 2015 Int'l Conference on Intelligent Computing, Electronics Systems and Information Technology (ICESIT-15) Aug. 25-26, 2015 Kuala Lumpur (Malaysia) TABLE II RESULT FROM THE CASE 2 TABLE III RESULT FROM THE CASE 3 TABLE IV RESULT FROM THE CASE 4 500 Author Theta* 400 Compared Theta* 300 200 Dynamic Weighted Theta* 100 0 20x20 30x30 40x40 50x50 Fig. 9 - Path-length comparison between 3 algorithms Fig. 10 - Run-time comparison between 3 algorithms http://dx.doi.org/10.15242/IAE.IAE0815008 21 2015 Int'l Conference on Intelligent Computing, Electronics Systems and Information Technology (ICESIT-15) Aug. 25-26, 2015 Kuala Lumpur (Malaysia) Fig. 11 – Processed cells comparison between 3 algorithms [12] Robin, “Breadth First Search,” Available online at: http://intelligence.worldofcomputing.net/ai-search/breadth-firstsearch.html#.VTeFJtKqpBc (April 13th, 2015 15:00pm) [13] Chamero, J., “Dijkstra’s Algorithm As a Dynamic Programming Strategy,” Available online at www.intag.org/downloads/ds_006.pdf (April 13th, 2015 15:00pm) [14] Cui, X., Shi, H., “A*-based Pathfinding in Modern Computer Games,” International Journal of Computer Science and Network Security, Vol. 11, No. 1. (2011) [15] Botea, A., Muller M., “Near Optimal Hierarchical Path- Finding,” Journal of Game Development, Volume 1. (2004) [16] Jansen, R. M., Buro M., “HPA* Enhancements,” AAAI Conference on Artificial Intelligence and Interactive Digital Entertainment. (2007) [17] Hansen, A. E., Zhou R., “Anytime Heuristic Search,” Journal of Artificial Intelligent Research 28. (2007) [18] Wilt, C., Ruml, W., “When does Weighted A* Fail?” Proceeding of the Symposium on Combinatorial Search (SoCS-12). (2012) [19] Nash, A., “Any-Angle Path Planning,” Doctor of Philosophy Thesis (Computer Science). The Faculty of the USC Graduate School University of Southern California. (2012) VI. CONCLUSION AND FUTURE WORKS Nowadays, there are many developed path-finding algorithms. The A* is one of the most used one in many fields. Until now, there are many version of A* such as IDA*, D*, LPA* and Theta*. In the Theta* algorithm, the solution path is more natural, faster but less optimal than weighted h-values version of Theta*. In our experiment, we found a method to increase the performance by applying the dynamic weights, hierarchical method and equal condition. As the result of our experiment, we find that our modification way make the pathfinding process run faster but sometimes more optimal than Theta*. Applying Dynamic Weight with hierarchical method make improvement on the solution path and computation cost comparing to the Nash et.al’s Theta* Algorithm. In future work, we will apply dynamic weight on different map areas based on its complexity based on the idea of Wilt et.al in his article [18]. Le Tran Huu Phuc (Hochiminh City, Vietnam. 06/21/29189). In 2009 He studied a bachelor degree in University of Missouri – St.Louis, in USA. His major was Management in Information System. From 2014 to now, he is currently a graduate student in the master program in Yeungnam University, South Korea. His major is Computer Engineering. His major research field is in Artificial Intelligent. REFERENCES [1] Cormen, Thomas H., Leiserson, Charles E., and Rivest, Ronald L., Introduction to Algorithm, McGraw-Hill Companies, Inc. (2009) [2] Putri, S.E., Tulus, and Napitupulu N., “Implemantation and Analysis of Depth-First Search (DFS) Algorithm for Finding the Longest Path.” International Seminar on Operational Research (InteriOR) [3] Nash, A., Koenig, S. and Felner, “A. Theta*: Any-Angle Path Planning on Grids,” In Proceeding of the AAAI Conference on Artificial Intelligent. (2007) [4] Daniel, K. , Nash, A., Koenig, S. and Felner, A., “Theta*: Any-Angle Path Planning on Grids,” Journal of Artificial Intelligence Research 39 (2010) [5] SanGreozan, L., Kiss-Iakab K., Sirbu M., “Comparison of 3 implementations of the A* algorithm,” Creative Math. &INF. (2007) [6] Xi, C., Qi, F., Wei, L., “A New Shortest Path Algorithm based on Heuristic Strategy,” Proceeding of the 6th World Congress on Intelligent Control and Automation. (2006) [7] Magzhan, K., Jani H.M., “A Review and Evaluation of Shortest Path Algorithms,” International journal of scientific & technology research volume 2 (2013) [8] Freeman, J., “Parallel Algorithm for Depth-First Search,” Technical Reports (CIS). University of Pennsylvania. (1991) [9] Patel, A., “Variants of A*”. Available online at: http://theory.stanford.edu/~amitp/GameProgramming/Variations .html (April 11th, 2015 11:00am) [10] Stein, E., “ICS 161: Design and Analysis of Algorithms Lecture notes for February 15, 1996,” Available online at http://www.ics.uci.edu/~eppstein/161/960215.html (April 12th, 2015 13:00pm) [11] Robin, “Depth First Search,” Available online at: http://intelligence.worldofcomputing.net/ai-search/depth-firstsearch.html#.VTeBh9KqpBd (April 13th, 2015 15:00pm) http://dx.doi.org/10.15242/IAE.IAE0815008 22