Using information theory, this is the optimal wordle player

Overview

enwordle

Using information theory, this is the optimal wordle player. It is written in Rust and runs on the command-line.

Theory

When you pick a word in Wordle, the game responds with 1 of 243 responses. There are five spaces and three possible responses for each (not present, wrong place, right place). 5^3 = 243. You get the most information about the word if each response is equally likely — that is, in the language of information theory, the response has the most possible entropy.

At each step, this program figures out the words that will evoke the most entropy from Wordle. It even tells you how many bits of information you are likely to get from playing the word.

This is the optimal strategy if you assume all the words in the list are equally likely to be the answer. Other people have done similar systems that do not make this assumption: https://github.com/jonhoo/roget

Usage

I usually pick the first word on the list that I think the New York Times might actually use.

To run

cargo run --release

Example: playing for "brain":

Read 12947 words. Making table...
12947 possibilities
	1 tares: 6.20 bits
	2 lares: 6.15 bits
	3 rales: 6.12 bits
	4 rates: 6.10 bits
	5 teras: 6.08 bits
	6 nares: 6.07 bits
	7 soare: 6.06 bits
	8 tales: 6.06 bits
	9 reais: 6.05 bits
What word did you pick? (0 to quit)
4
What did wordle return? (0 = not present, 1 = wrong place, 2 = right place)
11000
306 possibilities
	1 brail: 4.43 bits
	2 drail: 4.41 bits
	3 grail: 4.40 bits
	4 brain: 4.38 bits
	5 groan: 4.38 bits
	6 coria: 4.36 bits
	7 moria: 4.36 bits
	8 drain: 4.36 bits
	9 aroid: 4.35 bits
What word did you pick? (0 to quit)
3
What did wordle return? (0 = not present, 1 = wrong place, 2 = right place)
02220
6 possibilities
	1 drain: 1.79 bits
	2 brain: 1.79 bits
	3 braid: 1.79 bits
	4 craic: 1.25 bits
	5 vraic: 1.25 bits
	6 fraim: 0.65 bits
What word did you pick? (0 to quit)
1
What did wordle return? (0 = not present, 1 = wrong place, 2 = right place)
02222
1 possibilities
	1 brain: 0.00 bits
No more possibilities
You might also like...
2-player game made with Rust and
2-player game made with Rust and "ggez" engine, based on "Conway's Game of Life"

fight-for-your-life A 2-player game based on the "Conway's Game of Life", made with Rust and the game engine "ggez". Create shapes on the grid that wi

Scuffed UEFI video(bad apple) player

Bad UEFI Another day, another Bad Apple project. Video and audio are loaded from \video.uefiv and \audio.uefia respectively. (when running in QEMU esp

The fastest and highest quality audio player for Discord.

ying The fastest and highest quality audio player for Discord. Driven by a custom I/O engine and executed via ultra low overhead light threads, this l

String processing with file/line/col information and the regular rust `str` API

Simple span handling for str and &[u8] This crate exposes some of the methods that exist on str or bstr. If you are missing any you need, please open

Using bevy and custom render pipelines in order to render many objects in a forest using chunks for performance.

bevy_efficient_forest_example Using bevy and custom render pipelines in order to render many objects in a forest using chunks for performance. Grass i

3d Cellular Automata using WGPU in Rust (for the web and using compute shaders)

3D-Cellular-Automata-WGPU 3d Cellular Automata using WGPU in Rust (for the web and using compute shaders) The branches are very messy... I recommend y

A simple space shooter game. Runs in the terminal using characters-based UI. Fully written in Rust, using the
A simple space shooter game. Runs in the terminal using characters-based UI. Fully written in Rust, using the "ruscii" library.

Thrust - a terminal shooter game Originally created as a project for the "Missing Semester" course at JKU Linz (338.006). The game is entirely written

GFA visualizer, GPU-accelerated using Vulkan

gfaestus - Vulkan-accelerated GFA visualization Demo: https://youtu.be/TOJZeeCqatk gfaestus is a tool for visualizing and interacting with genome grap

Simple profiler scopes for wgpu using timer queries

wgpu-profiler Simple profiler scopes for wgpu using timer queries Features Easy to use profiler scopes Allows nesting! Can be disabled by runtime flag

Owner
Aaron Hillegass
Graduate student at Georgia Tech. Author of books on Cocoa, iOS development, and Objective-C. Founded Big Nerd Ranch.
Aaron Hillegass
A wordle implementation that I made for a competition of wordle solvers

Wordle tester A wordle implementation that I made for a competition of wordle solvers. Runs tests using a list of words and outputs the total turns ta

Shantanu Deshmukh 6 Apr 11, 2022
An application that tries to solve a Wordle puzzle only by using clues

wordlebot An application that tries to solve a Wordle puzzle only by using clues. You decide the word to discover (if you want to compete with wordleb

Rich Neswold 2 May 25, 2022
This is a tool for solving the excellent Wordle puzzle

Wordle Tool This is a tool for solving the excellent Wordle puzzle. It mainly exists as an exercise to learn the (by all accounts) equally excellent R

Brett Henderson 2 Jan 17, 2022
Eldrow: Wordle in Reverse

Eldrow: Wordle in Reverse Setup First you are gonna have to get Rust at rust-lang.org. Then, you will need to have nodejs installed. For the WebAssemb

Xuming Zeng 8 Sep 16, 2022
A reimplementation of the excellent word game Wordle by Josh Wardle.

Paudle A reimplementation of the excellent word game Wordle by Josh Wardle. This version was created using Yew and Rust. I cribbed the colors and layo

Paul Sanford 39 Dec 5, 2022
Rushes are new ephemeral projects at Hive Helsinki. Wordle is the first in this series with 48 hours time window

Rushes are new ephemeral projects at Hive Helsinki. Wordle is the first in this series with 48 hours time window

Jiri Novotny 1 Feb 24, 2022
A Wordle solving assistant

Wordler A Wordle solving assistant. What and Why? Affected by the virally memetic game wordle, but linguistically incapable of solving it, I set forth

alberto 4 Feb 18, 2022
Solves wordle optimally by means of set subdivision

rust-wordle-solver Solves wordle optimally by means of set subdivision Building and running You should probably use the release build, as the debug bu

Gorgi Kosev 3 Feb 22, 2022
An interactive, universal Wordle solver

Eldrow (Wordle in reverse) is an interactive, universal Wordle solver that attempts to achieve near to mathematically perfect performance without rely

agubelu 3 Sep 2, 2022
Wordle, but with ZK proofs!

Zordle: ZK Wordle Zordle is Wordle, but with zero-knowledge proofs. Zordle uses ZK proofs to prove that a player knows words that map to their shared

Nalin 177 Jul 2, 2023