3b1b / 3b1b/videos

Wordle solver gives invalid 'hard mode' results

Open
#15 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
11.2k
Forks
2.1k
Avg merge
5h 49m
Merged PRs (30d)
3

Description

The hard mode solver gives this as a possible hard mode sequence:
CRANE
CACTI
CAPUT
CATCH

The third guess, CAPUT, is invalid in hard mode, because it doesn't take into account the fact that the second C in CACTI was marked as yellow.

I believe that the bug is in the `generate_pattern_grid` function, which checks if yellow squares contribute to the result with
`patterns[:, :] += tp * equality_grid[:, :, i, :].any(2)`
I can't see a way to fix it while keeping the code vectorized.

I suspect this bug also distorts the non-hard mode results, but in a way that can't be detected just by looking at the results.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.