I was listening to the Lady Blackbird podcast and I became curious to what where the chances of getting three successes with a number of dice. I remember figuring out two successes for Burning Wheel but since Lady Blackbird (at least in the podcast) uses three, I went back to the drawing board.
3: 12.5% (this one's obvious: half * half * half = 12.5%)
My favorite chance of success as a game master or as a game designer is about 2/3. That means having six dice in Lady Blackbird. That didn't seem that common in the podcast, but I don't know.
I also came up with a pretty neat algorithm to finding it quickly:
(define (probs dice)
(* (/ (let loop ((dice dice) (obst 3))
((zero? obst) (expt 2 dice))
((zero? dice) 0)
(else (+ (loop (sub1 dice) (sub1 obst))
(loop (sub1 dice) obst)))))
(expt 2 dice))
In other words, the program creates a binary tree of all die results, counts all branches that had at least three successes, and divides that number with the total number of branches, which is always 2 ^ the number of dice. E.g. with four dice there are going to be sixteen branches (2 ^ 4 = 16), five of those have three or more successes, and five divided by sixteen is 31.25.
The cool thing is that as soon as one branch has had three successes (rephrased as reduced three obstacles to zero), I know that all of its sub-branches are going to be successful as well so I can just sum it up without going through them.
That said, there are still a lot of low-hanging fruit optimizations available, like I probably call (loop 4 3) a bunch of times. But sometimes memoization can be more expensive if the numbers are small enough.