-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calculation of remaining possibilites is incorrect #2
Comments
You're exactly right! This has been on my mind to fix for a while, but I haven't gotten around to it (obviously). I'll rework this logic soon and make the logic better. Thanks for the detailed report with the reproduction steps included - it's very helpful! I've only noticed it while playing but never wrote anything down. |
Great, that's much better than me having to manually build the regexes when I really want to know how many possibilites are left in a game. Looking forward to the improved logic. Shouldn't be too hard to implement, I think. |
I'll check it out. I also created my own offline application to do this for me (too impatient), and I can check your implementation against that (because I know it is pretty reliable). |
Edit: My browser must have cached something, because when I tested again, it provided the correct numbers. |
Yeah, I think that you got hit by a service worker cache or something. I should make that a better experience. Thanks for the thorough testing!! |
Seems there is a case you have missed: https://evancharlton.github.io/ordle/#/nb-no/10150 Input RISTE at first line, and there will be 289 remaining possibilites, which is correct. I'm guessing the problem is that you don't eliminate all words with two T's in them. The correct answer does contain one T, but |
Hei! Sorry, I was offline for a bit. Thanks for the fresh (& detailed!) report - I'll take a look at fixing this one, too :) |
If the criteria for "remaining possible words" is that the possible words satisfy the already known information, then the current calculation is wrong.
The calculation has multiple deficiencies. It does not require that yellow letters be included, but it will (correctly) exclude them from being included at positions where they have already been tried. It also does not exclude gray letters where the same letter has been found in the correct place (hence being green). In that case, the player knows that there will be only one occurrence of that particular letter, but the calculation of remaining possibilities does not take that into account.
The net result is that the shown number of remaining possibilities usually is way higher than what is real (given that the player actually uses the known information correctly). Whether it is like this on purpose I don't know, but I'd have liked to see the real number of possibilities instead of the (most often) inflated number that it shows in the current version.
Here's an example game:
https://evancharlton.github.io/ordle/#/nb-no/2963
Let's say the player enters the word RISTE at the first line for this game. The game will now claim that there are 261 possible words left, by excluding the letters R and T everywhere, excluding I at position 2 and excluding E at position 5, and also requiring S at position 3. However, it does not require that I and E be present in the word, which I think it should have. If it had done that, it would have found the real number of possible words, which is just 4. That's a big difference to the 261 that the game claims.
The player now enters the word ISSEN at line number two. The game will now claim that there are still 120 possible correct words, by excluding the letters R, T and N everywhere, excluding I at position 1 and 2, excluding S at position 2, excluding E at position 4 and 5, and requiring S at position 3. The letter S should now be excluded everywhere except in position 3 (but the game only excludes it in position 2), and it should also require I and E to be present. Had it done that, it would have arrived at the correct number of possibilites, which is just 2 (not 120). The two remaining possible words are now DESIM and EKSIL, and if the player enters DESIM, the game will still claim 7 remaining possibilities, but in reality there is just one.
The text was updated successfully, but these errors were encountered: