Skip to content

Nick-Eagles/wordle_imitation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wordle_imitation

An imitation of the Wordle game with greater customization and no daily play limit.

Installation

wordle_imitation is a collection of python scripts; it is recommended to build a conda environment (or python virtual environment) in which to install dependencies and execute the program. An environment.yml is provided in this repository for this purpose.

conda env create -f environment.yml
conda activate wordle_env

Usage

A single game of "Wordle" can be played by executing game.py (i.e. python game.py).

Configuration

A few gameplay-related settings can be configured, for now by directly modifying the global_settings variable in game.py.

  • num_guesses: the number of total guesses allowed (default: 6, as in the original Wordle)
  • num_letters: the number of letters in the hidden word (default: 5, as in the original Wordle). Setting this too high can break the program, if there are no sufficiently long words available.
  • freq_cutoff: an integer representing the minimum number of times a word must've appeared in the dataset (see "How it works" below) to be acceptable as a hidden word. Acceptable/meaningful values range from 41 to 50M, but the default of 200 seems to result in the broadest set of words that are almost always familiar. This is of course subjective, so raise the value if the hidden words are sometimes unfamiliar, and consider lowering it to allow rare words.

Display settings affecting board coloring and positioning can be similarly changed by editing the display_settings variable in game.py, but this is experimental and defaults should work well.

How it works

The set of possible hidden words is based on a small set of the COCA dataset, made available here. The publicly available words from the top 60,000 lemmas, retrieved here are gathered and pre-processed to yield 9,430 potential hidden words. This is further filtered down depending on the user settings global_settings['num_letters'] and global_settings['freq_cutoff'] (see "Configuration") to yield a smaller set of sufficiently common words of the desired length.

The game board is made possible by pygame.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published