Git Product home page Git Product logo

wordle-list's Introduction

wordle-list

A randomly-ordered list of all possible words that are potentially valid guesses in wordle, taken straight from the game's source code. Use it like:

curl -s https://raw.githubusercontent.com/tabatkins/wordle-list/main/words | grep ...

Filtering Guesses With grep

If you're not familiar with using grep, it's very easy for use-cases like this; you only need the tiniest amount of regex knowledge.

Say you make the following two guesses:

 D R U N K
⬛🟩⬛🟨⬛

 F I G H T
⬛⬛🟨⬛⬛

Then you can whittle down the wordlist with the following chain of greps:

curl -s ... | grep -v [dukfiht] | grep .r... | grep n | grep -v ...n. | grep g | grep -v ..g..

which'll return the following list of potentially valid words:

groan
green
grown

The general structure of the chain of greps is always the same:

  1. Remove all the letters that returned a black tile with grep -v [abcd], putting all the rejected letters between the square brackets. grep -v means "reject anything that matches this pattern", and the pattern will match any word containing one of those letters.
  2. Force any letters that returned a green tile with grep .a..b, putting the letters in their appropriate spot and using . for anything you haven't gotten a green on yet. Make sure to pass all five characters, or else it'll match incorrectly.
  3. For any tile with a yellow, first filter for words containing the letter with grep a, then filter out words with the letter in that position with grep -v ..a..; repeating more pairs if you have multiple yellow letters. Again, make sure to include .s to fill out a full five characters, or else it'll match incorrectly.

If you used any doubled letters in your guess, it's potentially more complicated:

  • if both came up black, or both came up green, then it's fine. Just follow the above instructions like normal.
  • if one came up yellow and other came up yellow or green, it means the word definitely has two of that letter. Just follow the instructions above, but manually ignore any word that doesn't have that letter twice.
  • if one came up yellow/green and the other came up black, it means the word definitely has only one of that letter. Ignore the black tile but otherwise follow the instructions above, and manually ignore any words that do have that letter twice.

(These situations can be handled with regexes, but it's more complicated and not really worth explaining.)

wordle-list's People

Contributors

rensoliemans avatar tabatkins avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wordle-list's Issues

grep exclude characters needs to be in quotes

I had fun playing with your wordle list and culling it down with grep. It was a good exercise to learn a bit more about grep. However, in my mac terminal, I had to add quotes as follows:
curl -s https://raw.githubusercontent.com/tabatkins/wordle-list/main/words | grep -v '[dukfiht]' | grep .r... | grep n | grep -v ...n. | grep g | grep -v ..g..
...in order for the initial letter exclusions to work otherwise it threw an error:
zsh: no matches found: [dukfiht]
I really couldn't find much explanation for why I needed the quotes except for this which explains that the quotes protect the pattern from the shell interpreter.

Anyway, thought I might let you know in case you want to adjust your readme usage notes.

README Unclear

As written, the readme suggests any word that comes out of the grep could potentially be the solution. Something as simple as a statement that this is a list of valid guesses and that only a small portion of the list can actually be the solution would greatly clarify what this repository can and cannot be used for.

Missing words as of 7/27/2022

This list is missing the following words:

  • agora
  • pupal
  • lynch

All three of these words seem to be in the Wordle "dictionary" of available words for two reasons:

  1. According to this Medium article all three of these words have been answers to Wordle in the past.
  2. Wordle as of 7/27/2022 accepts all three of these words as valid guesses.

Words sorted by weight

Would it be possible to have a 2nd word list that is sorted by weight? I played around with making a list using the letter frequency in each spot to calculate a weight. Only problem I saw is that some words at the top of the list had the same letter twice. Which would be bad for an opening word. Just a thought.

cut -b1 words | sort | uniq -c > letter_frequency_1.txt
cut -b2 words | sort | uniq -c > letter_frequency_2.txt
cut -b3 words | sort | uniq -c > letter_frequency_3.txt
cut -b4 words | sort | uniq -c > letter_frequency_4.txt
cut -b5 words | sort | uniq -c > letter_frequency_5.txt

Does not contain all guess words

Tested against the original solutions list, this is missing the solutions that were removed by NY Times:

{'agora', 'fibre', 'lynch', 'pupal', 'slave', 'wench'}

All of these are allowed entries in Wordle. I wonder if anything else is missing?

Screen Shot 2022-05-22 at 12 13 39 PM

README should clarify that this is valid guesses, not valid solutions

The README states that this list comes "straight from the game's source code", but that requires clarification.

Among Wordle players, it is common knowledge that the Wordle source code contains TWO lists:

  • possible answers
  • valid guesses (a much larger list)

This repo contains the latter, not the former. It's fine if you don't want to provide the former. Still, many people who visit this repo are looking for the possible answers. You can save them some time if you let them know that they can't find it here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.