~/talk

Beating Mastermind: Winning with the help of Donald Knuth

Talkat RubyConf 2018 · 2018-11-28..11-30· [ruby, machine-learning]
github:agfor
slides:none on file

Implementation of Donald Knuth’s Mastermind procedure in Ruby: the code builds the Cartesian product of 1–6 four times, precomputes every guess/answer score, and runs a minimax algorithm that minimizes the maximum remaining possibilities, prefers valid codewords, and breaks ties by numeric order. The surprising claim is realized: with the 1122 initial guess and the lookup logic the program guarantees a win in five moves or less; code and notes are posted to GitHub.

AI-written summary · about

  1. 0:00Introduction
  2. 0:37What is Mastermind
  3. 1:47Example Game
  4. 5:33Donald Knuth
  5. 6:06The paper
  6. 7:12The fourth move
  7. 8:45The core of the paper
  8. 11:38How to implement the algorithm
  9. 19:12The code
  10. 19:58Basic logic
  11. 20:38Game structure
  12. 21:55Scoring
  13. 23:40Making guesses
  14. 29:35Climax
  15. 30:52Code
  16. 36:01Running the program
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.