[Community Puzzle] Wordle

Thank you all for being patient. I have updated the validation process with a new set of 9935 words, each of length 6 letters. The statement and I/O protocol have also been revised to reflect these changes.
For those who have already submitted your code, I kindly request that you update your code in accordance with the new I/O protocol and validation process. I apologize for any inconvenience this may cause and appreciate your cooperation and understanding. Thank you.

6 Likes

Interesting news. Is there a link to a dictionary for offline testing? It would be more convenient than getting it from the debug output.

The word set used in the game can be found here: english-words/6letters.txt at master Ā· tanvir362/english-words Ā· GitHub

4 Likes

Thank you.

1 Like

I believe that such a change should not happend.
This is a different puzzle now and could go as Wordle 2.

1 Like

The fact is the previous Wordle optim was flawed and had to be removed anyway.

3 Likes

Hello everyone!

Can anyone tell me that where does the total guessing number comes from?
Our submitted algorithms are tested with another input that is different from the test cases of the game?

Thank you for your answer!
Have a nice day! :slightly_smiling_face:

P.S. The game is awesome!

Certainly! In order to prevent hardcoded answers, a series of tests are conducted after the submission against a different set of test cases, which are known as validation test cases. The number of guesses made for each validation test case will be added to your total guess count.

That’s Cool!

Thank you!

The list is there :slight_smile: found it right away.

Hi,
is there a way to understand why some test fail? All local tests succeed, but when submitting a couple of the m fail, and I was wondering wether is it due to calculation time or too many answers ?

I bet it’s the word set initial input, what I think happens is that some internal timers from the validator get aligned ā€œjust rightā€ (very rarely) so that the initial 1000ms almost don’t count.
From what I measured, the word set input takes ~5.5s and my initializations (before printing a guess) take 0.0004-0.001s. Maybe, at some point the input takes 4.9999s, the validator gives you time until the next rounded second (5) and the validator fails with anything (or they do any modulo operation like current_time%1000 to get the time limit, which could align in other ways). Maybe it can also fail the same way in 2nd+ turns…

And this is why I think now it happens before the first turn…
Captura

(Nevermind, after more review it should be the 2nd turn where there are more calculations in my code, it was just a very improbable result on top of that)

1 Like

question to the current top gamers @dbdr @cedricdd here : what is the trick for ~3 guess on average per validator ( 155 points / 50 validators ) . my best is 192 , so around ~4 on average

from what i have discovered , by narrowing down vocabulary on the 1st and 2nd turn with the sets of most popular unique letters , i am left with 40~90 possible guesses . next turns , i use heuristic based on linear combination of arbitrary scores for each letter constraint . i have a hard time figuring out how to guess the word on turn 3 within so many possible guesses

my current ideas are :

  • maybe there is some more advanced way to select letters on the first turns , which shrink the vocabulary to very small number of choices . how much do you guys manage to shrink the set of possible guesses on the first turns ?
  • or maybe , as the author is human and didn’t select answer words purely randomly , use a heuristic based on general real-world popularity before making a guess . so also question to @Tanvir_Ahmed , did you pick the answer words by yourself , or randomly ? :slight_smile: because in the set , there are some i’ve never seen before

Hi,

You are given the list of 9935 possible words so you can spend as long as you want locally to find the best first guess/second guesses in order to maximise the number of words that can be found for sure in 3 guesses.

Once you have done that it all comes down to luck, the average score I’m getting is ~170, I got lucky with the 155 and the 50 words that were selected.

3 Likes

Hi,

I collected all the words from different source over the internet and could not validate each one individually. Instead, I ensure they have the correct length and aren’t duplicates.

In the IDE, the solution word is fixed for each test case, but for the validation test cases, answer words are randomly chosen from the word set.

2 Likes

This was a fun problem to solve. However, at the top of the leaderboard it’s impossible to tell whether those with lower scores wrote a better algorithm or just resubmitted until they got lucky. It’s probably too late now, but it would have been nice for all 9,935 words to have been included in the validators.

In case it’s interesting to anyone, my total number of guesses across all possible words is 35,058. On average, that works out to 3.53 guesses per word and 176 guesses per submit. Here’s a distribution of how many words I can determine in a given number of guesses.

2 = 4
3 = 5662
4 = 3540
5 = 541
6 = 135
7 = 39
8 = 10
9 = 4

I’m only searching two words deep, and I’ve heavily pruned the search space with only partially validated assumptions.

You would need both, a better search tree (with much optimization) and luck too. Having all validators would probably be more straightforward to optimize (and get the score), but there are more nuances in getting a better probability of record score (for example, there were times when a tree had lower average but worse probability of getting under X score. Would it be better a tree that would get all words with 3 tries, or 40% in 2 and 60% in 4? The second one would get a better score eventually).

Anyway, for anyones reference if it’s useful, my average is 3.359 guesses per word (almost 168), the worst case is 7 guesses and the tree is optimized from top to bottom (it can fit in <50KB if you know what to trim and how to reconstruct it). My chances of getting <160 score are 2% for each try, and to get 153 I would need to hit a 1 in 7868 (I don’t think I can optimize it much more, maybe it would be possible to get it to 1/5000 but my algorithm is not that good for that). I don’t know if my tree is better than anyone else’s in the top 5…

With convolutions and that tries distribution, it’s easy to calculate chances

3 Likes