Hacker News new | past | comments | ask | show | jobs | submit login

So, there's another evil Wordle thread on Hacker News today (https://news.ycombinator.com/item?id=29862597) and over there, I've been refining my algorith for optimal play. Here's the current approach:

    R A I S E (0 green, 0 yellow, 168 words remain)
    B L U D Y (1 green, 0 yellow, 13 words remain)
    C O U N T (2 green, 1 yellow, 2 words remain)
    V O U C H (4 green, 0 yellow, 1 word remains)
    P O U C H (5 green, 0 yellow, 0 words remain)
But what was interesting was at one point of development, it did this:

    L A R E S (0 green, 0 yellow, 576 words remain)
    T O N I C (1 green, 0 yellow, 50 words remain)
    B O O D Y (4 green, 0 yellow, 5 words remain)
    D E G U M (0 green, 2 yellow, 1 word remains)
    G O O D Y (5 green, 0 yellow, 0 words remain)
See, the "BOODY" has 4 greens, but then it went and guess "DEGUM" to eliminate a lot of possibilities!



One additional feature I was looking at for a personal implementation was picking the target word- how is it being chosen from the remaining letters after the player's first guess? Are you using a word that purposely uses fewer common letters from the set of remaining words?


No, I'm looping through all possible guess and targets and grouping possible targets by matching scoring. Then I select a guess on which one has the smallest set of possible words afterwards. For example, "SERAI" seems to be a good first word. The reason why is that even if the adversary selects the worst-case scoring of (in this case, it would be no green, no yellow), there's only 168 remaining words it could be.


Do you have the code that you use for scoring somewhere?




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: