Thanks to visit codestin.com
Credit goes to github.com

Skip to content

federicotorrielli/pywordle

Repository files navigation

PyWordle GUI

Python GUI Version

Requirements

pip install --pre toga or python3 -m pip install --pre toga

How to use it

python3 gui.py

How it works

Just input your word and the corresponding colors and the program will solve it for you.

Watch this video for a demonstration:

2022-01-23.11-55-02.mp4

Updated demonstration with a particularly difficult case (and me trying to explain what the program actually does):

2022-02-03.10-32-48.mp4

C TUI Version (Fast & Optimized)

A suckless, fast, and ultra-optimized C implementation with a Text User Interface (TUI).

Requirements

  • GCC or compatible C compiler
  • ncurses library
  • make

On Debian/Ubuntu:

sudo apt-get install build-essential libncurses-dev

On macOS:

brew install ncurses

Building

make

Configuration

Edit config.h to customize solver parameters:

  • BBQ: M-estimate smoothing parameter (default: 1.5)
  • KETCHUP: Position probability weight (default: 1.56)
  • MAYONNAISE: Letter frequency weight (default: 0.84)

These parameters are tuned for optimal word guessing performance.

Running

./wordle_solver

How to use the TUI

  1. Use arrow keys to navigate between letter positions
  2. Type letters directly to fill in your guess
  3. Press Space to cycle through colors (Grey -> Yellow -> Green)
  4. Press Enter to submit the current row and get a new suggestion
  5. Press Q to quit

The program will suggest the most probable word based on your input and display the number of remaining possible words.

Performance

The C version is highly optimized with:

  • O3 compiler optimizations
  • Native CPU architecture optimizations
  • Efficient probability calculations
  • Fast word filtering algorithms
  • Minimal memory footprint (~500KB binary)

Suckless Philosophy

This implementation follows suckless principles:

  • Single source file implementation
  • Configuration through header file (config.h)
  • No external dependencies except ncurses and standard library
  • Simple, readable code
  • Fast and efficient

About

An automatic Wordle Solver, built in Python

Topics

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •  

Languages