The Dishonest Casino

The matrix below represents the model parameters for the Dishonest Casino problem. In this problem, a casino uses both a fair and an unfair six-sided die. The default parameters listed below assume that the casino moves from a fair die to an unfair die 5% of the time and from an unfair to a fair die 10% of the time. The fair die has an equal probability of landing on any particular side, but the unfair die is 50% likely to land on a 6 and 10% likely to land on any of the other sides. The initial state of the game has a 50% chance of using the fair die.

Hover over any of the question marks for more information.

Model Parameters

TransitionEmission 
 FairUnfair123456Initial
Fair
Unfair

Choose the length of the sequence to generate using the model parameters above. The sequence of output symbols, along with the sequence of hidden states that produced them, will be given below. For the hidden states, "0" corresponds to the fair die and "1" corresponds to the unfair die. It will be useful to copy-paste these values into the inputs of the other tabs.

Enter the sequence to evaluate (usually copied from the Generate tab) and, optionally, the hidden states that produced the sequence (from the Generate tab). For the hidden states, "0" corresponds to the fair die and "1" corresponds to the unfair die. The posterior probabilities for being in a state generated by the unfair die will then be calculated and presented as a graph below. If the hidden states are given, those with a state of "1" will appear as areas of dark gray background on the graph.

Sequence

States (optional)

Enter the sequence to decode (usually copied from the Generate tab) and, optionally, the hidden states that produced the sequence (from the Generate tab). For the hidden states, "0" corresponds to the fair die and "1" corresponds to the unfair die. The Viterbi algorithm will then be used to decode the sequence. In the output, the red symbols are the predicted "1" states and the gray background symbols are actual "1" states (if supplied).

Sequence

States (optional)

Enter the sequence to on which to train (usually copied from the Generate tab). The Baum-Welch algorithm will then be used to train the original model (given above) on this sequence. The resulting model parameters will be shown below.

Sequence