Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 960 Bytes

README.md

File metadata and controls

23 lines (17 loc) · 960 Bytes

nerdle-solver

A solver for the game nerdle.

expression.txt was generated by running python3 generate.py. It contains a list of all possible length-8 expressions that evaluate to True.

The first guess is randomly generated from all possible options that don't contain repeated characters. E.g., the first guess will not have two 1's or two addition symbols. I did this to maximize the amount of information we can get from the first hint.

Below is an example of usage. You have to manually input the hints that nerdle gives you, using "G", "P", and "B" to represent the colours "Green", "Purple", and "Black".

~/nerdle-solver » python3 main.py
Input results using the letters G=Green, P=Purple, B=Black with no spaces.
Current guess: 3*7-6=15
Result: PGBGPGBB
Current guess: 9*8-9=63
Result: BGBGBGPP
Current guess: 6*6-2=34
Result: GGGGGGGG
Woohoo!

Using the script to solve nerdle