New algorithm for digital way-finding map

The purpose of this research was to develop a new algorithm to find the shortest pathfinding that can be implemented on a digital way-finding map. The standard algorithm used for pathfinding is Dijkstra and A*. But for a large search space, the A* and Dijkstra need a large amount of CPU and memory resources. Whereas pathfinding algorithm is usually embedded in devices with limited memory. So, we make the algorithm which requires less memory. In order to make a less memory algorithm, we modify the Breadth First Search (BFS) and Bidirectional Search (BS) algorithm and use the cost graph and modify adjacency matrix. We have tried to reduce the runtime of our algorithm using the modify adjacenvy matrix. The proposed algorithm is then tested for path finding at the institution that has several buildings with many floors where staircase position is not uniform on each floor. The test results were then compared with Djikstra, A*, IDA*, and HPA*. The experiment results showed that our algorithm is faster than the A*, IDA* and Djikstra algorithm. This is because the algorithm that we designed only need to make modify adjacenvy matrix once, so it can reduce the computation time. However, for cases involving multiple floors, our algorithm is not faster than HPA *, but approached. From the test results can be concluded that our algorithm can be implemented in the case of searching the route on buildings that have many floors.


Introduction
Digital wayfinding maps are interactive touch screen monitor used in buildings or campuses to provide directional information to user or visitors [1]. Way-finding or path-finding algorithm describes a process to finding the optimal path from some location to destination location, which means to find the shortest, the simplest or the cheapest path. Digital wayfinding system usually embedded in devices with limited memory. So we need the pathfinding algorithm which need less amount of CPU and memory resources.
Many pathfinding algorithms have been studied for more than a decade. The popular for heuristicbased algorithms are A* [2] and Dijkstra's algorithm [3]. The two algorithms return an optimal path [4]. The A* algorithm is made by Hart and Nilsson [5]. Dijkstra's is simple than A*, but A* algorithm is faster than Dijkstra's algorithm. This is because Dijkstra's implement the Greedy Best First Search algorithm while A* implement the Best First Search algorithm. Dijkstra's disadvantage is there spent a lot of time waste because it was a blind search [6,7] algorithms. HPA* works by creating abstract graph based on two-dimensional grid. The working principle of HPA* is divides the search problem into some smaller sub-problems, then caching results for each sub-problem [10,11]. Botea [9] shows that HPA * can be 10 times faster than A * [9]. The disadvantages of HPA*are the cost increases significantly when adding a new abstraction layer. The other researchers saw that A* could not solve a large problem because it was running out of memory. To reduce space requirements in A*, Iterative Deepening A* (IDA*) developed by Korv in 1985 [12]. IDA* can obtain optimal solutions such a A* but require linear memory usage in the cost of the solution. IDA* implement the idea of iterative deepening search algorithm. The advantages of IDA* is require less memory than A*. But the disadvantages of IDA* is wasted search.
This paper presents a new algorithm to make the pathfinding process faster and to reduce the memory requirements simultaneously. In our previous study [13], we have investigated the minimal hardware and software requirements for the implementation of the Digital Interactive Wayfinding Map. In this research, we modify the Breadth First Search (BFS) and Bidirectional Search (BS) algorithm to make a fast and less memory algorithm, to reduce the runtime of the proposer algorithm, we use the cost graph and modify adjacency matrix. Our algorithm is then tested for searching optimal path at the institution that has several buildings with many floors where staircase position is not uniform on each floor. We compare the test results with Djikstra, A*, HPA*, and IDA*.

Method
The algorithm starts with start node and search in all four directions of node (up, down, left and right). This process continues until destination node is reached. In the process, cost of each node which is equivalent to the index value to achieve that node is stored. The shortest path is searched by backtracking from the destination node back to the initial node through nodes that have a minimum value compared to its neighbour nodes. There are several resemblances between the algorithm developed in this study and the algorithm presented by Ahlam [14] , Geroge [15], and Nawaf [16], although there are some important modifications.
To demonstrate the principle of the propose algorithm, we will use the illustration of its application in cases such as the graph in figure 1. In the picture there are one start node (S) and four destination nodes (A-D). The program will add 8 intersection nodes (F -L) as in figure 2. The steps sequence of the propose algorithm is as follows.
 Creating an cost graph containing the index value from the starting node to each other node until all node is filled. Figure 3 show example of a cost graph.    Making the "modify adjacency matrix" between nodes in the cost graph that has been created as shown in figure 4. This matrix informs which nodes are interconnected and from those nodes, which nodes are closer to the starting node.  For example, to find a route to node B from node S, it is done from column / row B. In the column / row B, we will look for the smallest value of the cell. In the row / column B we can be seen the smallest value is 27 on a row / column I. This means that from node B must go to node I. Furthermore search the smallest value in the row / column I who turns 22 on row / column H . This Means that from node I must go to the node H. By continuing this process, it will get the path that must be taken is B -I -H -G -F -E -S. To find a route from S to B, then the route from B to S can be reversed order. Due to the implementation of this algorithm is the "You Are Here Map", then the starting node will always be the same. So that the "The modify adjacency matrix between node" quite made one time only. To find a route from node S to other nodes quite repeat step 3 only. That's why our algorithm can work faster than any other algorithm for this wayfinding case. We modified the above algorithm using the bi-directional Search principle if the start node and destination node are located on different floors (See Figure 4).

Results and discussion
To verify our proposed algorithm, we performed two steps test. First, we compared the path length from our algorithm with Dijkstra's, A*, HPA* and IDA* algorithm; second, we measure the computational cost from five algorithms. The proposed algorithm is then tested for path finding at the institution that has several buildings with many floors where staircase position is not uniform on each floor. The algorithm was tested on the implementation of the wayfinding system in the building (You Are Here Map). The characteristics of the "You Are Here Map" is have a single starting node (You Are Here node) and has many target node (the location of each room in the building).

Comparison the path length
Firstly, our proposed algorithm we compared with the other algorithm to test its ability to produce the best route. We tested it in 10 cases shown in table 1. From the table 1, we can see that our proposed algorithm can produce the path as well as another algorithm. Because our algorithm uses the principle of BFS, the completeness and optimality characteristics are also owned by our proposed algorithm.

Comparison in time
In the table 2 we present the results of average execution time from the five tested algorithms. Testing is done in the case of "You Are Here Map", with the amount of testing is 200 times. From the experimental results presented in Table 2, we can see that HPA* is the fastest algorithm and almost two times faster than the Dijkstra algorithm. However, our algorithm is not faster than HPA*, but approached. And our algorithm can be faster than Dijkstra, A* and IDA* algorithm. These results are . He also reported that the execution time of IDA* is the longest and the fastest is HPA*.
Our algorithm works fast because for every run it does not need to repeat the entire process from step 1, but simply repeat step 3 only. So, our algorithm only need to make modify adjacenvy matrix once and the same matrix can be used repeatedly, so it can reduce the computation time (See Table 1). This can be compared with the djikstra algorithm that works as follows [2].
Step 1: The distance value to each node is set. The current node is the starting node. The state of all nodes is unvisited.
Step 2: Checked all neighboring nodes of the current node: The tentative distance (Dt) through the current node is calculated If Dt is smaller than D (previously recorded distance) then D = Dt The current node is marked as visited (the shortest distance are found) Step 3 : The next current node is selected from unvisited node that have the smallest distance.
Step 4 : Algorithm will stop after all nodes are marked as visited. If not, then the algorithm will be repeated from step 2. The Dijkstra algorithm must reset all memory (make all nodes marked as unvisited) and repeat the entire process from step 1 for each path search. Likewise with the A * search algorithm that has the following work processes [5].
Step 1 : The first parent node is the starting node Step 2: Extended child node from the parent node Step 2: Calculate the ( ), ( ), and ( ) value for new add child nodes Step 3 : Checking whether there is a destination node between new child node. If not, then proceed to step 4, but if the destination node is found, then backtracking from the destination node to the initial node through the node has the smallest ( ) value Step 4: Selected the smallest ( ) value from all child nodes as the next parent node. Repeat again from Step The A* search algorithm should start the search process from the starting node, re-create the search tree from the starting node and the value of ( ) for each node must be recalculated for each path search. This causes the A * search algorithm to require a longer search time than our algorithm.
An example of the search results of the algorithm we designed is shown in Figure 5. From figure 5 it can be seen that our algorithm can be implemented in the case of route searching on buildings that have many floors (See Figure 5).

Conclusion
We have presented an alternative algorithm for path finding problems. Based on test results, we can see the proposed algorithm able to produce an optimal path like the other algorithm. From the second test, we can see the proposed algorithm is faster than Dijkstra, A* and IDA* algorithm. However, our algorithm is not faster than HPA *, but approached. From the test results can be concluded that our algorithm can be implemented in the wayfinding case on buildings that have many floors.