Copyright | (c) Peter Lu 2018 |
---|---|
License | GPL-3 |
Maintainer | chippermonky@gmail.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- selector :: Monad m => [NodeSequenceT g p o m a] -> NodeSequenceT g p o m a
- weightedSelector :: (RandomGen g, Ord w, Num w, Random w, Monad m) => [(w, NodeSequenceT g p o m a)] -> NodeSequenceT g p o m a
- utilitySelector :: (Ord a, NotUnit a ~ True, Monad m) => [NodeSequenceT g p o m a] -> NodeSequenceT g p o m a
- utilityWeightedSelector :: (RandomGen g, Random a, Num a, Ord a, NotUnit a ~ True, Monad m) => [NodeSequenceT g p o m a] -> NodeSequenceT g p o m a
- flipResult :: Monad m => NodeSequenceT g p o m a -> NodeSequenceT g p o m a
- result :: Monad m => Status -> NodeSequenceT g p o m ()
- condition :: Monad m => Bool -> NodeSequenceT g p o m ()
- rand :: (RandomGen g, Monad m) => Float -> NodeSequenceT g p o m ()
Documentation
selector :: Monad m => [NodeSequenceT g p o m a] -> NodeSequenceT g p o m a Source #
dry run nodes in the input list until one has status SUCCESS and returns that node
weightedSelector :: (RandomGen g, Ord w, Num w, Random w, Monad m) => [(w, NodeSequenceT g p o m a)] -> NodeSequenceT g p o m a Source #
makes a weighted random selection on a list of nodes and weights this only runs the selected node
utilitySelector :: (Ord a, NotUnit a ~ True, Monad m) => [NodeSequenceT g p o m a] -> NodeSequenceT g p o m a Source #
returns the node sequence with maximum utility this will dry execute ALL nodes in the input list
utilityWeightedSelector :: (RandomGen g, Random a, Num a, Ord a, NotUnit a ~ True, Monad m) => [NodeSequenceT g p o m a] -> NodeSequenceT g p o m a Source #
makes a weighted random selection on a list of nodes with weights calculated using their monadic return value this will dry execute ALL nodes in the input list
decorators run a nodesequence and do something with it's results
flipResult :: Monad m => NodeSequenceT g p o m a -> NodeSequenceT g p o m a Source #
flips the status of a node
| creates a node that has the input status