3b1b / videos

Code for the manim-generated scenes used in 3blue1brown videos
5.79k stars 1.55k forks source link

(Wordle) Does current version of simulations.py account for the double-lettering problem discussed in the 2nd video? #44

Open lucaguarro opened 2 years ago

lucaguarro commented 2 years ago

commit 63861f8eeae702ac80a156cf9c75e090337daaa2 "Fix double-letter coloring" claims to have handled the issue with edits in the wordle.py file. Assuming that simulations.py is the new name for the file, I no longer see those changes from that commit in the current version of the file.

I just want to make sure that simulations.py plays the game the "wordle" way of playing it. Can I use the code without worrying about this error?

lucaguarro commented 2 years ago

Okay looking through the current code, I believe this segment of code in the function "def generate_pattern_matrix(words1, words2)" takes care of that problem as insinuated by the comment.

def generate_pattern_matrix(words1, words2)
    ...    
    for k in range(nl):
            # If it's a match, mark all elements associated with
            # that letter, both from the guess and answer, as covered.
            # That way, it won't trigger the yellow pass.
            equality_grid[:, :, k, i].flat[matches] = False
            equality_grid[:, :, i, k].flat[matches] = False
    ...

That should put my worries at ease. If anyone could confirm that would be great.