Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ An app runs on a watch with the patched firmware and the App Loader, both on the
| [`trip-computer`](apps/trip-computer) | A GPS speedometer and trip computer on the watch's own GPS: speed, distance, moving time, average, top speed and ascent; a page next to the face and a widget card |
| [`connect-four`](apps/connect-four) | Connect Four against a negamax bot on three levels: tap a column to drop a disc |
| [`tech-news`](apps/tech-news) | The Hacker News front page: top headlines with points, comments and age, a page next to the face and a widget card (needs FMC Companion) |
| [`word-guess`](apps/word-guess) | Guess the hidden five-letter word in six tries: a daily word, unlimited practice and statistics |

## Make your own app

Expand Down
13 changes: 13 additions & 0 deletions apps/word-guess/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
name = "word-guess"
edition.workspace = true
license.workspace = true
version.workspace = true

[dependencies]
cmf-wp2-app.workspace = true
cmf-wp2-ui.workspace = true

[[bin]]
name = "word-guess"
bench = false
40 changes: 40 additions & 0 deletions apps/word-guess/WORDS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Word Guess: word lists

Both lists are made by [`tools/gen_words.py`](tools/gen_words.py) from two public-domain sources, and the build packs
them into the app (`src/words.rs`): each word as five 5-bit letters in a `u32`, 8,636 × 4 B for the guesses and
1,890 × 2 B (indices into the guesses) for the answers, about 38 KiB of the 128 KiB image.

| File | Words | What it is |
|---|---|---|
| [`data/guesses.txt`](data/guesses.txt) | 8,636 | every word you may type, sorted |
| [`data/answers.txt`](data/answers.txt) | 1,890 | the hidden words, in the order the daily word walks through |

## Sources

**ENABLE** (Enhanced North American Benchmark LExicon, `enable1.txt`), public domain. Used for the guesses: every
five-letter word in it. Taken from <https://raw.githubusercontent.com/dolph/dictionary/master/enable1.txt>, sha256
`3f16130220645692ed49c7134e24a18504c2ca55b3c012f7290e3e77c63b1a89`.

**12dicts** 6.0.2 by Alan Beale, public domain; the author asks that its use be acknowledged, which this is. Used for
the answers: `Lemmatized/2+2+3frq.txt`, the head words of the lemmatized common-word list ranked in frequency
classes. From <http://downloads.sourceforge.net/wordlist/12dicts-6.0.2.zip>, see <http://wordlist.aspell.net/12dicts/>.

## How the answers are chosen

1. Head words (lemmas: no plural or past-tense forms) of `2+2+3frq.txt` in frequency classes 1 to 16, the most common
words in English.
2. Five lowercase letters a-z only, so no proper nouns, abbreviations or hyphens; and in ENABLE too.
3. Words ending in "s" whose first four letters are a word themselves ("jeans", "blues") are left out as plural-looking.
4. A blocklist in the script drops offensive, crude and upsetting words.
5. The rest is shuffled once with a fixed seed (splitmix64 and Fisher-Yates, written out in the script, so it is the
same on every machine). The daily word for local date D is `answers[(days from 2026-12-01 to D) mod 1890]`, so it
repeats only after about five years.

## Making them again

```bash
python apps/word-guess/tools/gen_words.py --enable enable1.txt --frq 12dicts/Lemmatized/2+2+3frq.txt
```

Any change to either list changes the daily words from then on: raise the app's version. A daily game saved with a
word that is no longer that day's is dropped when the app loads.
Loading
Loading