A* search algorithm practice