about summary refs log tree commit diff
These utilities help to solve gurgle puzzles.


STRATEGY

1. Figure out what letters you need
2. Guess the word


WHAT YOU NEED

two files:
* solutions.txt
* guessable.txt
(a basic 5-letter-word list will suffice for both)

posix-compatible programs:
* sh
* grep
* wc
* cat
* tr
* test
* echo
* sort
* uniq
* awk


UTILITIES

* has.sh: filter program for the correct letter in an incorrect position. Called by gurg.sh
* gurg.sh: creates multiple filters for a guess in Guess Syntax
* whatToDo.sh: Gives advice on whether to guess the word, or guess unguessed letters. Has optional threshold parameter.


GUESS SYNTAX

guess G.esS

you guessed the word `guess`, and
* the G was in the correct position
* the U was not present
* the E was in the incorrect position
* the fourth s was in the incorrect position
* the fifth S was in the correct position.


EXAMPLE

```sh
cat solutions.txt | ./whatToDo.sh guessable.txt
# Outputs the Letter Frequency,
# and words that contain the Most Frequent letters.
cat solutions.txt | ./gurg.sh guess ..e.S | ./whatToDo.sh guessable.txt
# Outputs LF and words that contain MF *unguessed* letters.
cat solutions.txt |./gurg.sh guess ..e.S | ./gurg.sh ratio .at.. |./whatToDo.sh guessable.txt
# Outputs a list of Possible Solutions
cat solutions.txt |./gurg.sh guess ..e.S | ./gurg.sh ratio .at.. |./whatToDo.sh guessable.txt 5
# Outputs LF
```


CAVEATS

Currently only supports 5-letter puzzles using ascii characters. Patches welcome.