the game of hangman, decision theory and delivering software - redsnake philly 2014

62
hangman decision theory delivering software

Upload: chris-conley

Post on 14-Jul-2015

237 views

Category:

Engineering


1 download

TRANSCRIPT

Page 1: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

hangman

decision theory

delivering software

Page 2: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

@chrisconley chrisconley.io

Page 3: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

Angry Hangman by collinschase

hangman

Page 4: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

hangman173,529 words

randomly selected

Page 5: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

goalminimize body parts & guess the word

Page 6: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

25,011 games

Page 7: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

random

Page 8: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

average body parts: 15.43

average guesses: 22.17

random

Page 9: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

naive

Page 10: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

esiarntolcdupmghbyfvkwzxqj

Page 11: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

next letter = max(chance of success)

Page 12: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

average body parts: 9.28

average guesses: 16.36

naive

Page 13: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

Feedback Strategy Avg Guesses Avg Body Parts

n/a random 22.17 15.43

n/a success 16.36 9.28

Page 14: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

static

Page 15: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

what we know how to act

Page 16: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

feedback

Page 17: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

whittle

Page 18: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

whittle

Page 19: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

whittle

Page 20: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

s-r----er i

Page 21: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

sre i

Page 22: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

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

Page 23: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

average body parts: 7.02

average guesses: 14.19

feedback

Page 24: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

s-r----er i

Page 25: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

average body parts: 1.41

average guesses: 5.97

feedback

Page 26: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

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

Page 27: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

takeaways

Page 28: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

feedbackwhat we know

act on it

Page 29: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

what we know how to act

Page 30: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

information gain

Page 31: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

next letter = max(information gain)

Page 32: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

s-r----er i

Page 33: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

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

Page 34: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

information entropy

Page 35: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

average body parts: 1.66

average guesses: 5.09

max information

Page 36: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

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

Page 37: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

cost of failure

Page 38: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

next letter = max(information gain × chance of success)

Page 39: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

s-r----er i

Page 40: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

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

Page 41: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

average body parts: 1.38

average guesses: 5.38

information & success

Page 42: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

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

Page 43: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

takeaways

Page 44: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

optimizelong term successshort term failure

Page 45: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

maximize information

fastest to goalalways

Page 46: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

maximizesuccess

will never optimizenever

Page 47: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

max(utility of success) = min(cost of failure)

Page 48: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

max(expected utility of success) = min(expected cost of failure)

Page 49: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

increasetolerancemake choices with greater

information gain

Page 50: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

sunk cost

Page 51: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

test coverage

Page 52: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

% test coverage = max(information gain × expected utility of success)

Page 53: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

universe simulation = ∞ × ∞

Page 54: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

cost of information

Page 55: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

cost of information?

Page 56: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

expected cost of information

Page 57: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

software development

Page 58: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

process != information

Page 59: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

explore your expectations

Page 60: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

thank you

Page 61: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

github.com/chrisconley/hangman

Page 62: The Game of Hangman, Decision Theory and Delivering Software - Redsnake Philly 2014

more info:http://chrisconley.io/delivered