For this homework, do the following things:
The “occasionally dishonest casino” is a well-known application for HMMs.1 In this problem, a casino uses two kinds of dice: fair and loaded. The latter are loaded so that 6 comes up half the time. The staff is instructed to switch between honest and loaded dice according to the probabilities shown in this state transition diagram.
Do the following:
Here, 1t means a roll of 1 at time t and ft means using a fair die at time t. Do these computations manually and, if possible, using code from the lab (only!). Do your answers match those of Hamilton’s code?
3, 1, 5, 1, 1, 6, 2, 4, 6, 4, 4, 6, 6, 4, 4, 2, 4, 5, 3, 2, 1, 1, 3, 1, 6, 3, 1, 1, 6, 4, 1, 5, 2, 1, 3, 3, 6, 2, 5, 1, 4, 4, 5, 4, 3, 6, 3, 1, 6, 5, 6, 6, 2, 6, 5, 6, 6, 6, 6, 6
Give a short explanation of your results.
Final project suggestions: (1) Build some natural language processing tools that use the Viterbi algorithm. For example, the AIMA code implements word separation (see text.py). (2) Build your own implementation of the HMM algorithms in Python (to replace Hamilton’s).
1 This version is a symmetric version that will work with Hamilton’s HMM implementation.
Submit the files specified above in Moodle under homework 7. We will grade your work according to the following criteria:
The preliminary project proposal is submitted and graded separately; upload it here: submission site