This code implements the A star(A*) search.