Hey everybody Thank you for all the comments and suggestions. A few updates: - I did see 3b1b’s latest video, also it was in the comments. Yes, I got the double letters gameplay wrong too. (Can’t say it was a bug though, that was me being a bit arrogant and ignoring one of the most fundamental principles of software development: “Never assume!”) - New video is in the making, with 3 additional approaches to try to play/solve Wordle. That double letter thing is really a wrench in the works…
@@idkyet9458 I think there is a little more to that than just 4 words. But I do agree that there is a guaranteed 5 guess win strategy - and this is something my other Wordle video is about.
In addition to what others have said, the letters could be analyzed to not only see how common they are in words, but in what positions they are more likely, because getting a green is more powerful in eliminating incorrect words when you continue to use all available space to delve for new info.
Also you you need to determine what is that amount of irrational a word will give you . For example Arose contains manny of the most popular letters, but becuase of that it deosnt give us as much information becuase it deosnt narrow the pool of the words possible that much. You need to balance lilkeyhold of apreing and information learnt
It's not always better to stick with the green letters. For the most efficient strategy you want the word with the potential of eliminating the most possibilities from the remaining search space. Keeping the green is actually a waste because you get no new information.
My thought exactly. If the goal is just to win, and you don't care how many guesses it takes as long as it's within the limit, you should never re-guess a green until you either know the whole word or it's your last chance. In that first X-rack example, the next guess after track should be cwbdf, or something like that. If the c goes green, it's crack. If any other letter goes yellow, that tells you it's wrack, brack, drack, or frack respectively.
I mean we do care to win in as little guesses as possible, but winning on turn 1 or 2 is definitely just luck and no skill, while a 3-4 turn game is definitely more of a success. But that means that second guess can be wasted on an impossible answer if it gives a good chance of guessing on the third or fourth.
@@andrewmirror4611 I think even the first guess would look pretty random in a perfect strategy. My previous example was just to demonstrate that, like James said, keeping green letters is a waste. If you get a green, you should put that aside for later and use that slot to fish for yellows and grays, narrowing down the possibilities. Putting in the same letter does nothing for you except make it possible that you'll get lucky and guess the final word.
The two main improvements I can think of: 1) Guesses should not use green letters unless it is the last guess or you have found all 5 green letters. Each guess should try to find the most information possible, and repeatedly guessing using known letters wastes valuable information. I expect this to increase the average length of a game, but also increase the win rate. 2) Instead of guessing words which have the best weight where weight is calculated by the sum of the occurrences of its unique letters in all other words, you should use letters which are mutually exclusive and cover the most words. For example, "e" may be the most common letter, but it might be a bad guess combined with the letter "a" if words that contain a and/or e is a smaller set than, say, e and m. This may mean that the best starting words aren't real words at all, but are instead nonsense strings.
I don't think the second part matters because you want to know which letters are in the word, not which pair of letters. If there is only A, you get a big set, if only E, a big set, both A and E, a small set and neither A or E, a small set. In any case it eliminates a bigger set than let's say X and Z that eliminates only a small set if neither is in the mystery word.
I agree with the first part, I am thinking of further improvements now and this is the main one. Second - it does seem like a good idea, and it will probably could bring some percenage points to the result, but the way I think it can work - it is a very time consuming process (I mean computation time), as now you need to compare each words with each word. Will take up to a few seconds per game, I would guess (as opposed to 30 games per second it is now).
@@GamesComputersPlay If you precompute a 26x26 table (each row is a letter and each column is a letter) where you store the correlation of letter occurances you don't have to calculate this probability for each simulation. Similarly, if you want to use the probability of a letter given TWO letter occurances you could precompute a 26x26x26 matrix or if you want to use the probability of a letter given four letters you could precompute a 26x26x26x26x26 matrix (which can be stored in a +-50 megabyte file). This method does ignore positioning though.
There's still a big piece of information your algorithm doesn't account for: the positioning of the letters. Maybe I missed something but it seems you haven't included the fact that specific letters can't go in slots if they have previously come up yellow. If they could go in that slot, they would have been green. Yellow therefore actually gives you two pieces of information: a) this letter is in the word b) this letter does not go in this slot.
It was something I kept thinking about all the time while writing the code. But I still haven't figured otu how to implement it exactly. So, let's say I have 5 weights for all words - what now: take average? take a sum? median perhaps? take an average for non-green slots? The answer is out there, I feel, (and it is probably none of the above) but I am still looking.
@@GamesComputersPlay this information would help filter the list of possible words, not necessarily rank them. If a yellow "y" is in the third slot, then you would want to filter out any word like: ***y*** , probably using some ungodly regex magic. This is different than if "y" was grey, in which case you would filter any words with a y at all.
@@GamesComputersPlay just filter out anything matching the corresponding green rule, and filter out anything matching the corresponding gray rule. it's simple to implement and works well.
Great video, fun project!! Hope to see a part 2 implementing a strategy that files away the green letters and instead of guessing them again eliminates more words to then understand the full word faster.
I think the best possible algorithm would be one that tries to narrow down the search space as much as possible, in the worst case. If we start with the 2315 possible answers, and we guess "arise" (or any of its anagrams like "raise"), then no matter what pattern of colors the computer gives back, there will be a MAXIMUM of 168 possible answers that could fit that pattern. This value of 168 is the best possible value for any starting word, there is no word that can always guarantee an answer space of 167 or less after starting with it. We can keep applying this logic, reducing the number of possible answers as much as possible, until we either only have 1 left, or we stumble across the answer by luck. However, this still isn't perfect. If the only two possible answers are "dizzy" and "fizzy" then the algo might throw a word like "faded" to first distinguish the two (which will require two guesses to get it right), instead of just guessing "dizzy" and taking the 50/50 chance of getting it in just one guess. To fix this, in case of a tie for the best possible guess, then we will prioritize guesses that are actually in the answer space. The algorithm is deterministic, so I ran it once for each of the 2315 possible words to come up with an accurate probability distribution. I used all 12972 words for guessing, but the 2315 for the possible answers (which is how actual Wordle does it). Here is the score distribution: 1 - 1 2 - 53 3 - 1001 4 - 1165 5 - 59 >5 - 0 The average score is 3.56. Every single word was guessed within 5 guesses, 97.5% were guessed within 4 guesses, and over 45% were guessed within 3 guesses. If we allow the correct answer to be any one of the 12972 words from the larger set, then the best starting word is "serai", which narrows it down to 697 possibilities in the worst case (this time, we can't anagram it). The distributions are as follows: 1 - 1 2 - 66 3 - 1741 4 - 6405 5 - 4060 6 - 658 7 - 37 8 - 4 >8 - 0 The average score in this case is 4.28, slightly better than the algorithm in the video. We can solve 99.69% of words within 6 guesses. The four words that required 8 guesses are "gills", "tests", "vests", and "zests". Interesting that the maximum number of guesses is so much higher in this case. The reason that "gills" is so high is that after doing just three guesses, we are left with the words: vills,jills,hills,bills,fills,pills,kills,zills,gills,mills,cills For the other three words, after doing three guesses we have yests,fests,vests,bests,wests,zests,pests,gests,kests,tests,hests,lests,jests As you can imagine, this really sucks for the algorithm. Also, fun fact: There are 11 different ways to make a set of 5 5-letter words that cover 25 unique letters with zero repeats. A potentially viable but very risky strategy is to start with one of these sets of 5 words, then try to guess the answer on your 6th and final guess. They are: clipt jumby kreng vozhd waqfs glent jumby prick vozhd waqfs chunk fjord gymps vibex waltz fjord gucks nymph vibex waltz bemix clunk grypt vozhd waqfs brick glent jumpy vozhd waqfs blunk cimex grypt vozhd waqfs jumby pling treck vozhd waqfs brung kempt vozhd waqfs xylic brung cylix kempt vozhd waqfs bling jumpy treck vozhd waqfs
I'm working on the follow up video now, trying various new ideas - your too. Got to the "arise" 168 part too. Let's see if I can make it work better (1broun3blue video gave me an idea)
Alright, just got the results of the first try: 100% solved within 6 turns, 3.76 average length. Hm, weird it didn't match your result, I thought I was doing pretty much the same thing (build a tree, on each node choose the word that has minimal largest branch). Also, I did notice the discrepancy in your results: 1 - 1 2 - 53 3 - 1001 4 - 1165 5 - 59 >5 - 0 sum up to 2279 words, 36 words are missing. are they 6 turns words by any chance? Anyway, thanks for the idea, I'll try different optimization options now, see if there is a better option.
I got to 4,09 using the 13k word list, without any bias toward word popularity. There are one or two tricks you've missed. Reply if you want to know more...
As others have pointed out, there are opportunities to optimise further by looking at positions. So while E is a very common letter in general, in actual usage it's much, much more likely to be at the end of a word than the beginning, for example.
This was really interesting! Makes me want to strike out and do my own testing! Also a lot of fun comments with good ideas. I can only hope for a sequel/part 2 one day.
Love this episode, very visually pleasing, and something I'm already interested in. I was workng on this myself a few weeks ago. I basically created a massive matrix of every 'guess' and every 'solution', and the combination of greens, yellows and greys it gives you. At each step, it then calculates a heauristic value for each possible guess, based on the worst possible scenario in terms of words left (RAISE and it's anagram are the best starting words by this alone: the worst case scenario here is matching no letters, with 168 possible answers remaining), and the geometric mean of the number of words remaining after that guess (no real reason for doing it this way, I just tried a few things and it worked the best). The guess with the minimum value is used, and the process repeats. As pointed out in a different comment below, this method is entirely determnistic, so I can just test it for the 2315 possible answers and confirm that it always wins. With normal wordle rules, it always wins in 5 turns or fewer, with hard mode, it always wins in 6 or fewer. The algorithm often picks words that do not match the yellows/greens it already knows, which is why hard mode takes slightly longer, when it is forced to. It starts a normal game with the word LATEN, and a hard mode game with the word SWEAL, so it never wins on the first turn :(
I see what you did there, quite interesting. Let me try to poke a couple of holes in this approach. Do I understand correctsly that each node in that decision tree potentially has 243 branches (3^5) stemming from every node? I am guessing full tree is not 243^5, but still must be quite large? Also, from the the number 168 I understand you expect the answer to be from the 2315 list, right? I feel it is a little bit of cheating to use the shorter list. I mean the guy wrote a program to play with a girlfriend, he didn't expect anybody to look at the code. The fact that we have that list is just a lucky coincidence - it might have been encrypted of fed through API or something. I'd say it is fair to test it on 2315 set, but the guesser should not know 2315 list exist. What I am trying to say - how will this approach hold if you didn't expect 2315 potential answers?
@@GamesComputersPlay You are correct that there are theoretically 243 branches at each node (although only 238 are actually possible as you can never have four greens and a yellow, and in fact the starting word with the most branches is 'tares', which produces 212 different results). With the decision tree I have at the moment, there are 205 branches from the first node ('laten') but 41 of these immediately terminate (i.e. the word is already known, for example 🟨⬜🟩⬜⬜ immediately solves as 'hotly'). With less than 200 words left after each of these branches, the number of branches after the second guesses are much lower, and again, many of them terminate. The decision tree only has about 3000 nodes (much fewer than I'd initally expected). As for the second part of your comment, it's an interesting question I hadn't considered- I suppose there are two problems to solve here; solve wordle as is, and solve a wordle-style game. Of course the guesser should have some amount of knowledge of the words in play, even if this is just all the English words that exist. Based on that, I reran my code with the guesser thinking all 13k words were valid answers and, as expected, the results are worse. It now solves 2312 of the 2315 words in 6 turns, with golly/jolly/folly needing one more turn- here the sixth guess is 'feign' to disambiguate. I think it should be quite easy to find a way that always suceeds in 6 turns by slightly tweaking the calculation it uses to choose guesses. This actually also touches on something else I had considered when writing my code but didn't build in- if the program 'knew' that it only got 6 guesses (or 5, if you're trying for 5 etc.), and everything more than that was considered a loss, it would be sensible to force the sixth guess to be a word that is possible to be the solution. In my example, a sixth guess of feign guarantees that golly/jolly/folly are all solved in 7 guesses but also guarantees a loss (as feign is already known to be incorrect itself). Guessing golly as a sixth guess would mean 2313 words are now solved in 6 turns, and the last two words take 7 and 8 guesses respectively. Really looking forward to see what you do with this project.
Working on the follow up, using this approach too. Let's see what I'll get. So far the suggestion is: Maybe instead of min(max length of possible answers) we can use average, of average square of something that would work better?
there's one more metric of the guess you overlooked in the video, the position of letters is important too. lots of words end with e but a lot fewer start with it, for example. I think it's probably quite difficult to have a strategy that weights the two against eachother properly, especially with an algorithm that avoids wasted guesses, when I play myself I tend to avoid reusing greens until I have 4-5 letters or I'm on guess 4+, to get more value out of each guess. But it's hard to formulate an ideal strategy around this, that's something I do by gut feel.
given enough time, almost anyone can be taught to program. people can go their entire lives incapable of being genuinely funny. i can think of no higher praise seriously, SO MANY videos try desperately to insert jokes (failing miserably), let alone horrible 'cut away' gags yours work so well i sent them to non-programmers
A suggestion I haven't seen in these comments is to use an n-gram like approach looking at not only one letter at a time but 2,3 and 4 letter combinations to contribute to your weights. You could use this in combination with the position to add a lot of information to your guesses. This would certainly be computationally expensive, so it may not be the most practical solution.
I think it comes down to minimizing the worst-case size of the decision tree (or minimizing the branch with the highest probability if considering letter/position frequencies). Each turn has 3^5 outcomes (colors per position), and each outcome reduces the set of possible words. The best greedy move gives the biggest reduction in words for the worst-case of the 3^5 outcomes. One way to represent this problem is to make a 5*26 array of colors per letter/position for each word. For a set of possible words and one choice of letter/position, the worst possible outcome is the color shared by the most words for that letter/position, e.g. `def worst_case(letter): max([np.sum(array[words, letter, position] == c) for c in colors])` - this is usually grey, but in the leftmost case at 12:10 all remaining words have "R2 A3 C4 K5" as green. Therefore, the best individual letter for a position has the least shared colors among remaining words, e.g. `argmin([worst_case(letter) for letter in letters])`. Choosing the best move over all letter/positions is harder (26^5 moves, can be brute forced but slow) , but choosing each position independently should be a good place to start, and should cover the situation at 12:10. I think there's also a best overall sequence of moves for a fixed word distribution, but can't think of a way to efficiently construct the entire search tree. Love the video and channel BTW. It's exactly what I've wanted to see or make on youtube. Hope you keep growing!
Thanks. Yes, internally it works exactly this way - "player program" has 5 a-z lists and it removes the letters according to colors in guesses. And after thinking for a bit, I think this is where the possible improvement can be implemented too. If we have a "green", meaning one set reduced to one letter, we can temporarily remove the green, copy the longest set we have into this place and pick the word again. This way we should burn through unknown letter faster. I am probably missing something, but that's the plan so far.
The strategy I use is to start with a word with common letters but then I use the second guess to position the possible yellow letters, completely ignoring greens. If there are no yellows, I use common letters not used yet. This way I eliminate much more letters and I think it should win 100% of games.
You are probably right, I just want to note, how counter-intuitive it is. Green is supposed to be the best list filter of all letters. And here I am - throughing awa the most efficient filter, kepping the list that is probaby 10x 20x longer, to get more yellows/grays. This is definitely something to try.
I realize this video is almost two months old. By now I'm sure you realize that, at times, you should use a "burner word," as I believe it is known, that you know cannot be a solution, but is played with the idea of gaining information. For example, assume you've identified the last four letters as "ATCH" and that you also know that no "L" is in the solution. The answer to the puzzle could be BATCH, CATCH, HATCH, MATCH, PATCH, or WATCH. (Yes, keen observers will notice that GATCH, NATCH and RATCH are also words and are acceptable _guesses_ in Wordle, but these three words are not listed in the 2,309 list of words that might be _answers_.) If you just start guessing, you run the risk of not solving the puzzle at all. There are six possible answers... and by now assume you've already used a row or two. Thus, instead of guessing, you must (should) use a burner word. If you want to lower your solution row expectancy, and in this case solve the puzzle, you must play a word which you know isn't the solution to the puzzle... it won't fit at all... but will provide maximum feedback. For example, in this example you could play the word WIMPY which uses a W, an M, and a P. If the W receives a green box, the solution is WATCH. If the M receives a yellow box, the solution is MATCH. If the P receives a yellow box, the solution is PATCH. The only other possibility is that you don't receive any colored boxes at all, and if so, you've just eliminated all three of those words. You can then enter another invalid word, like CYBER, that contains a C and a B, to guarantee a solution in five rows. (If the C gets a green box the word is CATCH. If the B receives a yellow box the word is BATCH. If the C receives a yellow box you know the word is the only one left, HATCH, for a solution in 5 rows.) Also, note some valid and possible guesses are much better than other valid and possible guesses. For example, in a recent game I knew the possible answers were SLOOP, SLOSH, SLUMP, SLURP, SLUSH, or SLYLY. All six words are equally possible answers. However, of the six, SLYLY would have been a _terrible_ guess. Why? Because if it is wrong, it won't help my case any. All five of the other words would still be possible! SLYLY won't help to eliminate any of the others. A better guess would have been SLUMP or SLURP. They also have the same chance of success as SLYLY... but if they are wrong they _will_ help to eliminate one or two of the others, narrowing down my search space. I suspect your initial program did not do either of these two things. Every puzzle can be solved in five rows or less. Some of the other Wordle bots have already proven this. (And with many of them, SALET has been shown to be the best possible guess, that will lower the search space more than others.) Nice graphics and thanks for taking the time to create this video.
Hi Edward, thank you for such a detailed comment. This video is indeed a bit old - back when Wprdle had 2315 words :) I had a new one since then - and it does cover the "reusing green" question you raise - and achieve much better result with it too. Another aproach, when you concider the remaining set of words and optimize it this way - it's in there too. The program goes on to reach 3.421 average - a tie with other best algorithms, so far as I know. It uses SALET for that too. Give it a try - hope you'kk enjoy it as much as this one, hopefully even more. The graphic for solution tree in it is kinda cool, if I say so myself :)
Do. Not. Fear. The. Gray. Letters. When you come up with gray letters start stretching your mind around letters that would fit better, especially if you have yellow or green letters in your first two words. It's important to think not only one step ahead, but two steps ahead and try to see if you can't get a win on your third round instead of your fourth or later. I personally favor doing 5-letters the first round similar to what probability is showing to be the ideal probability range and then doing the second round with totally different 5-letters. You are extremely unlikely to win by round 1 or 2 but 3 is an open book. And if you fail round 3, round 4 is almost guaranteed.
I wonder if wordle solvers should be 'greedy' and try to solve at every step, or weather or not, on the second word you should try narrow the search. Lets say its my 2nd guess and I have 1 yellow. I could try to: 1)guess a word repositioning that yellow (1/4 chance to randomly get it, weighted with probabilities probably more like 1/3) 2)guess another word that doesn't contain that yellow, know I get that next word wrong, but clear another letter from the search.
I tried an algorithm based on yours, but I scored only letters we had no information about (not grey, green or orange) and not based on how frequent they were, but how close the frequency was to 50%. It resulted in an increased win percentage, but the average guess count went way up because this algorithm is completely unable to handle repeated letters.
I’d say it’s not better to reuse greens if you’re not sure what the word is yet. Looking at the sample games from your final algorithm, most losses were of the form where it had 4 right letters (usually the last 4) and kept trying to guess the first one. It’s best to use letters that are not green, yellow or gray until you have enough colors for a confident guess. If you have to reuse at all, reuse yellows since you might discover their place.
worlde is a remake of the 1970's board game Mastermind where you have to discover the 5 coloured pegs order and placement ... the major difference being worde uses words instead of coloured pegs ... yup thats right the game premise is well over 50 years old .... . btw best word choices will incorporate rstlne as the first word as they are the common letters to form a word in the english language ... so they will have the best chance of getting a hit on the first guess ...
It's actually better not to stick to the common letters, because there are lots of words containing all of them together. The best opener would be the word that has all five letters that have the least chance of being together in one word, and actually two of such words, because if you win on the first or the second turn it's straight up luck anyway
I don't have numbers to back me up, but I don't think this would work. Yellow filters down list way more efficiently than gray. Good theory to test though.
@@GamesComputersPlay To program it into the simulation one would have to get chances of letters being with every other letter, and possibly even triplets in one word, and consider those chances when doing the actual guesses, which is definitely not easy. Although thinking about that just adding consideration for the chances of letters being together could improve the winrate of the simulation even without the strat I mentioned
Yellow is a combination of an anti-green and an anti-gray. It removes words that would match the corresponding green or gray rule. This could be of use in optimizing things.
Hm, I guess you are right. But technicall any color is a combination of anti-other two, no? as there are only 3 colors? I am currenlt more trying to implement (and maybe beat?) 1b3b's approach, just trying to divide lists into minimal steps.
Not sure I know what you are talking about. You mean check every remaining word against every remaining option and see which can potentially eliminate more candidates? I thought of that, but that would mean 0(n2) complexity instead of O(n), will probably bring it to a crawl. Maybe it can kick in starting from some small number of remaining candidates?
You can always try the text mining approach and compute relative uncertainty(entropy) of each of the 13K words with the revealed letters. Can't say you'd get more than 96% win-rate though.
That's what 1blue3brown did, and I sort of replicated it (I didn't count the entropy, but the worst case longest remaining word list), it did get to 100%. More in the the upcoming video in a few days.
You can put calculate the freq of each word per position, it will improve a lot, and if u also weight each word per how freq its used in english it also help!
You are right about the word position (although we could argue about "a lot" part. Considering letter placement added 0.7% of improvement (which is not too bad when we start from 96.5% - that's a fifth! As for the letter frequency - I saw 1b3b doing that. I don't like the idea much. I would say it should be either "all words are equally possible", that is hypothetical wordle with all words, or "only 2315 words possible" - that is, this version of wordle. Current program deals with the former, but I am writing the solution for the latter option too - 100% win rate reached, now I am trying to catch up on 1b3b's average (still 0.15 worse than his solution)
@@GamesComputersPlay I guess 1b3b is doing rate based on how much % of the word list each guess cuts off. My average is on 3.69, I'm calculating the most freq letter for each position from the remaining words (every round), win rate still not 100%, 23719 busted of 1681011 games. I have some ideas based on graph search but got no time to implement that right now.
id say its probably best to only try to solve if you a) have remaining guesses >= possible words or b) are on your last guess until then you should try to gather as much information as possible youd probably do this by looking at the remaining possible words and analyzing letter frequency etc on those again and calculating the value of all words (not just the remaining possible solutions) again where the value indicates how likely it is to tell you more about the word you are looking for (the reason i bring this up is your program would often lose trying to solve with three or four greens where a lot of possible solutions still remain, in those situations knowing an extra letter helps a lot) there is probably a way to make better guesses in the long run to further increase your odds of winning but im not sure how that could look like, this seems more of a short sighted solution but i cant imagine it wouldnt improve guesses
Yep, that's exactly the problem in the current version. I am trying to solve it - I think general idea is close to what you are describing, but details are somewhat different. So far cut the loses almost about in half (up to 98.1 winrate), still working on getting to 100%.
@@GamesComputersPlay thats great! also saw 3blue1brown published a video on this aswell shortly after i made my comment, i think it would be cool to try and optimize this strategy and then compare it to what 3b1b came up with
@@Nick-pu8jg Well, TBH, he seems to have much more mathematical tool in his toolbox than I would ever have. He says 4 guaranteed turns seems to be a theoretical limit (with all the cheats and all). I'd say if I get to 5 I'd consider that a success.
I've been trying to work out the longest game that can be played in hard mode - so no reusing grey letters, must place yellow letters in different places and greens must stay in position. Best I've managed is nine rounds before being forced to win.
If accepting 4 guesses as the normal score then eliminating the 15/26 most common letters. 2 vowels in the 1st 2 words and the remaking vowel in the 3rd word elimination guess only if 2 vowels have not already been found by the 1st 2 guesses then a repeat vowel would be used in the 3rd guess regardless of position or correctness with frequency of placement in each of the 3 elimination guesses is the best option. The word "adieu" should not be considered a good guess as it wastes the majority of the vowels in 1 guess limiting how much you can eliminate with your other guesses by adding information to the number of double vowel guesses. No guess should use more then 2 vowels. Because with double vowels if you do have the vowel you already know which vowel it is that you would need to double. Essentially making at least 1 more of your guesses not eliminate an extra letter from the set of 26. The question should not be what is the best opening guess, but what are the best possible 3 guesses that will give you the most information. There is also an argument that can be made for frequency of prefixes and suffixes that could be factored into your elimination guesses. Is it more frequent to find out if all words start with ed (edict), or ends with ed (toned) to have a higher chance of getting them right to begin with on the elimination guesses. Extra checks should also be assigned for assuming guessing for double letters when you only have 4/5 of the letters after the 3rd guess based on frequency of the total number of possible outcomes when going for the 4th guess. Seeing as how the letter "s" is really powerful you would want to include it somewhere in your guesses but at which position are there more words that start with "s" or end with "s" obviously there are way more that end with "s" so having one of your starting guesses be a word that ends with "s" is almost mandatory.
A lot of solid advice there - but I feel it is more suitable for humans, rather than for an algorithm. One part though, that is quite applicable to the machine is this: "what are the best possible 3 guesses that will give you the most information." Except it should be not about 3 guesses, but about each guess. And most information is something that needs to be figured out too. It is pretty much what 1B3B did, and I am currently trying to replicate the same thing.
have u tried to consider the frequency of a letter according to its position in the word ?? it may help to try alwyas the most likely word to get info ( yes/no/not in the correct position)
Never heard of that game, but it's basically Mastermind but with 5 letters instead of 4 colored balls/panels and it shows you which letter is correct and not only the number of correct colors.
I'd probably say "different" not "a lot deeper". Ah, who am I kidding, it is a lot deeper.... Let me dig some more in the next installment, maybe I can catch up.
The claim is made that Wordle can only be played once a day. I wonder which version is being taken to be standard? I use Wordle on my mobile device, supplied by Lion Studios Plus. It supports unlimited games, gaining coins, three forms of hints that can be paid by coins, plural words, words with repeated letters, good scoring, bright colors, and a system of automatic multi-level tournaments with other players (I've reached the top just by playing constantly for an hour or two). One poster here on RU-vid claims that covering the twenty most frequent letters in the first four guesses guarantees a win in the final two lines. I'm skeptical, although his method does work very well in practice.
Hi David. Thanks for your deyailed comments. The version this was based on is the classic Wordle - the one that was before NYT bought it and removed "problematic" words. Obviously, the program didn't actually play the game - as the actual Wordle only can be played once a day. Instead, I found all the words, recreated the game rules - and simulated the game. I actually got some rules wrong, when it comes to double letters - more about that in the next video, I see you wathced it too!
This is so cool. I love watching those graphs in video form as the axis labels change over time. Do you save a graph after every run and compile them into a video sequence at the end?
Could you maybe expand the letter weighting to also consider the weighting positionally in each word? So instead of one set of letter frequencies, you'd have 5 - one for each 'column' in the game. If lots of the failed runs get stuck with only the first letter missing, perhaps it may do better by using the most common first letter in the list and prioritise that one? (Or is that already what you're doing?)
Hm... you definitely right weighting by places is something to explore (I am not doing it in the current version, it is just a one set of weights and one weight per word). But I am almost sure that the fact that fails were caused by the first letter is a coincedence. The algorythm should work fine for all letter positions. Still thinking how it can be done.
@@GamesComputersPlay you can try multiple strategies here: 1) try to optimize sum of probabilities of letters on their positions 2) optimize their product 3) optimize weighted sum of two previous strategies (All of them aren't perfect, but quite good) You are also missing a few things here: position colored by yellow only if its letter wasn't already colored by yellow or green (accounting for duplications), e.g. if target word is "rover" and guess is "error" than colors will be yellow-yellow-gray-yellow-green and not yellow-yellow-yellow-yellow-green. This also gives us additional information
i noticed in your video that it seemed you algorithm was highlighting letters that appeared only once in the word twice if you guessed a word with two of that letter e.g at 8:08 when it guessed bells and the word was steal which only had one L but it highlights both and if this was not only like a visual representation but actually how the game was being played it could influence the results
Hmmm... I see you point, but to the best of my knowledge this exactly is how Wordle would operate - if you have misplaced letter twice (when the secret word has this letter once) - both letters will be highlighted. Isn'y it so? What will happen if not this? Only one gets highlighted? Which one? Will it not result in a logical contradiction?
I am curious if you are able to come up with a strategy for Super Auto Pets. I have been thinking of developing a strategy based on mathematics, but the RNG of the game makes it a very challenging game from my puny brain to collect data from.
I do love mini-metro - played my share of hours. Will be quite challenging for the machine though: while managing the system is probably doable, building the metro system include a lot of arbitrary decisions, that will be quite difficult to put into rules and procedures.
If you have already guessed a letter correctly, wouldn't it be better to try and not use that letter in the next guesses? You won't gain any more information by putting that letter there, so it's wasted. If you could determine the word in 5 guesses, you'd use the 6th one to submit your answer
Yes, I got it in my feed too, gave it a watch today at lunch. Very interesting, and the visualization is admirable. Picked up a few ideas to improve my version too.
Well, since you asked, I cross checked all the words from the 13000 guessing list and 2300 words from the answers list and counted all the resulting greens. (You can get an average by dividing by 2315, I will list original numbers). Here's top ten: saree 1575 sooey 1571 soree 1550 saine 1542 soare 1528 saice 1512 sease 1510 seare 1491 seine 1480 slane 1480 And bottom 10, for good measure: oshac 260 onkus 258 ombus 254 xysti 253 emyds 244 hypha 242 enzym 215 emmys 210 umphs 193 imshi 191 I am not sure, however, these are truly the best starters (Saree, really?). The reason I think is getting green is not everything, yellows seems to be far more efficient towards the final goal (yes, they are not final answer, but far easier to get). Also, even with saree you would get an average of 0.68 green letters - not a huge achievement. It was an interesting suggestion though!
@@GamesComputersPlay So the word with most yellow posibilities are the ones you put in your vid? later tears, etc.? or wich ones would be the best for get yellows
@@facu8405 Well, not quite. Those were not the ones resulting in most yellow. Here are top 10 words to get max average yellow are: leear areae eerie arear areas terra arere eyers reata leers You can see why - they have doubles of popular letters.
one thing i always wondered is, why keep using words with the green letters? i mean yes, you gotta guess with the green letter on your last chance but couldnt you use that green letter slot to test other letters untill chances run out
The reason is simple - to filter down the list of remaining words. That was the goal number 1 and greens are the best filters out of all. Having said that - I am pretty sure it is the naive aproach (and this is the approach I took), and re-using the slots is the way to go.
Assuming AESORILTNUDCYMPHBGKFWVZJXQ is the order of the alphabet with the letters most used to least, I came up with the first 3 words deriving from the first 15 letters of that order. My words are ARSON, CITED and LUMPY ... perhaps if you used those 3 words first you'd have a good chance of solving this over 99% of the time.
It's all just some Python scripts. Both graphs are PyPlot, Wordle games - there is a rather simple program to draw those. Then put it all together on one picture + text about average and so on. And finally, ran it 500 times for all results from [1], [1,2] to [1..500]. (actually it starts to speed up in the end, so it's slightly more complex, but not by much) Then put all pictures together in video editor.
Well if you know the list of 2300 it actually doesn't make sense to guess from full 13k list... So if you cheat or immitate his girlfriend you might do better when you only guess the words that can be the answer
I was thinking maybe somewhere in between. This game is clearly made for (and enjoyed by) a fairly average population, so maybe find a large collection of public text and mine it for common five letter words. That should be a much smaller list than the 13k, without actually cheating.
Having longer list to choose from is a disadvantage, true. Also, as a human player I would never used at least 50% of words from the 13.000 list, probably even more. So this version is not a completely adequate representation of how an average human would play. Anyway, I thought it would be a nice tradeof for the machine: it has perfect memory, but it is also cursed by knowing too many words.
3blue1brown had a very interesting approach using the formula for information theory. So every guess is ranked (in descending order) based on how many "bits" of information it provides. So the bits of information is directly proportional to the number of future guesses it eliminates. He got it down to about 3 guesses and a 100% success rate.
You are not the first mentioning 3b1b's video, probably not the last. (And it's a very interesting video, I agree). You will hear more in the upcoming feature "Wordle 2. GCP strikes back".
Your second guess should be 5 different letters to your starting word in order to get maximum information. Bet you could get your average length down to 4
Aaaaahhh, I know which one you mean. I literally notticed that when the video was rendered and ready to go (for the 5th time, as I always keep finding stupid mistakes), and I was like - come on, no one will notice.
Yep, great video indeed. Watched it a few days ago - took similar approach, I am on 100% win rate and 3.58 average, still need to push for those 0.15 to catch up with 3b1b.
For the record, I think it's completely cheating to include words that use the same letter twice, as the structure of the game doesn't allow for adequate indication when that is the case. it's frankly shameful how often double-letter words have shown up, given hoe much of a curveball they throw into the game. I hope he left his girlfriend because she made up a word list that's just shameful
alright lad calm down there is indication in the actual game, if a letter is there once and you say a word with two of that letter it highlights only one and if two of that letter are in it then it would highlight both, just like any other letter. relax about some words lol
@@JohnDoe-ok9lh My point still stands, the game doesn't adequately inform you when there is a double letter, since the only way to get any indication of such would be to guess a word that has that letter twice already. In my opinion, that's insufficient for a game that gives you so few guesses.