pvojnisek / wordle-helper

Solver for the popular game, Wordle
GNU General Public License v3.0
1 stars 0 forks source link

Repeated letters in suggestion causes Exception #1

Open pvojnisek opened 2 years ago

pvojnisek commented 2 years ago

How is it possible to have P yellow and gray in the same time? Todays solution is CRIMP image

pvojnisek commented 2 years ago

image image

Same letter multiple times S causes error in the flow:

Suggestion: spaes
  Enter results pattern (b-black, y-yellow, g-green):
  spaes
->gbybb
   Filtering..
Traceback (most recent call last):
  File "/workspaces/worldle-helper/src/solver.py", line 64, in <module>
    main()
  File "/workspaces/worldle-helper/src/solver.py", line 60, in main
    print(f'  {solver}')
  File "/workspaces/worldle-helper/src/solver.py", line 39, in __repr__
    return str(self._wh)
  File "/workspaces/worldle-helper/src/wordle_helper.py", line 17, in __repr__
    sample = np.random.choice(self._words, 10)
  File "mtrand.pyx", line 915, in numpy.random.mtrand.RandomState.choice
ValueError: 'a' cannot be empty unless no samples are taken

Today the solution is SUGAR. So the first S is on the right place and no other S exists. So this might be an implementation error in the algorithm - specification gap.