finish search, including DFS,BFS,uniformalSearch, aStarSearch