No such thing as a small change | |
PerlMonks |
Re: Challenge: Designing A Computer Opponentby eric256 (Parson) |
on Dec 13, 2007 at 03:29 UTC ( [id://656743]=note: print w/replies, xml ) | Need Help?? |
Hey, I would think that you build a guess() function that scans a dictionary and removes all the impossible words. Then sorts those words based on use frequency. Then your different degrees of difficulty could control where you pick words from the list. Most difficult would only pick the very best words, and the lower the difficult the lower down the list the computer picks from. A smarter AI might also be able to use its first few guesses to get a better idea what letters are in the word, i'm not sure how this could be done but i would guess that good players would be able to work the system to get more info out of it (like when you play mastermind). If you already have code for score() that would be nice to see ;) ___________ Eric Hodges
In Section
Seekers of Perl Wisdom
|
|