board-games-0.3: Three games for inclusion in a web server

Safe HaskellSafe
LanguageHaskell2010

Game.Tree

Synopsis

Documentation

data T move state Source #

Instances
Functor (T move) Source # 
Instance details

Defined in Game.Tree

Methods

fmap :: (a -> b) -> T move a -> T move b #

(<$) :: a -> T move b -> T move a #

(Read state, Read move) => Read (T move state) Source # 
Instance details

Defined in Game.Tree

Methods

readsPrec :: Int -> ReadS (T move state) #

readList :: ReadS [T move state] #

readPrec :: ReadPrec (T move state) #

readListPrec :: ReadPrec [T move state] #

(Show state, Show move) => Show (T move state) Source # 
Instance details

Defined in Game.Tree

Methods

showsPrec :: Int -> T move state -> ShowS #

show :: T move state -> String #

showList :: [T move state] -> ShowS #

build :: (state -> [(move, state)]) -> state -> T move state Source #

mapNodesLeaves :: (state0 -> state1) -> (state0 -> state1) -> T move state0 -> T move state1 Source #

mapTrees :: (a -> b) -> [(c, a)] -> [(c, b)] Source #

maximumMove :: Ord score => T move score -> move Source #

maximumMoveFast :: Ord score => T move score -> move Source #

minimumMove :: Ord score => T move score -> move Source #

minimumMoveFast :: Ord score => T move score -> move Source #

pruneVolume :: Int -> T move state -> T move state Source #

prune the tree roughly to a fixed volume

pruneDepth :: Int -> T move state -> T move state Source #

prune the tree to a fixed depth

selectDeepSubTree :: Eq move => [move] -> T move state -> T move state Source #

selectSubTree :: Eq move => move -> T move state -> T move state Source #

state :: T move state -> state Source #

subTrees :: T move state -> [(move, T move state)] Source #

scanChildren :: ([(move, T move state)] -> [(move, T move state)]) -> T move state -> T move state Source #