Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add all_words and other update #4

Merged
merged 1 commit into from Mar 6, 2022

Conversation

dawghen
Copy link
Contributor

@dawghen dawghen commented Feb 17, 2022

Add an all_word.txt file and let the bot use the entropy until the entropy gets too small. It helps to reduce over-rounded resolutions. Added option to choose initial guess ('tares' for every word) to reduce testing time. The average round is now around 4.12 for all 2315 solutions with 1 over-rounded solution (7 rounds)

next stage

  1. Use multi-processing to reduce processing time.
  2. Consider frequently used words using NLTK or other way

@GillesVandewiele
Copy link
Owner

This is great @dawghen. Thank you so much!!! I'm on holidays atm but will review and merge when I'm back!

We might have to consider using 2 files as well: 1 "full-blown" and 1 "minimal" one. The latter could be more useful for educational purposes.

With regards to the frequency, that could be a nice option when you let a human pick a word that the bot should guess. It won't help for Wordle though as they pick a word from the list (not so randomly) with uniform chances.

@dawghen
Copy link
Contributor Author

dawghen commented Feb 19, 2022

"Entropy getting too small" in my first comment indicates that the singularity is at P = 0 (log P is infinite and Python yields p*log p = 0 instead. we can edit it.)

Thank you for your kind reply. Yes, we can make it more educational. In the early rounds, humans tend to choose words outside the letters they've already checked out. It can be said that the -log p is maximized, so humans and machines share the solving principle.

I thought about how the bot would solve all the words in 6 rounds and minimize the average round. As you already know, the entropy-only approach helps the former but also reduces the need to solve it in 2-3 rounds. (mostly solved at 4th round) The NLTK-only approach gives better averages (3.8), but often doesn't work out in round 6 (sometimes beyond rounds 8-9).

Properly combining the two approaches, the mean would be close to 3.6, but I don't know how to make the condition to combine them ideally.

@GillesVandewiele GillesVandewiele merged commit f942100 into GillesVandewiele:main Mar 6, 2022
@GillesVandewiele
Copy link
Owner

Sorry it took me so long, but I merged the code! Thank you so much once again for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants