Skip to content

Instantly share code, notes, and snippets.

ashanalytics

Block or report user

Report or block ashanalytics

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ashanalytics
ashanalytics / riddler-spelling.py
Created Mar 31, 2019
Solves the fivethirtyeight Riddler Classic from March 29, 2019
View riddler-spelling.py
# -*- 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
@ashanalytics
ashanalytics / riddler-baseball.py
Created Mar 25, 2019
Solves the fivethirtyeight Riddler Express from March 22, 2019
View riddler-baseball.py
# -*- 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
You can’t perform that action at this time.