An Exact Solution to Wordle
成果类型:
Article
署名作者:
Bertsimas, Dimitris; Paskov, Alex
署名单位:
Massachusetts Institute of Technology (MIT)
刊物名称:
OPERATIONS RESEARCH
ISSN/ISSBN:
0030-364X
DOI:
10.1287/opre.2022.0434
发表日期:
2025
关键词:
Dynamic Programming
Artificial intelligence
Bellman equation
Wordle
摘要:
In this paper, we propose and scale a framework based on exact dynamic programming to solve the game of Wordle, which has withstood many attempts to be solved by a variety of methods ranging from reinforcement learning to information theory. First, we derive a mathematical model of the game, present the resultant Bellman equation, and outline a series of optimizations to make this approach tractable. We then outline how to extend the framework to solve variants of the game-such as Wordle Hard Mode, optimizing for the worst case, and optimizing under nonuniform word probabilities-and present results for all game variants considered. We show that the best starting guess is SALET, that the algorithm finds all hidden words in at most five guesses, and that the average number of guesses starting with SALET is 3.421. We conclude by presenting experiments that illuminate why some approximate methods have struggled to solve the game, which our framework successfully circumvents because of its exact nature. We have also implemented our algorithm at wordleopt.com, so that the reader may interact with the optimal policy.
来源URL: