How do 20 questions AI algorithms work?

后端 未结 5 1601
广开言路
广开言路 2020-11-29 16:03

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

How do they guess so well?

5条回答
  •  难免孤独
    2020-11-29 16:43

    A decision tree supports this kind of application directly. Decision trees are commonly used in artificial intelligence.

    A decision tree is a binary tree that asks "the best" question at each branch to distinguish between the collections represented by its left and right children. The best question is determined by some learning algorithm that the creators of the 20 questions application use to build the tree. Then, as other posters point out, a tree 20 levels deep gives you a million things.

    A simple way to define "the best" question at each point is to look for a property that most evenly divides the collection into half. That way when you get a yes/no answer to that question, you get rid of about half of the collection at each step. This way you can approximate binary search.

    Wikipedia gives a more complete example:

    http://en.wikipedia.org/wiki/Decision_tree_learning

    And some general background:

    http://en.wikipedia.org/wiki/Decision_tree

提交回复
热议问题