Safe Haskell | Safe-Inferred |
---|
- data Door
- doors :: [Door]
- data State = Doors {}
- start :: State
- hide :: Trans State
- choose :: Trans State
- open :: Trans State
- type Strategy = Trans State
- switch :: Strategy
- stay :: Strategy
- game :: Strategy -> Trans State
- data Outcome
- result :: State -> Outcome
- eval :: Strategy -> Dist Outcome
- simEval :: Int -> Strategy -> RDist Outcome
- firstChoice :: Dist Outcome
- switch' :: Trans Outcome
- type StrategyM = Door -> Door -> Door
- stayM :: StrategyM
- switchM :: StrategyM
- evalM :: StrategyM -> Dist Outcome
Documentation
Steps of the game:
- hide the prize
- choose a door
- open a non-open door, not revealing the prize
- apply strategy: switch or stay