/usr/share/doc/libghc-lambdahack-doc/html/Game-LambdaHack-Client-AI-Strategy.html is in libghc-lambdahack-doc 0.5.0.0-2build5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Game.LambdaHack.Client.AI.Strategy</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Game-LambdaHack-Client-AI-Strategy.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Game-LambdaHack-Client-AI-Strategy.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">LambdaHack-0.5.0.0: A game engine library for roguelike dungeon crawlers</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Game.LambdaHack.Client.AI.Strategy</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>AI strategies to direct actors not controlled directly by human players.
No operation in this module involves the <code>State</code> or <code>Action</code> type.</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:Strategy">Strategy</a> a</li><li class="src short"><a href="#v:nullStrategy">nullStrategy</a> :: <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:liftFrequency">liftFrequency</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a</li><li class="src short"><a href="#v:.-124-">(.|)</a> :: <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a</li><li class="src short"><a href="#v:reject">reject</a> :: <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a</li><li class="src short"><a href="#v:.-61--62-">(.=>)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a</li><li class="src short"><a href="#v:only">only</a> :: (a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a</li><li class="src short"><a href="#v:bestVariant">bestVariant</a> :: <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a</li><li class="src short"><a href="#v:renameStrategy">renameStrategy</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a</li><li class="src short"><a href="#v:returN">returN</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> a -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a</li><li class="src short"><a href="#v:mapStrategyM">mapStrategyM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (a -> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> b)) -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> m (<a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> b)</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Strategy" class="def">Strategy</a> a <a href="src/Game-LambdaHack-Client-AI-Strategy.html#Strategy" class="link">Source</a> <a href="#t:Strategy" class="selflink">#</a></p><div class="doc"><p>A strategy is a choice of (non-empty) frequency tables
of possible actions.</p></div><div class="subs instances"><p id="control.i:Strategy" class="caption collapser" onclick="toggleSection('i:Strategy')">Instances</p><div id="section.i:Strategy" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Strategy:Monad:1" class="instance expander" onclick="toggleSection('i:id:Strategy:Monad:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a></span> <a href="src/Game-LambdaHack-Client-AI-Strategy.html#line-25" class="link">Source</a> <a href="#t:Strategy" class="selflink">#</a></td><td class="doc"><p>Strategy is a monad. TODO: Can we write this as a monad transformer?</p></td></tr><tr><td colspan="2"><div id="section.i:id:Strategy:Monad:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-62--62--61-">(>>=)</a> :: <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> (a -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> b) -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> b <a href="#v:-62--62--61-" class="selflink">#</a></p><p class="src"><a href="#v:-62--62-">(>>)</a> :: <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> b -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> b <a href="#v:-62--62-" class="selflink">#</a></p><p class="src"><a href="#v:return">return</a> :: a -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a <a href="#v:return" class="selflink">#</a></p><p class="src"><a href="#v:fail">fail</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a <a href="#v:fail" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Strategy:Functor:2" class="instance expander" onclick="toggleSection('i:id:Strategy:Functor:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a></span> <a href="src/Game-LambdaHack-Client-AI-Strategy.html#line-37" class="link">Source</a> <a href="#t:Strategy" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Strategy:Functor:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:fmap">fmap</a> :: (a -> b) -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> b <a href="#v:fmap" class="selflink">#</a></p><p class="src"><a href="#v:-60--36-">(<$)</a> :: a -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> b -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a <a href="#v:-60--36-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Strategy:Applicative:3" class="instance expander" onclick="toggleSection('i:id:Strategy:Applicative:3')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#t:Applicative">Applicative</a> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a></span> <a href="src/Game-LambdaHack-Client-AI-Strategy.html#line-40" class="link">Source</a> <a href="#t:Strategy" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Strategy:Applicative:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:pure">pure</a> :: a -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a <a href="#v:pure" class="selflink">#</a></p><p class="src"><a href="#v:-60--42--62-">(<*>)</a> :: <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> (a -> b) -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> b <a href="#v:-60--42--62-" class="selflink">#</a></p><p class="src"><a href="#v:-42--62-">(*>)</a> :: <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> b -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> b <a href="#v:-42--62-" class="selflink">#</a></p><p class="src"><a href="#v:-60--42-">(<*)</a> :: <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> b -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a <a href="#v:-60--42-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Strategy:Foldable:4" class="instance expander" onclick="toggleSection('i:id:Strategy:Foldable:4')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Foldable.html#t:Foldable">Foldable</a> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a></span> <a href="src/Game-LambdaHack-Client-AI-Strategy.html#line-22" class="link">Source</a> <a href="#t:Strategy" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Strategy:Foldable:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:fold">fold</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a> m => <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> m -> m <a href="#v:fold" class="selflink">#</a></p><p class="src"><a href="#v:foldMap">foldMap</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a> m => (a -> m) -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> m <a href="#v:foldMap" class="selflink">#</a></p><p class="src"><a href="#v:foldr">foldr</a> :: (a -> b -> b) -> b -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> b <a href="#v:foldr" class="selflink">#</a></p><p class="src"><a href="#v:foldr-39-">foldr'</a> :: (a -> b -> b) -> b -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> b <a href="#v:foldr-39-" class="selflink">#</a></p><p class="src"><a href="#v:foldl">foldl</a> :: (b -> a -> b) -> b -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> b <a href="#v:foldl" class="selflink">#</a></p><p class="src"><a href="#v:foldl-39-">foldl'</a> :: (b -> a -> b) -> b -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> b <a href="#v:foldl-39-" class="selflink">#</a></p><p class="src"><a href="#v:foldr1">foldr1</a> :: (a -> a -> a) -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> a <a href="#v:foldr1" class="selflink">#</a></p><p class="src"><a href="#v:foldl1">foldl1</a> :: (a -> a -> a) -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> a <a href="#v:foldl1" class="selflink">#</a></p><p class="src"><a href="#v:toList">toList</a> :: <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> [a] <a href="#v:toList" class="selflink">#</a></p><p class="src"><a href="#v:null">null</a> :: <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:null" class="selflink">#</a></p><p class="src"><a href="#v:length">length</a> :: <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> <a href="#v:length" class="selflink">#</a></p><p class="src"><a href="#v:elem">elem</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> a => a -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:elem" class="selflink">#</a></p><p class="src"><a href="#v:maximum">maximum</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> a => <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> a <a href="#v:maximum" class="selflink">#</a></p><p class="src"><a href="#v:minimum">minimum</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> a => <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> a <a href="#v:minimum" class="selflink">#</a></p><p class="src"><a href="#v:sum">sum</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a => <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> a <a href="#v:sum" class="selflink">#</a></p><p class="src"><a href="#v:product">product</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> a => <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> a <a href="#v:product" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Strategy:Traversable:5" class="instance expander" onclick="toggleSection('i:id:Strategy:Traversable:5')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Traversable.html#t:Traversable">Traversable</a> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a></span> <a href="src/Game-LambdaHack-Client-AI-Strategy.html#line-22" class="link">Source</a> <a href="#t:Strategy" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Strategy:Traversable:5" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:traverse">traverse</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#t:Applicative">Applicative</a> f => (a -> f b) -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> f (<a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> b) <a href="#v:traverse" class="selflink">#</a></p><p class="src"><a href="#v:sequenceA">sequenceA</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#t:Applicative">Applicative</a> f => <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> (f a) -> f (<a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a) <a href="#v:sequenceA" class="selflink">#</a></p><p class="src"><a href="#v:mapM">mapM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (a -> m b) -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> m (<a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> b) <a href="#v:mapM" class="selflink">#</a></p><p class="src"><a href="#v:sequence">sequence</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> (m a) -> m (<a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a) <a href="#v:sequence" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Strategy:Alternative:6" class="instance expander" onclick="toggleSection('i:id:Strategy:Alternative:6')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#t:Alternative">Alternative</a> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a></span> <a href="src/Game-LambdaHack-Client-AI-Strategy.html#line-49" class="link">Source</a> <a href="#t:Strategy" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Strategy:Alternative:6" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:empty">empty</a> :: <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a <a href="#v:empty" class="selflink">#</a></p><p class="src"><a href="#v:-60--124--62-">(<|>)</a> :: <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a <a href="#v:-60--124--62-" class="selflink">#</a></p><p class="src"><a href="#v:some">some</a> :: <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> [a] <a href="#v:some" class="selflink">#</a></p><p class="src"><a href="#v:many">many</a> :: <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> [a] <a href="#v:many" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Strategy:MonadPlus:7" class="instance expander" onclick="toggleSection('i:id:Strategy:MonadPlus:7')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:MonadPlus">MonadPlus</a> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a></span> <a href="src/Game-LambdaHack-Client-AI-Strategy.html#line-44" class="link">Source</a> <a href="#t:Strategy" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Strategy:MonadPlus:7" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:mzero">mzero</a> :: <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a <a href="#v:mzero" class="selflink">#</a></p><p class="src"><a href="#v:mplus">mplus</a> :: <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a <a href="#v:mplus" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Strategy:Show:8" class="instance expander" onclick="toggleSection('i:id:Strategy:Show:8')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> a => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> (<a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a)</span> <a href="src/Game-LambdaHack-Client-AI-Strategy.html#line-22" class="link">Source</a> <a href="#t:Strategy" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Strategy:Show:8" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a] -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:nullStrategy" class="def">nullStrategy</a> :: <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Game-LambdaHack-Client-AI-Strategy.html#nullStrategy" class="link">Source</a> <a href="#v:nullStrategy" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:liftFrequency" class="def">liftFrequency</a> :: <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a <a href="src/Game-LambdaHack-Client-AI-Strategy.html#liftFrequency" class="link">Source</a> <a href="#v:liftFrequency" class="selflink">#</a></p><div class="doc"><p>Strategy where only the actions from the given single frequency table
can be picked.</p></div></div><div class="top"><p class="src"><a id="v:.-124-" class="def">(.|)</a> :: <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a <span class="fixity">infixr 2</span><span class="rightedge"></span> <a href="src/Game-LambdaHack-Client-AI-Strategy.html#.%7C" class="link">Source</a> <a href="#v:.-124-" class="selflink">#</a></p><div class="doc"><p>Strategy with the actions from both argument strategies,
with original frequencies.</p></div></div><div class="top"><p class="src"><a id="v:reject" class="def">reject</a> :: <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a <a href="src/Game-LambdaHack-Client-AI-Strategy.html#reject" class="link">Source</a> <a href="#v:reject" class="selflink">#</a></p><div class="doc"><p>Strategy with no actions at all.</p></div></div><div class="top"><p class="src"><a id="v:.-61--62-" class="def">(.=>)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a <span class="fixity">infix 3</span><span class="rightedge"></span> <a href="src/Game-LambdaHack-Client-AI-Strategy.html#.%3D%3E" class="link">Source</a> <a href="#v:.-61--62-" class="selflink">#</a></p><div class="doc"><p>Conditionally accepted strategy.</p></div></div><div class="top"><p class="src"><a id="v:only" class="def">only</a> :: (a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a <a href="src/Game-LambdaHack-Client-AI-Strategy.html#only" class="link">Source</a> <a href="#v:only" class="selflink">#</a></p><div class="doc"><p>Strategy with all actions not satisfying the predicate removed.
The remaining actions keep their original relative frequency values.</p></div></div><div class="top"><p class="src"><a id="v:bestVariant" class="def">bestVariant</a> :: <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> <a href="Game-LambdaHack-Common-Frequency.html#t:Frequency">Frequency</a> a <a href="src/Game-LambdaHack-Client-AI-Strategy.html#bestVariant" class="link">Source</a> <a href="#v:bestVariant" class="selflink">#</a></p><div class="doc"><p>When better choices are towards the start of the list,
this is the best frequency of the strategy.</p></div></div><div class="top"><p class="src"><a id="v:renameStrategy" class="def">renameStrategy</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a <a href="src/Game-LambdaHack-Client-AI-Strategy.html#renameStrategy" class="link">Source</a> <a href="#v:renameStrategy" class="selflink">#</a></p><div class="doc"><p>Overwrite the description of all frequencies within the strategy.</p></div></div><div class="top"><p class="src"><a id="v:returN" class="def">returN</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> a -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a <a href="src/Game-LambdaHack-Client-AI-Strategy.html#returN" class="link">Source</a> <a href="#v:returN" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#v:return">return</a></code>, but pick a name of the single frequency.</p></div></div><div class="top"><p class="src"><a id="v:mapStrategyM" class="def">mapStrategyM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (a -> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> b)) -> <a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> a -> m (<a href="Game-LambdaHack-Client-AI-Strategy.html#t:Strategy">Strategy</a> b) <a href="src/Game-LambdaHack-Client-AI-Strategy.html#mapStrategyM" class="link">Source</a> <a href="#v:mapStrategyM" class="selflink">#</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>
|