Skip to content

Razvan48/Wordle-Solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wordle Solver

  The first project in the course Computer Systems Architecture.


























Team Members:

1. Căpățînă Răzvan Nicolae      - 152
2. Mihalache Sebastian Ștefan   - 152
3. Petre-Șoldan Adela           - 131

Mihalache Sebastian Ștefan (https://github.com/sebimih13)
Petre-Șoldan Adela (https://github.com/adelp13)

Average number of attempts to guess the words → 4.91871835166754
The chain of attempts for each word (in the database) is written in the file solutii.txt


Requirements

Python 3.9 🐍
PyGamepip install pygame


Instructions for Use:

To play the game of Wordle → wordle.py

python wordle.py

To run the solver → solver.py

python solver.py

Project Description

The project contains 2 main files solver.py and wordle.py, which communicate using IPC (Inter-Process Communication).

When running solver.py, the Wordle game will automatically open, where the solver's attempts to find the word chosen by the game will be sent. The solver starts by generating, with the help of entropy, the most favorable word and sends it to wordle.py, and based on the feedback received, it narrows its search area, eliminating words that are not consistent with the feedback.

The received feedback consists of 5 characters which can be:

  • #538D4EV : the letter in that position is in the same position in the word to be guessed
  • #B7A148G : the letter is in the word, but in a different position
  • #3A3A3CN : the chosen word does not contain this letter

When running wordle.py, the Wordle game opens, receiving information directly from the player. If the user enters a word that is not in the database, the squares will be colored red and a short animation will run. After guessing the word, if the user presses the key "N", the game will restart with a new guess word without the need of closing and reopening the program.


References