Implementation of the A Star Heuristic Search Algorithm in Determining the Shortest Path

ABSTRACT


INTRODUCTION
The solution to finding the shortest route or the shortest path is very interesting to study, many problems can be solved in determining the shortest path. Determination of the shortest path can also be implemented in various trending applications such as vehicle navigation, route planning, robotics, and computer games [1] [2]. Implementing the shortest path can save time, energy, and resources. A Star Algorithm is one method of approach in finding solutions to the shortest path finding problem . This algorithm is a combination of Dijkstra's algorithm and Greedy Best-First Search. This algorithm can provide cost information and estimated remaining costs in determining the shortest path more efficiently. Although the A star algorithm has been carried out significantly in the literature, the implementation and performance analysis of this algorithm in the context of determining the shortest path is still a relevant research focus [3][4] [5][6][7] [8].
Several previous studies have identified that the performance of the A star algorithm depends on various factors, including choosing the right heuristic, graph structure, and the complexity of the area explored [9][10] [11][12] [13]. Therefore, there is a need to better understand the practical implementation of the A star heuristic algorithm in determining the shortest path in real-world scenarios. By combining information from existing literature and empirical experimental results, this study aims to provide deeper insight into the ability and potential of the A star heuristic algorithm in solving the shortest path problem [14][15] [16][17] [18]. This research will implement the A star heuristic algorithm into applications built with the Visual Basic programming language. This study also describes in detail the practicalities of this algorithm in determining the shortest path, this research is expected to provide a better guide to understanding how the A star algorithm can be applied effectively in various real-world application contexts.

RESEARCH METHOD
In many cases it would be much better if a function is defined to be a combination or sum of two or more components, namely g(n) and h(n). The g(n) function is a measure of the costs incurred from an initial state to node (n). The result of g(n) is not the result of estimation but the sum of the costs of implementing each rule along the best path determined by the heuristic function to a node. For the function of h(n) is a measure of the additional costs that must be incurred from node (n) to reach the destination. Note that the function of g(n) cannot be negative because if it is negative then the cycle-reversing path on the graph will look better the longer the number of paths. The mathematical function can be written as follows: is costs that have been issued from the initial state to node (n), h'(n) is estimation of costs incurred from state n or node (n) to the destination. If h = h', then the search process has reached its goal. If g = h' = 0 then f' is random, which means the system cannot be controlled. If g = k, k is a constant and usually has a value of 1, h' = 0, which means that the system uses the best first search technique. The purpose of designing a database server in this application is to record the distance from the starting point to the destination point. Besides that, the database is placed on notepad so that the system can be processed quickly.

RESULTS AND DISCUSSIONS
Below is a picture of an application that has been built with the Visual Basic programming language : The starting point can be determined by filling in letters in the Initial textbox. Figure 4 is the display result for determining the starting point. The coordinates used in this study are limited to 26 coordinates according to the number of letters of the alphabet. This is to limit so that the calculation is not too much. Coordinates are made starting from the letters A to Z. Each coordinate functions as a 2-way weighted graph where A has access to B and vice versa B has access to A.
The end point can be determined by filling in letters in the End textbox. Figure 5 is the display result of determining the End Point. In this section, the results of calculating the closest route to the starting point A and ending point S will be displayed. It can be seen that the weight achieved is 275 with the resulting route being A-B-C-X-I-N-S. Figure 6 is the display result of the closest route search. Figure 6. Display Endpoint determination 4. CONCLUSION Research related to the shortest route A * algorithm has several conclusions, namely the A * algorithm can determine the shortest route from the starting point to the ending point and vice versa from the ending point to the starting point. The application that was built was successful in determining the weight used from the distance of two points. The A* algorithm has a heuristic function in helping to determine the distance from neighboring nodes to endpoints.