Wrote disconnect post-processing script to insert random letters into the board with the same frequencies as the letters already within the board. Add this logic to the main loop, with a warning.
import random
def impute_letters(s):
rows = [row.strip().split() for row in s.strip().split("\n")]
letters = [c for row in rows for c in row if c != "_"]
for c in s:
if c == "_":
print(random.sample(letters, 1)[0], end="")
else:
print(c, end="")
Wrote disconnect post-processing script to insert random letters into the board with the same frequencies as the letters already within the board. Add this logic to the main loop, with a warning.