Using Python to play 100K Games of Wordle. Top Strategy Test!

preview_player
Показать описание
You might be playing wrong and not knowing it. I'll show how we can create a test game and run simulated strategies on that program. Python playing Wordle will show you how to create a similar project on any game or simulation.

You got something to say to me?? Join our discord!✌️
Рекомендации по теме
Комментарии
Автор

the key point you are missing from your algorithm is that you know that a certain letter cannot exist in a certain position if it is yellow. that really helps filtering. for example, the algorighm should never suggest 'lurid' after 'girsh' because it already knew that the 'r' cannot be in the third letter position.

paddym
Автор

YES i would love to see an ai handling this, maybe can figure it out on the second attempt if it was lucky?

morpheus_uat
Автор

awesome video dude. got me motivated to actually start a new project haha

lolwhatyesme
Автор

I checked the strat 2 and I don't see a filter for yellow letters that blocks words that have the correct letter but on the yellow's spot, which is already known to be the wrong location.

Like if you get a yellow letter K at the first index, only words that contain K in all positions but the first one should be valid.

AlexmanGR
Автор

Such a sick video! Would love to see what an ML model could do!! It'd be interesting to see if it comes up with any new strategies on it's own!

narutocole
Автор

so stretegy1 is basically one exploration round and strategy2 is 3 exploration rounds. you should test 2 and 4 rounds as well to find the real sweet spot

Fabsenet
Автор

Great video!
I would love to see another video on wordle and what an ML model could do

HarelBrodai
Автор

Been down a rabbit hole with the nltk word list to see if the letter_frequencies agreed, and then if the letter_frequencies for the 5 letter words were any different.
First sidetrack was the nltk list has duplicates. That'll skew letter frequences. Remove them, original 236736 words becomes 235892 words.
Second sidetrack was words starting with Capitals, e.g. Aries. Wordle doesn't accept these. Remove them, 210693 words left, of which 8497 are 5 letter words.
Third sidetrack is some guesses then don't get accepted by Wordle. Remove lerot and ceryl, leaving 8495 words.
Redo letter frequencies on those 8495 words, serai and arose are the first two guesses.
Fourth sidetrack is then reading the other replies, and digging into the word list the game uses. I've posted below re: Wordle's 2315 words and their letter frequencies.


Looking forward to your next video ;)



frequencies for the list of 8495 words:
{'a': 0.10514,
'b': 0.02735,
'c': 0.03639,
'd': 0.03293,
'e': 0.10015,
'f': 0.01556,
'g': 0.02594,
'h': 0.03114,
'i': 0.06075,
'j': 0.00384,
'k': 0.02076,
'l': 0.05574,
'm': 0.03062,
'n': 0.05211,
'o': 0.06593,
'p': 0.03043,
'q': 0.00198,
'r': 0.07163,
's': 0.05609,
't': 0.05604,
'u': 0.04427,
'v': 0.01097,
'w': 0.01612,
'x': 0.00445,
'y': 0.03778,
'z': 0.00588}

kevinmckeown
Автор

using AI to make the perfect algo would be really cool!

CreeperFace
Автор

Quite funny, I use the 2 totally different words for the first two choices to cut down on my options and start trying to guess from the third onwards with the information I got.

Worst case scenario is me only getting 1 vowel to be yellow but I removed 9 letters from my pool.

Interested to see how does the AI "think"

HolyPT
Автор

The game's pretty similar to Mastermind(or Bulls and Cows), so I would look for inspiration there, since there are already algorithms that solve that problem under 6 moves in the worst case scenario. I suppose that it's harder when choices must include valid words and not only a combination of colors :)

dominikzurek
Автор

Maybe keep stats on what exploration words have the best hit rate and use those first, also could find a relationship between possible words remaining, guesses remaining, and known/perfect letters to calculate when to switch from exploration phase to guessing phase.

naptown
Автор

love it, keep them coming! ai would be great…

marcellerich
Автор

Great video.
For me, part of the game is not only solving it, but solving it quickly.
How are the results there? I guess the results would be equal or even better for Strategy 1, since spending 3 rounds on exploring seems like a little waste of time. But would be nice to have the facts.

daMozart
Автор

There's another bit of knowledge you get while playing that didn't get factored in. I'm curious how it affects the two strategies: when you get a yellow letter, you know that it can never be correct in that position otherwise it would have been green. For example, @3:44, the strat guessed "girsh" followed by "lurid", but that wouldn't have been a valid guess if you made sure "r" couldn't be guessed again as the third character.

MrFoxBait
Автор

wouldn't an optimal guess just be a set of letters which eliminated the most words? Repeat until only one word left

dparker
Автор

this video is very short and doesnt go over any of the code. either go into more detail or just post link to github. this is waste of time

asfgas