Skip to content

Instantly share code, notes, and snippets.

@rmcgibbo
rmcgibbo / viterbi.py
Created October 19, 2012 02:55
Viterbi algorithm for a simple class of HMMs
"""
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,
@PhiBabin
PhiBabin / simulateur.py
Created February 15, 2014 03:32
Flappy Bird Simulator
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