Implemented bidirectional A* search.