in reply to AI Animals
1,1 /\ / \ Y / \ N / \ 2,1 2,2 /\ / \ Y / \ N Y / \ N / \ / \ 3,1 3,2 3,3 3,4
It starts with a root question at ($x = 1,$y = 1) (it is very important to pick a good root question because you are eliminating half of the possibilities every time you answer a question. To get to the next entry in the logic tree, you need only determine if the answer was yes or no. $x always increases by 1, and $y either becomes 2 * $y or (2 * $y) - 1. You continue through the logic tree until you find a Guess and not another Question. It is then a simple matter of modifying the logic tree with the new information to get "smarter".
I want to remind everyone that my code is a guess as to what the original looks like. It was many years ago, and I am sure it could be much cleaner. Some ideas that I had are:
Thanks,
|
---|