Research Article

Prediction and feature importance analysis for wordle strategy based on machine learning models

Zhiming Fan*
University of Nottingham (China)

* Corresponding author: [email protected]

Abstract

The word guessing game, Wordle, has attracted considerable attention from researchers in computer studies and mathematics due to its significant relevance. Many studies have been taken on Wordle to explore its potential in simulating human behaviors during gameplay and devising optimal strategies for players. In this paper, strategies based on mathematics theories or machine learning technologies are compared by their feature importance in order to explore whether there is a loss of feature meaning in machine learning methods. In the whole study, the effect of features and their relations to the expectations of tries of game Wordle are also explored. More specifically, this paper introduces machine learning models such as linear, random forest, bagging as well as gradient boosting decision trees to visually provide a relation between word’s features (such as repeat frequency, vowels, consonants) and the expectation of attempts in a game. After establishing machine learning models, the feature importance is derived by feature engineering techniques. The importance is then compared with spearman statistical correlations based on the dataset to hence draw the conclusion of the change of feature meaning in machine learning methods. Study results indicate that there is loss of meaning and effect of features in the better fitted prediction models (gradient boosting decision trees, random forest) compared to the statistic approaches.

Keywords: machine learning; wordle; feature importance; statisical correlation
Published: October 23, 2023
DOI: 10.54254/2755-2721/22/20231211
Volume: ACE Vol.22
pp. 158-165
Download PDF

References

  1. Short, M. B. (2022) Winning Wordle Wisely—or How to Ruin a Fun Little Internet Game with Math. The Mathematical Intelligencer, 44(3), 227-237.
  2. Anderson, B.J., & Meyer, J.G. (2022) Finding the optimal human strategy for Wordle using maximum correct letter probabilities and reinforcement learning. arXiv.
  3. Gu, W., Foster, K., Shang, J., & Wei, L. (2019) A game-predicting expert system using big data and machine learning. Expert Systems with Applications, 130, 293-305.
  4. Lahiri, A., Shah, N., Agarwal, S., & Nandakumar, V. (2023) Deterministic Algorithmic Approaches to Solve Generalised Wordle. arXiv.
  5. Hamkins, J. D. (2022) Infinite Wordle and the Mastermind numbers. arXiv.
  6. De Silva, N. (2022) Selecting Seed Words for Wordle using Character Statistics. arXiv.
  7. Bonthron, M. (2022) Rank one approximation as a strategy for Wordle. arXiv.
  8. Cunanan, M., & Thielscher, M. (2023) On Optimal Strategies for Wordle and General Guessing Games.
  9. Bhambri, S., Bhattacharjee, A., & Bertsekas, D. (2022) Reinforcement Learning Methods for Wordle: A POMDP/Adaptive Control Approach. arXiv.
  10. Lokshtanov, D., & Subercaseaux, B. (2022) Wordle is NP-hard. arXiv.
  11. Rosenbaum, W. (2022) Finding a Winning Strategy for Wordle is NP-complete. arXiv.
  12. Liu, B., Zhang, Y., & Zhang, S. (2023) Explore the difficulty of words and its influential attributes based on the Wordle game. arXiv.
  13. Liu, C. (2022) Using Wordle for Learning to Design and Compare Strategies.
  14. Hamner, B. (2022) Wordle Tweets, A daily sample of Wordle results tweets. Kaggle, https://www.kaggle.com/datasets/benhamner/wordle-tweets.
  15. Li, J., Pan, S., Huang, L. (2019) A machine learning based method for customer behavior prediction. Tehnički vjesnik, 26(6): 1670-1676.
  16. Yu, Q., Chen, P., Lin, Z. et al. (2020) Clustering Analysis for Silent Telecom Customers Based on K-means++, 2020 IEEE 4th Information Technology, Networking, Electronic and Automation Control Conference (ITNEC). IEEE,1: 1023-1027.
  17. Zhang, H., Shi, Y., Tong, J. (2021) Online supply chain financial risk assessment based on improved random forest. Journal of Data, Information and Management, 3: 41-48.
  18. Gareth, J., Daniela, W., Trevor, H., et al. (2013) An introduction to statistical learning: with applications in R. Spinger.