An optimal player for Wordle. Based on a rough understanding of information theory

Just for fun, my attempt at making an optimal player for Wordle. Based on a rough understanding of information theory, and the idea that the best guess for a given turn is the one that gives you the most information.

Usage

wordle.py will feed you the guesses for a game of Wordle. If you run python wordle.py, you’ll be launched into an interactive session, where the program outputs guesses and you just need to give it the outputs of each guess. Here’s an example session where the word was PIANO: