Get the latest tech news

Using information theory to solve Mastermind


I have chosen a secret code. Try to guess it! How you've just played optimal Mastermind Mastermind is a game all about information.

The convention in information theory, a branch of mathematics and computer science dealing with just this type of question, is to define the information\(I\) provided by this guess and response as \[ I := \log_2 \frac{n}{n'}. Take the last significant digit with a grain of salt; there are usually many guesses with equal entropy, of which the program chooses one arbitrarily. For starters, the amount of information needed to narrow all \(n\) possible codes down to one is \(\log_2 n\) bits; this is displayed next to the number of possible moves.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of mastermind

mastermind

Photo of information theory

information theory

Related news:

News photo

As the Mastermind of Far-Right ‘Active Clubs’ Goes to Prison, His Violent Movement Goes Global

News photo

The West Coast’s Fanciest Stolen Bikes Are Getting Trafficked by One Mastermind in Jalisco, Mexico

News photo

What we learned from the indictment of LockBit’s mastermind