the game of hangman, decision theory and delivering software - redsnake philly 2014
TRANSCRIPT
hangman
decision theory
delivering software
@chrisconley chrisconley.io
hangman173,529 words
randomly selected
goalminimize body parts & guess the word
25,011 games
random
average body parts: 15.43
average guesses: 22.17
random
naive
esiarntolcdupmghbyfvkwzxqj
next letter = max(chance of success)
average body parts: 9.28
average guesses: 16.36
naive
Feedback Strategy Avg Guesses Avg Body Parts
n/a random 22.17 15.43
n/a success 16.36 9.28
static
what we know how to act
feedback
whittle
whittle
whittle
s-r----er i
sre i
sre i
scrabbler
scrambler
scratcher
scrounger
straddler
straggler
strangler
struggler
next letter = max(chance of success)
ascrabbler
scrambler
scratcher
scrounger
straddler
straggler
strangler
struggler
scrabbler
scrambler
scratcher
scrounger
straddler
straggler
strangler
struggler
g t
average body parts: 7.02
average guesses: 14.19
feedback
s-r----er i
average body parts: 1.41
average guesses: 5.97
feedback
Feedback Strategy Avg Guesses Avg Body Parts
n/a random 22.17 15.43
n/a success 16.36 9.28
√ success 5.97 1.41
takeaways
feedbackwhat we know
act on it
what we know how to act
information gain
next letter = max(information gain)
s-r----er i
s-r----er i
scrabbler
scrambler
scratcher
scrounger
straddler
straggler
strangler
struggler
next letter = max(information gain)
ascrabbler
scrambler
scratcher
scrounger
straddler
straggler
strangler
struggler
scrabbler
scrambler
scratcher
scrounger
straddler
straggler
strangler
struggler
g t
information entropy
average body parts: 1.66
average guesses: 5.09
max information
Feedback Strategy Avg Guesses Avg Body Parts
n/a random 22.17 15.43
n/a success 16.36 9.28
√ success 5.97 1.41
√ information 5.09 1.66
cost of failure
next letter = max(information gain × chance of success)
s-r----er i
s-r----er i
scrabbler
scrambler
scratcher
scrounger
straddler
straggler
strangler
struggler
next letter = max(information gain × chance of success)
ascrabbler
scrambler
scratcher
scrounger
straddler
straggler
strangler
struggler
scrabbler
scrambler
scratcher
scrounger
straddler
straggler
strangler
struggler
g t
average body parts: 1.38
average guesses: 5.38
information & success
Feedback Strategy Avg Guesses Avg Body Parts
n/a random 22.17 15.43
n/a success 16.36 9.28
√ success 5.97 1.41
√ information 5.09 1.66
√information &
success 5.38 1.38
takeaways
optimizelong term successshort term failure
maximize information
fastest to goalalways
maximizesuccess
will never optimizenever
max(utility of success) = min(cost of failure)
max(expected utility of success) = min(expected cost of failure)
increasetolerancemake choices with greater
information gain
sunk cost
test coverage
% test coverage = max(information gain × expected utility of success)
universe simulation = ∞ × ∞
cost of information
cost of information?
expected cost of information
software development
process != information
explore your expectations
thank you
github.com/chrisconley/hangman
more info:http://chrisconley.io/delivered