Skip to main content

OpenAI gym environment for training agents on Wordle

Project description

gym-wordle

A wordle environment for openai/gym

Installation

Install openai-gym

then install this package with pip install -e .

Usage

import gym 
import gym_wordle
env = gym.make('Wordle-v0')

See the docs for more info

Environment details

This environment simulates a game of wordle using a wordle python clone from https://github.com/bellerb/wordle_solver

The action space is a discrete space of 12972 numbers which corresponds to a word from a list of all allowed wordle guesses and answers The observation space is a dict with the guesses and colors for the current game. Guesses is an array of shape(5,6) #5 letters and 6 rows where each element is a number from 0-26 where 0 is '' and 26 is z Colors is an array of the same shape, only each element is a number from 0-2 where 0 is a blank (or black or grey) square, 1 is a yellow square, and 2 is a green square

The reward calculation is as follows:

The agent gets 1-6 points depending on how fast the agent guesses the word. For example, getting the word on the first guesses rewards 6 points, getting the word on the second guess rewards 5 points, etc

The agent also is rewarded for colors in the current row (so the current guess). Right now, the agent is rewarded 3 points for each green tile, and 1 point for each yellow tile. No points are giving for grey tiles

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

alt_gym_wordle-0.7.15.tar.gz (41.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

alt_gym_wordle-0.7.15-py3-none-any.whl (42.9 kB view details)

Uploaded Python 3

File details

Details for the file alt_gym_wordle-0.7.15.tar.gz.

File metadata

  • Download URL: alt_gym_wordle-0.7.15.tar.gz
  • Upload date:
  • Size: 41.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12

File hashes

Hashes for alt_gym_wordle-0.7.15.tar.gz
Algorithm Hash digest
SHA256 eb3dc3db31fa0dd4469f6cba5a0707dc3ed05727f60e6b54f74c7b21ebbd3308
MD5 af26d7e62095a80cae39bc75cbaa2c41
BLAKE2b-256 a62f9a13889d66a8263838810ef33478f43e888f9eaf64ac48a91dd157a6416a

See more details on using hashes here.

File details

Details for the file alt_gym_wordle-0.7.15-py3-none-any.whl.

File metadata

  • Download URL: alt_gym_wordle-0.7.15-py3-none-any.whl
  • Upload date:
  • Size: 42.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12

File hashes

Hashes for alt_gym_wordle-0.7.15-py3-none-any.whl
Algorithm Hash digest
SHA256 c2d7afd54288259a0ec29c34cfddecc5360fbe4a7d19a9407ec08e862bfc29b9
MD5 b05665685490f6c3a53ce8f4b35bcb01
BLAKE2b-256 2aa1a247b9068178d4e25368522ee300731761b1801ec3db5256fcca5755a2e4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page