Skip to content

SklCandy420/WORDLE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Of course! Here is a comprehensive and professional README for a Wordle Solver project on GitHub. It's designed to be clear, visually appealing, and easy for both users and potential contributors to understand.

You can copy and paste the Markdown code below directly into your README.md file.


πŸ€– Wordle Solver

Build Status PyPI Version License: MIT

A smart, efficient command-line tool to help you solve the daily Wordle puzzle with optimal guesses. This solver uses a strategy based on information theory to suggest the word that reveals the most information at each step, ensuring you solve the puzzle in the fewest tries possible.

🎬 Demo

Here's the solver in action, finding the word PROXY in just three guesses:

Wordle Solver in Action (This is a placeholder GIF. You should replace it with a recording of your own tool!)


✨ Features

  • Interactive Mode: An easy-to-use command-line interface guides you through each guess.
  • Optimal First Guess: Starts with SALET (or CRANE), a word statistically proven to be one of the best starting words.
  • Smart Filtering: Uses your feedback (🟩 Green, 🟨 Yellow, ⬜ Gray) to instantly eliminate thousands of words.
  • Information-Based Strategy: Each subsequent guess is calculated to provide the maximum possible information, drastically narrowing down the possibilities.
  • Hard Mode Support: Can operate under "Hard Mode" rules, where all revealed hints must be used in subsequent guesses.
  • Lightweight & Fast: No external dependencies needed, and it runs instantly.

πŸ› οΈ Installation

You can install the Wordle Solver in one of two ways.

Method 1: Using Pip (Recommended)

If the package is on PyPI, you can install it easily with pip.

pip install wordle-solver-cli 
# Replace 'wordle-solver-cli' with your actual package name

It's recommended to install it in a virtual environment:

python -m venv venv
source venv/bin/activate  # On Windows, use `venv\Scripts\activate`
pip install wordle-solver-cli

Method 2: From Source

If you want to run the development version or contribute, you can install it from the source code.

# Clone the repository
git clone https://github.com/your-username/your-repo.git

# Navigate to the project directory
cd your-repo

# Install the required packages (if any)
pip install -r requirements.txt

# Run the solver
python main.py # Or however your script is named

πŸš€ Usage

The solver works in a simple, interactive loop.

  1. Start the solver from your terminal:

    wordle-solver
  2. The solver will suggest its best starting word.

    πŸ€– My recommended starting word is: SALET
    
  3. Enter this word into the Wordle game at nytimes.com/games/wordle.

  4. Report the results back to the solver. Use a 5-letter code where:

    • g = Green 🟩 (correct letter, correct position)
    • y = Yellow 🟨 (correct letter, wrong position)
    • b = Black/Gray ⬜ (wrong letter)

    For example, if you guessed SALET and Wordle returned ⬜🟨🟩⬜🟨, you would type:

    > Enter the result (e.g., gybbg): bygyb
    
  5. The solver will process the clues and provide the next best guess.

    🧠 Thinking...
    βœ… Got it! There are 42 possible words left.
    πŸ€– My recommended next word is: TRAIN
    
  6. Repeat the process until the solver finds the word! The final result should be ggggg.

    > Enter the result (e.g., gybbg): ggggg
    πŸŽ‰ Excellent! We solved it.
    

🧠 How It Works

The magic behind this solver is a combination of word filtering and information theory.

  1. Word List: The solver starts with a comprehensive list of all possible 5-letter Wordle answers.
  2. Best Guess Calculation:
    • For the first guess, the solver pre-calculates or uses a known optimal word like SALET.
    • For all subsequent guesses, it determines the "best" word by calculating the entropy of each possible guess. In simple terms, it picks the word that, on average, will slash the list of remaining possibilities by the largest amount, no matter what the color feedback is. This maximizes the information gained from each guess.
  3. Filtering: Based on the gyb feedback you provide, the solver filters its word list according to these rules:
    • Green (g): Keeps only the words that have that exact letter in that exact position.
    • Yellow (y): Keeps words that contain that letter, but not in that position.
    • Black/Gray (b): Removes all words that contain that letter (unless the letter also appeared as a green or yellow in the same guess, which handles duplicate letters correctly).

This process repeats until only one word remains.


🀝 Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Please make sure to run tests and a linter before submitting a pull request.


Made with ❀️ and Python

About

Solving WORDLE is just a matter of seconds

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages