Skip to main content
deleted 15 characters in body; edited tags; edited title
Source Link
user1430
user1430

How does 20Q work internallycan I implement a "20 Questions" algorithm?

Ever since childhood, I've wondered how the 20Q electronic game worked. You think of an object, thing, or animal (e.g. potato or donkey). The device then asks you a series of questions such as:

  • Is it larger than a loaf of bread?
  • Is it found outdoors?
  • Is it used for recreation?

For each question, you can answer yes, no, maybe, or unknown. I always imagined it work with immense, nested conditionals (if-statements). However, I think that's an unlikely explanation because of its complexity for the programmer.

I'm looking for concrete knowledge, not discussion.How would I implement such a system?

How does 20Q work internally?

Ever since childhood, I've wondered how the 20Q electronic game worked. You think of an object, thing, or animal (e.g. potato or donkey). The device then asks you a series of questions such as:

  • Is it larger than a loaf of bread?
  • Is it found outdoors?
  • Is it used for recreation?

For each question, you can answer yes, no, maybe, or unknown. I always imagined it work with immense, nested conditionals (if-statements). However, I think that's an unlikely explanation because of its complexity for the programmer.

I'm looking for concrete knowledge, not discussion.

How can I implement a "20 Questions" algorithm?

Ever since childhood, I've wondered how the 20Q electronic game worked. You think of an object, thing, or animal (e.g. potato or donkey). The device then asks you a series of questions such as:

  • Is it larger than a loaf of bread?
  • Is it found outdoors?
  • Is it used for recreation?

For each question, you can answer yes, no, maybe, or unknown. I always imagined it work with immense, nested conditionals (if-statements). However, I think that's an unlikely explanation because of its complexity for the programmer.

How would I implement such a system?

Clarified title and body word order. Some helpful formatting.
Source Link
Anko
  • 13.5k
  • 10
  • 56
  • 82

How wasdoes 20Q madework internally?

Ever since I was a kidchildhood, I've wondered how they made the 20Q20Q electronic game worked. In this game, which is it's on device, youYou think of an object, thing, or animal (e.g. a potatopotato or a donkeydonkey), once you mentally choose your thing, the. The device goes throughthen asks you a series of questions such as:

  • Is it larger than a loaf of bread?
  • Is it found outdoors?
  • Is it used for recreation?

For each of the questionsquestion, you can answer yesyes, nono, maybemaybe, or unknownunknown. The way I'veI always thought ofimagined it to work was with immense, nested conditionals (if statementsif-statements). ButHowever, I don't think that would be very likely as it would be terribly difficult to understand while coding itthat's an unlikely explanation because of its complexity for the programmer.

I'm not looking for a discussion as SE doesn't allow it; I'm looking for concrete knowledge or solutions, not discussion.

How was 20Q made?

Ever since I was a kid, I've wondered how they made the 20Q electronic game. In this game, which is it's on device, you think of an object, thing, or animal (e.g. a potato or a donkey), once you mentally choose your thing, the device goes through a series of questions such as:

  • Is it larger than a loaf of bread?
  • Is it found outdoors?
  • Is it used for recreation?

For each of the questions you can answer yes, no, maybe, or unknown. The way I've always thought of it to work was with immense, nested conditionals (if statements). But, I don't think that would be very likely as it would be terribly difficult to understand while coding it.

I'm not looking for a discussion as SE doesn't allow it; I'm looking for concrete knowledge or solutions.

How does 20Q work internally?

Ever since childhood, I've wondered how the 20Q electronic game worked. You think of an object, thing, or animal (e.g. potato or donkey). The device then asks you a series of questions such as:

  • Is it larger than a loaf of bread?
  • Is it found outdoors?
  • Is it used for recreation?

For each question, you can answer yes, no, maybe, or unknown. I always imagined it work with immense, nested conditionals (if-statements). However, I think that's an unlikely explanation because of its complexity for the programmer.

I'm looking for concrete knowledge, not discussion.

Tweeted twitter.com/#!/StackGameDev/status/258131771911176192
Source Link
Daniel
  • 3.5k
  • 8
  • 37
  • 55

How was 20Q made?

Ever since I was a kid, I've wondered how they made the 20Q electronic game. In this game, which is it's on device, you think of an object, thing, or animal (e.g. a potato or a donkey), once you mentally choose your thing, the device goes through a series of questions such as:

  • Is it larger than a loaf of bread?
  • Is it found outdoors?
  • Is it used for recreation?

For each of the questions you can answer yes, no, maybe, or unknown. The way I've always thought of it to work was with immense, nested conditionals (if statements). But, I don't think that would be very likely as it would be terribly difficult to understand while coding it.

I'm not looking for a discussion as SE doesn't allow it; I'm looking for concrete knowledge or solutions.