Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- data Eval = Eval Int Int
- evaluate :: Ord a => [a] -> [a] -> Eval
- matching :: (C set, Ord a) => Set a -> [a] -> Eval -> set a
- matchingSimple :: Ord a => Set a -> [a] -> Int -> [[Set a]]
- mixedRandomizedAttempt :: (C set, RandomGen g, Ord a) => Int -> set a -> StateT g Maybe [a]
- partitionSizes :: Ord a => Set a -> [a] -> [(Eval, Integer)]
- mainSimple :: T Char -> Int -> IO ()
- mainRandom :: T Char -> Int -> IO ()
- main :: IO ()
- propBestSeparatingCode :: (C set, Ord a) => Int -> set a -> [[a]] -> Bool
Documentation
matching :: (C set, Ord a) => Set a -> [a] -> Eval -> set a Source #
Given a code and an according evaluation, compute the set of possible codes.
The Game.Mastermind game consists of collecting pairs of codes and their evaluations. The searched code is in the intersection of all corresponding code sets.
matchingSimple :: Ord a => Set a -> [a] -> Int -> [[Set a]] Source #
A variant of the game: It is only possible to specify number of symbols at right places.
The results of matching
and matchingSimple
cannot be compared.