probability-0.2.3.1: Probabilistic Functional Programming

Numeric.Probability.Example.DiceAccum

Description

We play the following game: We roll a die until we stop or we get three spots. In the first case we own all spots obtained so far, in the latter case we own nothing.

What is the strategy for maximizing the expected score?

Synopsis

Documentation

die :: Fractional prob => T prob DieSource

roll :: Fractional prob => T prob (Maybe Score)Source

strategy :: Fractional prob => T prob (Maybe Score)Source

optimal strategy

game :: Fractional prob => T prob (Maybe Score)Source

distribution of the scores that are achieved with the optimal strategy