alex1770 / wordle

Finding optimal play in the game of wordle
MIT License
54 stars 16 forks source link

Ultra hard mode? #4

Closed gwstaten closed 2 years ago

gwstaten commented 2 years ago

This code is amazing and has been very customizable to get a lot of data regarding starting words for multiple word sets, however, some sites require (or just some players like to play) in "ultra hard" mode, which, unlike regular hard mode, requires the user to also move yellows, and to not include any previous gray letters, I have been looking through the code to try to modify it to do this and I know it has something to do with the okhard function, but am not sure how to modify it for this purpose. Any help or guidance you can give would be greatly appreciated!

alex1770 commented 2 years ago

Hi gwstaten. Thank you for your kind words. You are right, morally you just have to alter okhard() to return sc[j][i]==s, which enforces that new guesses are compatible with previous colour scores, but to make that work you also need to pre-calculate colour score values (fill the table sc[][]) for guess words as well as hidden words. Anyway, I added an option -U to do this in the last commit. I hope it's the behaviour you expected.

alex1770 commented 2 years ago

"Ultra hard" mode implemented.