Hello all, this is my first topic.
I made a setup for a “guess the number” game where you think of a number from 0 to 6 and the computer will try to guess it. Every time it makes a guess, it stops and you tell the computer if your number is higher or lower than the guess it made, then you start it again. Keep going until it gets your number right, and it only takes at most 3 guesses.
I think this would make a good puzzle: can you recreate my AI?
Output guess is a 3 bit register, where every time you reset the computer, you manually set the first guess to 3. The computer doesn’t have to automatically set the first guess, but it must start at 3.
Higher/lower input is a normal bit in my solution, as it only needs to be read once each time. It doesn’t matter which side is higher or lower.
The computer must be smart, limit of 3 guesses!
Let’s see what you can come up with! I will provide my solution when someone asks for it or solves it.
EDIT: Solution
EDIT 2: Specified red start button (sorry!!)
Click here to view solution
The guess output is the lowest 3 bits. The higher/lower input is the leftmost bit (not the gears), where pointing left is higher and right is lower. Red/right side always starts (Push to Start button). Here’s a link to a simulation.
jstumble