Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- Implementation of the IDA* search algorithm
- data Succ label length node = Succ {}
- data Search f a l node = Search {}
- type Result a l = Maybe [l]
- data SearchResult a l
- dfSearch :: (Foldable f, Num a, Ord a) => Search f a l node -> node -> a -> [l] -> a -> SearchResult a l
- search :: forall f a l node. (Foldable f, Num a, Ord a) => Search f a l node -> node -> Maybe [l]
- data SelfAvoid node = SelfAvoid (Set node) node
- selfAvoid :: Ord t => Search [] a l t -> Search [] a l (SelfAvoid t)
- selfAvoidRoot :: a -> (a, Set a)
Documentation
dfSearch :: (Foldable f, Num a, Ord a) => Search f a l node -> node -> a -> [l] -> a -> SearchResult a l Source
Depth-first search up to depth bound
,
and reduce results from the leaves.
IDA* search
All paths to goal(s) are returned, grouped by length.
Only searches as deep as necessary thanks to lazy evaluation.
TODO: Possible memory leak, solving hard cubes eats a lot of memory.
selfAvoidRoot :: a -> (a, Set a) Source