Skip to content

Instantly share code, notes, and snippets.

@usptact usptact/game_of_ur
Last active Oct 25, 2018

Embed
What would you like to do?
//
// Game of Ur
//
var roll = function() {
return flip() + flip() + flip() + flip();
}
var game = function() {
var n = sample(RandomInteger({n: 20}));
var s = sum(repeat(n, roll))
condition(s === 13);
return n
}
var dist = Infer(game);
viz(dist);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.