Articles

How computers guess what you're thinking

By the thecatcher team ·

When a guessing game names the exact animal you were picturing, it can feel like mind-reading. It isn't. There is no camera reading your face, and nothing is listening to your thoughts. What looks like magic is a careful process of asking good questions and keeping track of the evidence. This article explains, in plain language, how that process works and how thecatcher uses it.

Step one: a list of possibilities

A guessing program can only find something it already knows about. thecatcher has a built-in list of about two hundred things: animals, foods, objects, places, jobs and characters. For each one it stores a set of facts written as numbers between 0 and 1.

For example, a penguin might be stored with "can it fly?" close to 0, "is it linked to cold places?" close to 1, and "is it cute?" somewhere high. A number near 0.5 means "it depends" or "people might disagree". These numbers are the program's knowledge.

Step two: everyone starts equal

At the start of a game the program has no idea what you're thinking of, so every possibility gets the same chance. With two hundred options, each one starts at about half a percent. That's why thecatcher's confidence meter begins near zero.

Step three: each answer shifts the odds

When you answer a question, the program compares your answer with what it knows about each possibility. If you say "Yes" to "Can it fly?", things that fly become more likely and things that don't become less likely. They become less likely, not impossible. That difference matters, as we'll see.

This way of updating beliefs when new evidence arrives is named after Thomas Bayes, an 18th-century minister and mathematician. The idea is simple: your new belief comes from your old belief adjusted by how well each option explains what you just learned. A possibility that matches the answer gets a bigger share of the probability. One that clashes with it gets a smaller share.

Softer answers work the same way, just more gently. "Probably" nudges the odds. "Probably not" nudges them the other way. "Don't know" leaves them exactly where they were.

Step four: choosing the next question

The clever part is deciding what to ask next. A bad question tells you very little. Asking "Is it a hamster?" right at the start only rules out one thing if the answer is no. A good question splits the remaining possibilities into two groups of similar weight, so either answer teaches you a lot.

Computers can measure this precisely. For every question it could ask, the program imagines both answers, works out how uncertain it would be afterwards, and averages the results. The question that is expected to remove the most uncertainty wins. Scientists call this measure "expected information gain". In everyday terms it means "ask the question whose answer you can't easily predict".

Sometimes thecatcher shows a row of words instead, like Fur, Metal, Ocean, Loud, Tiny, Sweet, and asks which feels closest. A single pick like this can carry more information than one yes-or-no answer, because you are choosing between six options at once.

Step five: knowing when to guess

After each answer the program checks how confident it is in its top candidate. thecatcher waits until one possibility holds at least 80% of the probability, or until it has asked a set number of questions. Then it makes its guess. If you say the guess is wrong, that option is removed and the game carries on with more questions.

Why one wrong answer doesn't ruin everything

Real players make mistakes. They misread a question, or they picture a slightly different version of the thing. Perhaps your "snake" is a pet snake, so you answered "Yes" to "Is it kept as a pet?"

Old-fashioned guessing programs followed a fixed tree of questions, so one wrong turn sent them down the wrong path for good. Probability-based programs are more forgiving. Because a clashing answer only lowers the odds instead of eliminating an option, the right answer can climb back to the top once later answers point to it again. thecatcher builds in a small allowance for honest mistakes for exactly this reason.

What computers still can't do

A guessing program is only as good as its knowledge. If you think of something that isn't on its list, it cannot name it. It can only offer its closest match. Its facts are also simplifications: "Is it big?" means different things to different people. That's why thecatcher asks "What was it?" when it loses. It remembers your answer on your device so it can do better there next time. It does not secretly share that answer with anyone.

The real trick

The "magic" of a guessing game comes down to two habits any good detective already has: ask questions that split the possibilities well, and update your beliefs honestly when new evidence arrives. Computers are simply very fast and very consistent at doing both.

Ready to be read?

Think of something, and let the mascot try to guess it.

Play thecatcher