santit96 commited on
Commit
8bebef2
·
1 Parent(s): 8c1573a

Fix bug in mask update state

Browse files
Files changed (1) hide show
  1. wordle_env/state.py +1 -1
wordle_env/state.py CHANGED
@@ -74,7 +74,7 @@ def update_from_mask(state: WordleState, word: str, mask: List[int]) -> WordleSt
74
 
75
  for i, c in enumerate(word):
76
  cint = ord(c) - ord(WORDLE_CHARS[0])
77
- offset = 1 + len(WORDLE_CHARS) + cint * WORDLE_N * 3
78
  if mask[i] == SOMEWHERE:
79
  prior_maybe.append(c)
80
  # Char at position i = no, and in other positions maybe, other chars stay as they are
 
74
 
75
  for i, c in enumerate(word):
76
  cint = ord(c) - ord(WORDLE_CHARS[0])
77
+ offset = 1 + cint * WORDLE_N * 3
78
  if mask[i] == SOMEWHERE:
79
  prior_maybe.append(c)
80
  # Char at position i = no, and in other positions maybe, other chars stay as they are