如何做20题AI算法的工作?算法、如何做、工作、AI

2023-09-10 22:46:36 作者:十梦几她

20个问题,搭载的怪异准确的AI简单的网络游戏。

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

他们是如何做到猜这么好?

How do they guess so well?

推荐答案

您可以把它作为二进制搜索算法。 在每次迭代中,我们提出一个问题,这应消除大约有一半的可能的字的选择。如果总共有N个的话,那么我们可以期望获得LOG2(N)的问题后的答案。

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.

通过20个问题,我们应优化能够找到其中2 ^ 20 = 1万字一个字。

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

一个简单的方法来消除异常值(错误答案)将是可能使用类似 RANSAC 。这意味着,而不是考虑到已经回答了所有的问题,你随机选择一个较小的子集,这是足以给你一个答案。现在,你重复了几次有问题不同的随机子集,直到你看到大多数的时候,你得到同样的结果。那么你知道你有正确的答案。

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.