Twenty questions with uncertain answers
Jul. 1st, 2011 02:31 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
If you're playing twenty questions (say on something simple like "numbers from 1 to a 1000") the best strategy is to divide the output into two with each guess[1]. Eg. Higher than 500? Yes. Higher than 750? No. Higher than 625? Yes. Etc. Etc. This will take log(N) questions to find the exact answer. (Guessing randomly may produce the answer quicker, but on average will take mcuh longer.)
However, suppose when you ask a question, you're given the answer, but it's right only 90% of the time. (For simplicity, assume you can find out if you've got the right single answer at the end.) What's the right strategy? Is it to ask "Higher than 500" twice or more until you're sure? Or to follow the normal strategy until it gives a unique answer, and if that's wrong, start again?
The second game feels like what I often end up feeling like in real life... :)
[1] I remember reading a book that said learning to "gain information" from a guess rather than "make a right guess" was quite difficult for children to learn -- a teacher reported many children guess "higher than X" when they already knew it true, because they'd been so conditioned by class to expect a "yes, that's right" to be a good thing and "no, that's wrong" to be a bad thing.
However, suppose when you ask a question, you're given the answer, but it's right only 90% of the time. (For simplicity, assume you can find out if you've got the right single answer at the end.) What's the right strategy? Is it to ask "Higher than 500" twice or more until you're sure? Or to follow the normal strategy until it gives a unique answer, and if that's wrong, start again?
The second game feels like what I often end up feeling like in real life... :)
[1] I remember reading a book that said learning to "gain information" from a guess rather than "make a right guess" was quite difficult for children to learn -- a teacher reported many children guess "higher than X" when they already knew it true, because they'd been so conditioned by class to expect a "yes, that's right" to be a good thing and "no, that's wrong" to be a bad thing.
no subject
Date: 2011-07-01 02:58 pm (UTC)eta: oh, or was that what you meant by "in real life"? I assumed you meant "real life when not playing 20Q", rather than "when playing 20Q on the domain of real life", but I now realise the latter might be a quite plausible parse. :-)
Even supposing the optimum strategy is feasible to analyse (by pure maths or computationally), I suspect it will depend on exactly what target you're optimising it for. The obvious criterion is "minimise the expected number of questions before guessing the answer correctly", but you may well find that that doesn't lead to the same strategy as the criterion "maximise the probability of guessing the answer correctly within the first N questions" (with N = oh, just for example, 20).
Other guessing games based on narrowing down a search space have this property: e.g. Mastermind has a different optimum strategy depending on whether you want to minimise the expected or the maximum number of guesses required. (Though when I was reading up on that one I never found a treatment of Mastermind as an adversarial game: if you're picking the sequence the other player will guess, is there some non-uniform pdf with which you should select from the 6^4 possibilities to make life harder for the guesser?)
no subject
Date: 2011-07-01 03:11 pm (UTC)I agree it's probably going to be different -- I was hoping for an answer to either, I guess :)
no subject
Date: 2011-07-01 03:44 pm (UTC)See also http://xkcd.com/242/ Never mind scientists, Charles does this ALL THE TIME. "Oooh, that made Mummy shout, I wonder what happens if I do it again."
no subject
Date: 2011-07-01 03:55 pm (UTC)I *suspect* the right threshold is the one where the number is as likely to be below the threshold as above.
It would be interesting to see what this looks like in practise; it ought to be do-able.
no subject
Date: 2011-07-01 04:18 pm (UTC)no subject
Date: 2011-07-01 04:33 pm (UTC)Again, this is testable. I could have fun with this.
no subject
Date: 2011-07-01 05:39 pm (UTC)Output columns: Is it less than this number? Is the information correct? p[the actual correct number]