How We Made Computers Play Mastermind
Introduction A game of Mastermind being played. One player creates a secret code consisting of 4 pegs that can each take on one of 6 colors. The other player tries to guess that code; the code maker responds to each guess with one black pin for every peg in the correct spot and one white pin for every peg with the right color, but in the wrong spot. How complex are simple strategy games? Though that question may seem pointless to ask, mankind’s development of artificial intelligences may be the single most effective method by which to understand just how complicated our own human minds are. In this project, we have taken a popular one-on-one hidden code game— Mastermind— and implemented three separate algorithms, each programmed to play and attempt to win against an automated (non-AI) opponent. Each algorithm assumes a different approach to playing the game. Knuth’s Algorithm, developed based off of Donald Knuth’s optimal Mastermind strategy, utilizes a pattern by w...