úÎ!CË>»Q      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPNone&'./=?@AHPVX_÷QRSTUVWXMTL equivalent of Smarties.Base(c) Peter Lu, 2018GPL-3chippermonky@gmail.com experimentalNone&'./=?@AHPVX_smarties#behavior tree sequence monad type g is rng type p is perception type (state) o½ is output type behavior tree output list is ordered from right to left, i.e. use foldr when applying this looks a lot like (StateT (g,p) Writer o) but behaves differently when nodes fail smarties4reduce a list of actions and apply it the perception smarties4run a node sequence and throw out its monadic output smartiesXrun a node sequence several times using its output to generate the next perception state smartiessame as runNodeSequenceTequenceTimesL except reduces the final input with its output and only returns this result smartiessmartiessmartiessmartiessmartiesreturns the perceptionsmartiessets the perceptionsmartiesadd an item to the outputsmartiesreturns the rngsmarties sets the rng   #MTL equivalent of Smarties.Builders(c) Peter Lu, 2018GPL-3chippermonky@gmail.com experimentalNone&'./=?@AHPVX_'´smartiestransformer variant"smartiesNSelfAction nodes are Action nodes that also apply the action to the perception%smartiestransformer variant(smartiesJCondition nodes have status SUCCESS if they return true and FAIL otherwise+smartiestransformer variant.smarties=Action nodes add to the output and always have status SUCCESS1smartiestransformer variant5smarties&Perception nodes modify the perception9smartiestransformer variant<smartiesJUtility nodes produce a monadic return value and always have state SUCCESS?smarties!convert UtilityT to NodeSequenceT@smartiesconvert Utility to NodeSequenceAsmarties%converts PerceptionT to NodeSequenceTBsmarties#converts Perception to NodeSequenceCsmarties$converts ConditionT to NodeSequenceTDsmarties"converts Condition to NodeSequenceEsmarties!converts ActionT to NodeSequenceTFsmartiesconverts Action to NodeSequenceGsmartiesVconverts SelftActionT to NodeSequenceT WARNING: may be deprecated in a future releaseHsmartiesTconverts SelftAction to NodeSequence WARNING: may be deprecated in a future release* !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGH*<=>9:;56781234./0+,-()*%&'"#$ !@?BADCFEHG MTL equivalent of Smarties.Nodes(c) Peter Lu, 2018GPL-3chippermonky@gmail.com experimentalNone&'./=?@AHPVX_<‘ YsmartiesÞit's easy to forget that utility must be the last monadic return value of a NodeSequence to be understood by utility selectors this type family is used to prevent accidental usage of `instance Ord ()` in utility selectorsZsmarties¤intended use is "sequence $ do" This is prefered over just "do" as it's more explicit. sequence :: NodeSequenceT g p o m a -> NodeSequenceT g p o m a sequence = idIsmartiesRdry run nodes in the input list until one has status SUCCESS and returns that node[smartiesJsmartiesbmakes a weighted random selection on a list of nodes and weights this only runs the selected nodeKsmartiesareturns the node sequence with maximum utility this will dry execute ALL nodes in the input listLsmarties 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 listMsmartiesflips the status of a nodeOsmartiesAcreates a condition node SUCCESS if input is true FAIL otherwisePsmarties7creates a node with random status based on input chancePsmartieschance of success " [0,1]IJKLMNOPIJKLMNOPNone&'./=?@AHPVX_=—H  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP\      !"#$$%&&'(()**+,,-../00123345667889:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWsmarties-1.2.1-inplace Smarties.BaseSmarties.BuildersSmarties.NodesPaths_smartiesSmarties NodeSequence NodeSequenceTrunNodeSequenceTStatusSUCCESSFAILSelfActionableapplyreduceexecNodeSequenceTexecNodeSequenceTimesTexecNodeSequenceTimesFinalizeTrunNodeSequenceexecNodeSequenceexecNodeSequenceTimesexecNodeSequenceTimesFinalize getPerception setPerception tellOutput getGenerator setGenerator$fSelfActionablea->$fMonadRandomNodeSequenceT$fMonadTransNodeSequenceT$fMonadNodeSequenceT$fAlternativeNodeSequenceT$fApplicativeNodeSequenceT$fFunctorNodeSequenceT $fEqStatus $fShowStatus SelfActionTSimpleSelfActionT SelfActionSimpleSelfAction ConditionTSimpleConditionT ConditionSimpleConditionActionT SimpleActionTAction SimpleAction PerceptionTSimplePerceptionTConditionalPerceptionT PerceptionSimplePerceptionConditionalPerceptionUtilityTSimpleUtilityTUtility SimpleUtility fromUtilityT fromUtilityfromPerceptionTfromPerceptionfromConditionT fromCondition fromActionT fromActionfromSelfActionTfromSelfActionselectorweightedSelectorutilitySelectorutilityWeightedSelector flipResultresult conditionrandversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileNameNotUnit mapAccumRMweightedSelection