Liking cljdoc? Tell your friends :D


Build Status

Little a* pathfinder for 2D binary grids. Diagonals are punished, and distance estimation is performed by default using the manhattan heuristic.


[clj-tiny-astar "0.1.1-SNAPSHOT"]


Clone into a local repository and:

;; this is designed to operate on bounded grids

   [4 4] ;;bounds of the grid (width & height)
   my-predicate ;;predicate that takes a point [x y] and returns whether a cell is walkable
   [0 0] ;;from
   [3 3] ;;to)

;;example result, diagonals are punished:

[[0 0] [1 1] [2 2] [3 3]]

the predicate function takes a point (tuple of x and y).

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close