Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
We model the story of the muddy children which is known in many versions. See for example~cite{Littlewood1953:amm},~cite[p.~24-30]{fagin1995reasoning} or~cite[p.~93-96]{DitHoekKooi2007:del}.
Our implementation treats the general case for \(n\) children out of which \(m\) are muddy, but we focus on the case of three children who are all muddy. As usual, all children can observe whether the others are muddy but do not see their own face. This is represented by the observational variables: Agent $1$ observes $p_2$ and $p_3$, agent $2$ observes $p_1$ and $p_3$ and agent $3$ observes $p_1$ and $p_2$.
Synopsis
- mudScnInit :: Int -> Int -> KnowScene
- myMudScnInit :: KnowScene
- knows :: Int -> Form
- nobodyknows :: Int -> Form
- father :: Int -> Form
- mudScn0 :: KnowScene
- mudScn1 :: KnowScene
- mudScn2 :: KnowScene
- mudKns2 :: KnowStruct
- empty :: Int -> KnowScene
- buildMC :: Int -> Int -> Event
- buildResult :: KnowScene
- mudGenKrpInit :: Int -> Int -> PointedModel
- myMudGenKrpInit :: PointedModel
- mudBelScnInit :: Int -> Int -> BelScene
- myMudBelScnInit :: BelScene
Documentation
mudScnInit :: Int -> Int -> KnowScene Source #
The initial knowledge structure, given the total number of children, and the number of muddy children.
myMudScnInit :: KnowScene Source #
The initial structure for 3 muddy children.
nobodyknows :: Int -> Form Source #
A formula to say that none out of \(n\) children knows its own state.
Result after announcing `father 3` in myMudScnInit
.
mudKns2 :: KnowStruct Source #
mudGenKrpInit :: Int -> Int -> PointedModel Source #