Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
hangman
decision theory
delivering software
@chrisconley chrisconley.io
Angry Hangman by collinschase
hangman
hangman
173,529 words
randomly selected
goal
minimize 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 succes...
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
feedback
what 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 ...
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
√ informati...
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 ...
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
√ informati...
takeaways
optimize
long term success
short term failure

maximize
information
fastest to goal
always

maximize
success
will never optimize
never

max(utility of success) = min(cost of failure)
max(expected utility of success) = min(expected cost of failure)
increase
tolerance
make 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
Upcoming SlideShare
Loading in …5
×

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

1,014 views

Published on

Information entropy and utility functions. Bitmaps, makefiles and python generators. Who knew the seemingly simple game of hangman could be so much fun? And what does it all have to do with delivering software?

During the talk, we’ll solve the game starting with our naive childhood strategy then improve the strategy with some simple decision theory tricks. Along the way, we’ll build a model for feedback, information gain and failure that we can apply directly to the way we deliver software.

Chris Conley is a software engineer lead at Monetate. Prior to Monetate he co-founded an accelerator-backed startup, Houdini and a mobile train app, iSepta.org.

Published in: Engineering
  • Be the first to comment

  • Be the first to like this

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

  1. 1. hangman decision theory delivering software
  2. 2. @chrisconley chrisconley.io
  3. 3. Angry Hangman by collinschase hangman
  4. 4. hangman 173,529 words randomly selected
  5. 5. goal minimize body parts & guess the word
  6. 6. 25,011 games
  7. 7. random
  8. 8. average body parts: 15.43 average guesses: 22.17 random
  9. 9. naive
  10. 10. esiarntolcdupmghbyfvkwzxqj
  11. 11. next letter = max(chance of success)
  12. 12. average body parts: 9.28 average guesses: 16.36 naive
  13. 13. Feedback Strategy Avg Guesses Avg Body Parts n/a random 22.17 15.43 n/a success 16.36 9.28
  14. 14. static
  15. 15. what we know how to act
  16. 16. feedback
  17. 17. whittle
  18. 18. whittle
  19. 19. whittle
  20. 20. s-r----er i
  21. 21. sre i
  22. 22.  sre i scrabbler scrambler scratcher scrounger straddler straggler strangler struggler next letter = max(chance of success) a scrabbler scrambler scratcher scrounger straddler straggler strangler struggler scrabbler scrambler scratcher scrounger straddler straggler strangler struggler g t
  23. 23. average body parts: 7.02 average guesses: 14.19 feedback
  24. 24. s-r----er i
  25. 25. average body parts: 1.41 average guesses: 5.97 feedback
  26. 26. 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
  27. 27. takeaways
  28. 28. feedback what we know act on it 
  29. 29. what we know how to act
  30. 30. information gain
  31. 31. next letter = max(information gain)
  32. 32. s-r----er i
  33. 33. s-r----er i scrabbler scrambler scratcher scrounger straddler straggler strangler struggler next letter = max(information gain) a scrabbler scrambler scratcher scrounger straddler straggler strangler struggler scrabbler scrambler scratcher scrounger straddler straggler strangler struggler g t
  34. 34. information entropy
  35. 35. average body parts: 1.66 average guesses: 5.09 max information
  36. 36. 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
  37. 37. cost of failure
  38. 38. next letter = max(information gain × chance of success)
  39. 39. s-r----er i
  40. 40. s-r----er i scrabbler scrambler scratcher scrounger straddler straggler strangler struggler next letter = max(information gain × chance of success) a scrabbler scrambler scratcher scrounger straddler straggler strangler struggler scrabbler scrambler scratcher scrounger straddler straggler strangler struggler g t
  41. 41. average body parts: 1.38 average guesses: 5.38 information & success
  42. 42. 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
  43. 43. takeaways
  44. 44. optimize long term success short term failure 
  45. 45. maximize information fastest to goal always 
  46. 46. maximize success will never optimize never 
  47. 47. max(utility of success) = min(cost of failure)
  48. 48. max(expected utility of success) = min(expected cost of failure)
  49. 49. increase tolerance make choices with greater information gain 
  50. 50. sunk cost
  51. 51. test coverage
  52. 52. % test coverage = max(information gain × expected utility of success)
  53. 53. universe simulation = ∞ × ∞ 
  54. 54. cost of information
  55. 55. cost of information?
  56. 56. expected cost of information
  57. 57. software development
  58. 58. process != information
  59. 59. explore your expectations
  60. 60. thank you
  61. 61. github.com/chrisconley/hangman
  62. 62. more info: http://chrisconley.io/delivered

×