Show HN: I built a Wordle decoder that guesses your guesses
github.com
github.com
# Greatly penalize words that have multiple of the same black letters
# Greatly penalize words that have the same black letters as any seen word
# Greatly penalize words that have the same yellow letter/index pair as any seen word
# Reward words that have yellow letters that match yellow letters in seen words, but in different positions
# Reward words that have yellow letters that match green letters in seen words
# Penalize words that have yellow letters that don't appear in seen words
# Penalize words that have green letters that don't appear in seen words
# Rewards words based on commonality
# Reward/penalize words based on line indexes and common letters
I built something similar to this that just lists all the possible words, and is nowhere near as smart -- but it lets you draw pretty pictures! https://jse.li/wordle-reverse/I like your project, very creative!
That aside, I started playing a 6 letter variant and, while I haven't done any sort of analysis with access to the word list, I did do a quick Word Hippo analysis of words with common letters, especially vowels, and while I'm sure my results aren't optimal they're probably pretty good.
ADDED: Which I think is probably not all that different from what your code is doing. I fed Word Hippo 4 or 5 letters and told it to come up with some common words.
But that still requires an assumption that a player has given some thought to good starting guesses.
O = incorrect (white)
~ = wrong place (yellow)
# = correct (green)
Daily Octordle #40 / octordle.com
OOOOO ~~~OO
OO~OO OOOOO
~O~O~ OOOOO
OOOOO O~#OO
OO~OO OOOOO
#OOOO O##OO
OOOOO #####
#OOOO ·····
OOOOO ·····
OOOOO ·····
OOOOO ·····
##### ·····
~~O~O O~~OO
OOOO~ OOO~O
OOOOO OOOO~
###O# OO#OO
#OOOO OOOOO
OO#OO #####
OO#O~ ·····
O~OOO ·····
O~~~# ·····
O~O~O ·····
O~O~O ·····
OOOOO ·····
##### ·····
O#OOO OOOOO
OOO~O ~OOO~
OOOO~ O~#OO
OO~OO #OOOO
OOOOO #####
#O~O# ·····
~O~OO ·····
##### ·····
O#~#O ~#O~O
OOOOO OOOO~
OOOOO OOOOO
OO~O~ ~O~##
OOOOO ~OOOO
O~~OO OO~~O
#~~OO OO~O~
O#~OO O#OOO
O#OO~ #####
##O## ·····
##### ·····
(This one was difficult and/or arbitrary, I normally try and complete Octordle in 11 guesses, i.e. the 8 correct answers plus three extra.)My first three guesses, base64 encoded: VEFSRUQKTE9JTlMKQ0hVTVAK
Throwing in those extra hints about the players make it feel more like a zebra puzzle, but that's not a bad thing, especially if you want mere humans to solve it. I can't easily process a thousand tweets, so giving more compact data is key.
/Library/Ruby/Gems/2.6.0/gems/wordle_decoder-0.1.2/lib/wordle_decoder/wordle_share.rb:8:in `block in final_line?': undefined local variable or method `_1' for WordleDecoder::WordleShare:Class (NameError) from /Library/Ruby/Gems/2.6.0/gems/wordle_decoder-0.1.2/lib/wordle_decoder/wordle_share.rb:8:in `any?' from /Library/Ruby/Gems/2.6.0/gems/wordle_decoder-0.1.2/lib/wordle_decoder/wordle_share.rb:8:in `final_line?' from /Library/Ruby/Gems/2.6.0/gems/wordle_decoder-0.1.2/bin/wordle_decoder:14:in `<top (required)>' from /usr/local/bin/wordle_decoder:23:in `load' from /usr/local/bin/wordle_decoder:23:in `<main>'
I actually hadn't used that syntax before this project, was interested in trying it out. I'll document that it only works with 2.7 or later.
Let's give the secret word more context, try to guess a keyword on this day: https://peotik.com/otd/
Contains SPOILERS for today's word.
The base confidence score is determined based on how many words a guess technically could be, that's here - https://github.com/mattruzicka/wordle_decoder/blob/0bfd7eaac...
Then, I sort of just willy nilly add/subtract from that based on the "intrinsic" score of the word which is computed here - https://github.com/mattruzicka/wordle_decoder/blob/0bfd7eaac... and then the "contextualized" score AKA how well it works with other words, which is computed here - https://github.com/mattruzicka/wordle_decoder/blob/0bfd7eaac...