strips-0.1.0.0: resolver using strips algorithm

Algorithms.Strips

Synopsis

# Documentation

extractPlan :: (ActionType a, Term b) => NodeInfo a b -> [a] Source #

extract actionType to goal from NodeInfo

strips :: (ActionType a, Term b) => [Action a b] -> [b] -> [b] -> NodeInfo a b Source #

search appropriate plan to be executed by strips algorithm with actions, start and goal conditions you pass.

class (Eq a, Show a) => ActionType a Source #

class (Eq b, Ord b, Show b) => Term b Source #

data Action a b Source #

Constructors

 NoAction Action FieldsactionType :: atype of actionpreCondition :: [b]list of conditions that must be satisfied before the action is executedpostCondition :: [b]list of conditions that must be satisfied after the action is executedactionCost :: Intrequired cost to execute action

Instances

 (Eq b, Eq a) => Eq (Action a b) Source # Methods(==) :: Action a b -> Action a b -> Bool #(/=) :: Action a b -> Action a b -> Bool # (Show b, Show a) => Show (Action a b) Source # MethodsshowsPrec :: Int -> Action a b -> ShowS #show :: Action a b -> String #showList :: [Action a b] -> ShowS #

data NodeInfo a b Source #

Constructors

 NoNodeInfo NodeInfo FieldsrealCost :: Inttotal cost actually required to reach the current nodescore :: Intthe sum of actual cost and estimate costdiffCount :: Intcount of condition difference between goal and current node (= estimate cost)diff :: [b]condition difference between goal and current nodecondition :: [b]current conditionaction :: Action a baction to go to next nodenext :: NodeInfo a bnext node

Instances

 (Eq a, Eq b) => Eq (NodeInfo a b) Source # Methods(==) :: NodeInfo a b -> NodeInfo a b -> Bool #(/=) :: NodeInfo a b -> NodeInfo a b -> Bool # (Show a, Show b) => Show (NodeInfo a b) Source # MethodsshowsPrec :: Int -> NodeInfo a b -> ShowS #show :: NodeInfo a b -> String #showList :: [NodeInfo a b] -> ShowS #