Add an implementation of A* algorithm.