This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Viterbi algorithm for finding the most likely state sequence of a simple | |
hidden markov model. | |
# https://en.wikipedia.org/wiki/Viterbi_algorithm | |
The Model | |
--------- | |
The HMMs considered in this code are extremely simple. Every hidden state | |
is uniquely associated with an output symbol, but the link is "fuzzy". That is, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygame, sys, random | |
from pygame.locals import * | |
class sim: | |
# X origin | |
#DELTA = 0.1 | |
# Windows size#891 | |
WIN_H = 504. | |
WIN_W = 308 + 600 |
NewerOlder