Uses the a* algorithm to find a path, and returns a list of positions from start to end. Arguments: start -- start position end -- end position layer -- a grid where zero cells are open and non-zero cells are walls dist -- a distance function dist(a,b) - man
(start,end,layer,dist=manhattan_dist)