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
# -*- coding: utf-8 -*- | |
""" | |
Solves the fivethirtyeight Riddler problem from March 22, 2019 | |
Each inning is represnted by an object called "Inning", that is comprised of | |
strikes, outs, and runner positions, e.g. Inning(0, 1, (0,1,0)) for 0 strikes, | |
1 out, and a runner on second base. | |
There are 11 unique game actions that can occur. Each is represented by a | |
function that takes an inning state as input and returns a tuple of the new |
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
# -*- coding: utf-8 -*- | |
""" | |
Solves the fivethirtyeight Riddler Classic problem from March 29, 2019 | |
Each speller is identified by their probability of spelling a word correctly, | |
such as "0.99" to represent a 99% correct speller. The program simulates a | |
large number of spelling bees and returns the winner of each bee. | |
""" | |
import numpy as np |