Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do 20 questions AI algorithms work?

Simple online games of 20 questions powered by an eerily accurate AI.

How do they guess so well?

like image 789
Daddy Warbox Avatar asked May 20 '09 12:05

Daddy Warbox


People also ask

How do 20 Question machines work?

The 20Q AI uses an artificial neural network to pick the questions and to guess. After the player has answered the twenty questions posed (sometimes fewer), 20Q makes a guess. If it is incorrect, it asks more questions, then guesses again.

How does an AI algorithm work?

AI systems work by combining large sets of data with intelligent, iterative processing algorithms to learn from patterns and features in the data that they analyze. Each time an AI system runs a round of data processing, it tests and measures its own performance and develops additional expertise.

How does 20 questions work on game pigeon?

If the guesser does not get the object within 20 questions, the object is revealed. The game can go for about five minutes or even five months, depending on how well the guesser plans and uses the yes or no questions. In the end, 20 Questions serve as a classic game of deductive reasoning and creativity.

Can 20Q guess people?

But unlike a human, 20Q guesses right 80 percent of the time—and that jumps to 98 percent if you let it ask 25 questions.


2 Answers

You can think of it as the Binary Search Algorithm. In each iteration, we ask a question, which should eliminate roughly half of the possible word choices. If there are total of N words, then we can expect to get an answer after log2(N) questions.

With 20 question, we should optimally be able to find a word among 2^20 = 1 million words.

One easy way to eliminate outliers (wrong answers) would be to probably use something like RANSAC. This would mean, instead of taking into account all questions which have been answered, you randomly pick a smaller subset, which is enough to give you a single answer. Now you repeat that a few times with different random subset of questions, till you see that most of the time, you are getting the same result. you then know you have the right answer.

Of course this is just one way of many ways of solving this problem.

like image 180
Yogi Avatar answered Oct 20 '22 21:10

Yogi


I recommend reading about the game here: http://en.wikipedia.org/wiki/Twenty_Questions

In particular the Computers section:

The game suggests that the information (as measured by Shannon's entropy statistic) required to identify an arbitrary object is about 20 bits. The game is often used as an example when teaching people about information theory. Mathematically, if each question is structured to eliminate half the objects, 20 questions will allow the questioner to distinguish between 220 or 1,048,576 subjects. Accordingly, the most effective strategy for Twenty Questions is to ask questions that will split the field of remaining possibilities roughly in half each time. The process is analogous to a binary search algorithm in computer science.

like image 20
cgp Avatar answered Oct 20 '22 22:10

cgp