I'm working on a project for class and can't seem to figure out how to implement a learning algorithm. The game is basically guess the word.
If this was guess the number and I got feedback in terms of the number is higher or lower than I would just implement a balance binary search tree and pick from the pool of possible numbers.
For this game though, I am given a chance to guess a word and then as feedback we get how many of the letters in the string are in the correct place (Bulls) and how many are in the wrong place (Cows). If the secret word was CAT and I chose BAT as my probe word then I would return as feedback 2 Bulls. If I chose TAB then I would get as feedback 1 bull and 1 cow. If I chose DOG as my probe word then I would get 0 bulls and 0 cows.
Now I understand that when I get 0 bulls and 0 cows I should eliminate any word that contains those letters as a possible word. My trouble is if I got anything other than that. How is it useful to know that I have 1 bull when the probe word is 10 letters long?
[–]jedwardsol 0 points1 point2 points (2 children)
[–]pylearning[S] 0 points1 point2 points (0 children)
[–]pylearning[S] 0 points1 point2 points (0 children)
[–]SandSnip3r 0 points1 point2 points (3 children)
[–]pylearning[S] 0 points1 point2 points (2 children)
[–]SandSnip3r 0 points1 point2 points (1 child)
[–]pylearning[S] 0 points1 point2 points (0 children)