0.0.14 • Published 1 year ago

@nikku/wordle-solver v0.0.14

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Wordle Solver

CI

Get a little help solving your Wordle puzzles.

Usage

Try the demo.

Alternatively, use module exports:

import {
  suggest
} from '@nikku/wordle-solver';

const words = [ ... ];

const history = [
  [ 'hands', Array.from('??--+') ]
];

const {
  word,
  progress
} = suggest(history, words);

// then
console.log('Suggested pick: %s', word);

How it Works

The solver is implemented in lib/solver.js.

Algorithm

Every pick it chooses the next word in order to reduce the solution space as much as possible.

  • Accounts for historic picks (match, not matched, contained)
  • Scores letter occurance per column and word
  • Derives a word score
  • Adds a penalty for letter duplicates
  • Uses matched slots to guess / exclude likely letters

Performance

Solves 100% of all puzzles in an average of 3.6 steps.

$ npm run bench
...
W=1.000 S=3.559 R=1500

Solves 99% of all puzzles in an average of 4.1 steps when accepting the full dictionary as a solution:

$ FULL_DATA_SET=1 npm run bench
...
W=0.990 S=4.115 R=1500
0.0.14

1 year ago

0.0.13

2 years ago

0.0.10

2 years ago

0.0.11

2 years ago

0.0.12

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago