Skip to content

woctezuma/Wordle-Bot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note

I recommend to use the code at woctezuma/3b1b-wordle-solver, which is much faster!

Wordle Bot Code Quality

This repository contains Python code to solve Wordle puzzles by maximizing entropy.

Requirements

  • Install the latest version of Python 3.X.
  • Install the required packages:
pip install -r requirements.txt

Usage

To compute the optimal first guess, choose the game with --game-name:

python wordle.py --game-name wordle
python wordle.py --game-name dungleon

A pre-computed first guess can be specified with --first-guess:

python wordle.py --game-name wordle --first-guess soare
python wordle.py --game-name dungleon --first-guess ZOCFS

NB: the "ZOCFS" guess in Dungleon corresponds to 🧟👹💰🐸💀.

Alternatively, run wordle-bot.ipynb Open In Colab

Results

Using 3Blue1Brown's code with priors=get_true_wordle_prior(), suggested first guesses for Dungleon are:

  • ZOCFS🧟👹💰🐸💀 (purely_maximize_information)
  • CEBSF 💰🟡🦇💀🐸 (optimize_for_uniform_distribution)
  • ZOCFS🧟👹💰🐸💀 (look_two_ahead=False)
  • ZBCFS 🧟🦇💰🐸💀 (look_two_ahead=True)
  • AWOCS🏹🤺👹💰💀 (if only seen solutions are considered)

My adaptation of GillesVandewiele's code would suggest:

  • VZCFS👨‍🌾🧟💰🐸💀 (guesses constrained to the set of solutions)
  • ZOCFS🧟👹💰🐸💀 (unconstrained guesses)

For reference, TylerGlaiel's code would suggest:

  • MGCFS🧙‍♀️👺💰🐸💀 (guesses constrained to the set of solutions)
  • ZOCFS🧟👹💰🐸💀 (unconstrained guesses)

References