Live data from Hacker News

Show HN: I built a Wordle decoder that guesses your guesses

github.com

1–10 of 24 posts

Re: Show HN: I built a Wordle decoder that guesses your guesses

#3
I briefly had the thought of creating a game where you get a bunch of those Wordle color square messages from in-game "friends", and maybe some side info - "Tim always guesses adieu as his first word", "Jane always uses one of her kids' names - Olive or Hazel", etc and then you have to guess the word. Haven't had time to experiment with it though so not sure how fun it'd be. I don't retain any rights to the idea if anyone wants to run with it and try it out.

Re: Show HN: I built a Wordle decoder that guesses your guesses

#7
Even using the example on the github page, it gives me a crash -

/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 `' from /usr/local/bin/wordle_decoder:23:in `load' from /usr/local/bin/wordle_decoder:23:in `'

Re: Show HN: I built a Wordle decoder that guesses your guesses

#9
post #7

Even using the example on the github page, it gives me a crash - /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_decode…

Ah, that "_1" numbered parameter syntax was added in Ruby 2.7

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.

Re: Show HN: I built a Wordle decoder that guesses your guesses

#10
the most interesting part of this imo is the heuristic it uses to find the most likely word:

    # 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/
Post reply on HN