Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
comment on |
( [id://3333]=superdoc: 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 reply to Re: Challenge: Designing A Computer Opponent
by eric256
|
|