gilcot / wsa

Wordle Solving Assistant

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wordle & Lingo Solving Assistant

This works follow Jim Hall's post on Solving Wordle using the GNU/Linux commands. It automates the greping processes and should work with any POSIX shell.

Table of contents:

For other concerns, bugs submission and features requierement, go the tracker. You are also encouraged to clone this project, work on it, then make a merge request. Also feel free to distribute it. In any case, respect the GPLv3 license.

Where

The concept of Wordle can be found on many websites. Here is an not exhaustive list:

Tips and history about the game can be found here and there etc. Wordle isn't so new… Motus in France and Lingo in United Kingdom and many other countries predate it. Those games are also available for your desktop operating system or your smartphone. If you enjoy such game, there are some others you may appreciate too except that this script won't be helpful for them.

Install

Either clone the repository:

git clone https://github.com/gilcot/wsa.git
ln $(pwd)/wsa/wsa.sh ~/bin/wsa.sh

or just download the script and make it executable:

cd ~/bin
wget https://raw.githubusercontent.com/gilcot/wsa/main/wsa.sh
chmod +x wsa.sh

In both case, ensure the script is in your path (i.e. ~/bin here.)

Usage

The script uses three arguments:

  1. Well placed letters, e.g BA... after the second try
  2. Misplaced letters, e.g ..L.. or A.... after the second or first try
  3. The list of letters that don't exist in the word, e.g CRES at first try

When launched without one of the arguments, it swithes to interactively inputing them.

Before starting, prepare your restricted words list, then put it's path into the environment variable WORDLE_LIST prior. Example:

grep '^[a-z][a-z][a-z][a-z][a-z]$' /usr/share/dict/words > myguess
WORDLE_LIST=myguess wsa.sh

Note that:

  • Your words list should be all lowercase… otherwise use -i to make the searches case insentive.
  • If this environment variable is empty or unset, the script will go with system global dictionary which also contains names with title-case. That leads to some strange results that cannot be easely fixed.
  • You may use -d to display some internal informations before the results.
  • Results are often shuffled. Use -s to sort them alphabetically.

By the same way, you can change the number of propositions displayed with the environment variable WORDLE_SHOW. To play some other variant, set the length into the environment variable WORDLE_SIZE and that's all.

Here, with myguess having 8497 entries (but without: bailo, bauld and baulk), the arguments 'ba...' '..l..' 'cresmy' found out:

babul
bakal
bakli
banal

Have fun.

Misc

About

Wordle Solving Assistant

License:GNU General Public License v3.0


Languages

Language:Shell 100.0%