hstzaar-0.6: src/AI.hs
-- | Library of AI Players
module AI (aiPlayers) where
import Board
import AI.Utils
import AI.Lame
import AI.Minimax
-- all AI players; default AI is the first one
aiPlayers :: [AI]
aiPlayers = [level0, level1, level2]
level0 = AI { name = "Level 0"
, description = "Randomly selects the next turn."
, strategy = lameStrategy
}
level1 = AI { name = "Level 1"
, description = "Minimaxing alpha-beta depth 2"
, strategy = minimaxStrategy 2
}
level2 = AI { name = "Level 2"
, description = "Minimaxing alpha-beta depth 2-4"
, strategy = (withNPieces $ \numpieces ->
if numpieces>30 then
minimaxStrategy 4
else
minimaxStrategy 2
)
}