Sign up for a GitHub account Sign in All Gists lykkin / blue.py Created February 22, 2015 Code Revisions 1 /.sunken-menu-group /.sunken-menu-contents Embed HTTPS SSH You can clone with HTTPS or SSH . Download Gist /.only-with-full-nav lykkin created this gist February 22, 2015 . View gist @ d40666f blue.py 72 @@ -0,0 +1,72 @@ +from random import random + +class node: + name = '' # the token's value + followingStates = None # <next name>: <num of times seen> + numSeen = 0 # number of times token has been seen + + def __init__(self, name): + self.name = name + self.numSeen = 1 + self.followingStates = {} + + def incState(self, state): + if s...