-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request for example #744
Comments
Hi Paul,
This is an interesting question. As it happens, the answer to the original Monty Hall problem is not as clear cut as you might think, and therein lies the clue to your problem. In Monty Hall, we really need to know Monty’s policy. If we assume he always chooses a door at random, then the answer is as usually given. But if Monty has a policy of always opening door C if it has a goat (your wife was always going to tell you that taco C has beans), then that changes the answer. If we assume that.
We can model this situation in Figaro with something like this (apologies for incorrect syntax – I’m typing this into an email)
// This particular policy is deterministic, but in general it could be stochastic, so montyPolicy returns an element.
def montyPolicy(steak : Int, guess : Int): Element[Boolean] = if (steak != 3) then Constant(3) else Constant(1)
val steak = FromRange(1,4)
val firstGuess = FromRange(1,4)
val monty = Chain(steak, firstGuess, montyPolicy)
val known = firstGuess ^^ monty // makes a pair
val secondGuess = Decision(known, [1,2,3])
val utility = Apply(secondGuess, steak, (i1: Int, i2: Int) => if (i1==i2) then 1 else 0)
Avi
From: Paul Snively <[email protected]>
Reply-To: p2t2/figaro <[email protected]>
Date: Saturday, May 26, 2018 at 9:43 AM
To: p2t2/figaro <[email protected]>
Cc: Subscribed <[email protected]>
Subject: [p2t2/figaro] Request for example (#744)
Hi tea
I just wrote this wiki entry<https://github.com/p2t2/figaro/wiki/Discuss-Demonstrations-and-Examples>, but I'm not sure whether that results in a notification to any committers, so I wanted to bring it to your attention more explicitly. My apologies if this isn't the appropriate process!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#744>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AFJkd9h4XvgCjsyFqsCTGbKFUD8Spuxlks5t2VvhgaJpZM4UO62f>.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi team,
I just wrote this wiki entry, but I'm not sure whether that results in a notification to any committers, so I wanted to bring it to your attention more explicitly. My apologies if this isn't the appropriate process!
The text was updated successfully, but these errors were encountered: