The Utilization of The Best First Search Algorithm in The Solution of The Traveling Salesman Problem Case In City X

The heuristic search is part of a method that is often used by people in solving the case of finding the shortest route, the search for the shortest path to solve the distance problem can be converted into a graph structure, where the point represents the city and the side represents the path that connects the two cities. The General and test process is one of the methods in which the case testing uses heuristic functions. The problem that often occurs in this case is to find the shortest path of a city and the various available paths. The process of this method is in the form of determining the distance between cities which can be seen from how far it is traveled so that it can take an alternative to find the shortest path. The main purpose of solving this case is to find alternative ways to find the shortest path and have benefits in saving time and costs so that optimal results are obtained. The use of algorithms in General and test can be used as an information system in making decisions on a travel route. The use of the best first search method in general and tests can be used to search for the shortest path to obtain maximum results


Introduction
Optimization is the search for variable values that are considered optimal, effective and efficient to achieve the desired results. Many optimization problems that arise in everyday life, one of which is the problem of vehicle routing (Vehicle Routing Problem / VRP). In the search for routes that must be traversed, there are still many people who use manual maps, be it for the path that must be passed from one location to another or to simply look for a certain location or place [1]. Search is a process of finding a solution to a problem through a set of possible state spaces. The state space is a space that contains all possible states. In computer science, a search algorithm is described broadly as an algorithm that accepts input in the form of a problem and produces a solution to the problem, which is usually obtained by evaluating several possible solutions. The set of all possible solutions to a problem is called the search space. The brute-force search algorithm or uninformed search uses a simple and very intuitive method in the search space, while the informed search algorithm uses heuristics to apply knowledge about the structure of the search space to try to reduce the amount of time spent in searching (Nilson. J, 1998). Best-First Search is a method that generates a node from the previous node. Best-first search selects a new node that has the lowest cost among all leaf nodes (nodes at the deepest level) that have ever been generated. Determination of the best node is done by using a function called the evaluation function f(n). The best-first search evaluation function can be an approximate cost of a node towards the goal or a combination of the actual cost and the estimated cost [2].
The search for an efficient travel path is one of the important things that must exist, because with the planning of a travel path it will provide convenience in determining the path to be taken with the shortest distance so that it can save time, effort and costs.
Finding the shortest route is a complicated problem. One of the problems in finding the shortest route is finding the shortest route from a number of tourist objects and the distance between tourist objects that must be traversed by tourists who depart from point A and stop at each tourist attraction place exactly once and return to point A. Theoretically, if any tourist attraction then there are (n factorial) routes that must be searched. Suppose there are = 6 then 720 routes must be searched and if the number = 30 then the route to be searched is more than 4 x 1030, because it will take a very long time to search for the route [3].
The Traveling Salesman Problem is a problem that is easy to describe but difficult to solve, namely the problem of how to determine the shortest distance in traveling past certain points where one point can only be passed once and the journey must return to the first point [4]. According to Research [5] In solving this game, the A* algorithm helps find a state space search solution by considering the total cost of the path that is tracked according to the node to be traversed. According to Exposure [6] This method is different from the generation and testing method. The difference lies in the feedback on the testing procedures performed to help determine solutions that can be directly omitted in the search space. Therefore, the generation of subsequent states is highly dependent on feedback from the test procedure.
There are four things that must be considered to build a system or solve a particular problem: 1. Define the problem clearly. 2. Analyze the problem. 3. Collect and present knowledge (knowledge). 4. Choose the best problem solving technique and use it for a particular problem [7]."Best first" refers to the algorithm exploring the node with the best "value" first. An evaluation function is used to assign a value to each candidate node. In this algorithm, the search space is evaluated according to the heuristic function expressed by the following equation: f' (n ) h'( h) Description: f'(n ) heuristic function h'( n) evaluation function used to estimate how well each node resurrected. To implement this search algorithm, two lists are needed, namely: OPEN to manage nodes that have been generated but have not been evaluated and CLOSE to manage nodes that have been generated and have been evaluated. The best first search algorithm is as follows: 1. Enter the starting node into OPEN 2. OPEN contains the starting node and CLOSE is still empty 3. Enter the starting node into CLOSE and its successor in the OPEN list 4. Repeat the following steps until the goal is found and there are no more node to be developed [8].

Research Methodology
Good research must be conceptualized with a methodological process. The research concept must be systematic in order to get good grades. The stages of solving the shortest route case in this study are:

Results and Discussion
Analysis and design in this case is a route to reach a goal which is to find the shortest route. A tourist wants to have recreation in 4 tourist attractions in the city of XYZ, where the condition is that tourists only have to pass the route 1 time. There are 4 routes to be taken, namely City 1234 with a city distance of AB=15, AC=28, AD=34, BC=27, BD=26 CD=33. The purpose of this route calculation is to find the shortest route for tourists to only visit a tourist spot once without any repetition. The route is said to be valid if the path traversed is not 0. If the route is valid, then the distance is calculated and then compared to get a very optimal distance. Below is the distance between cities.

Figure 2.Travel Route
Looking for the shortest path, tourists can see the central points to be visited by selecting the destination of the tourist attractions to be visited by looking at the distance and time required. To get the results, manual calculations are needed using the concept of finding the shortest route using manual calculations with 4 Cities testing in order to obtain: (1) = 4! 2!/(4-2)! = 4! /2! 2! = 24 The flow of travel routes for tourist attractions can be seen in the image below: The process of obtaining numbers from the process of calculating the length of the path is Based on the table above, the first solution generated is ABCD = 75, the second solution is ABDC = 74. It turns out that the next solution is getting smaller resulting in a shorter distance so that the path CABD = 69 is chosen. The final result that must be selected is the shortest path with a path length of 69. Do it for the next step. In the table, the shortest solution is again the same as CABD, CADB or DBAC. To see the final results can also be seen from the Decision Tree below: The weakness of this generate & test technique requires that all possibilities be generated, unless certain conditions are given, for example a tourist spot has been determined. This BSF search can be used as a reference in determining the shortest route to visit tourist attractions.

Conclusion
The final results after testing the Traveling Salesmen Program it can be concluded that: a) The Best first Search method can help tourists determine the shortest route to visit each tourist attraction in City X. b) The benefits obtained from the Best First Search method are in the form of the fastest path that is able to find the shortest alternative and can save time and cost for tourists who want to travel. c) The Best First Search system can be used as a decision-making system so as to obtain optimal results.