Skip to main content

OpenAI gym environment for training agents on Wordle

Project description

Gym-Wordle

An OpenAI gym compatible environment for training agents to play Wordle.


User-input demo of the environment

Installation

My goal is for a minimalist package that lets you install quickly and get on with your research. Installation is just a simple call to pip:

$ pip install gym_wordle

Requirements

In keeping with my desire to have a minimalist package, there are only three major requirements:

  • numpy
  • gym
  • sty, a lovely little package for stylizing text in terminals

Usage

The basic flow for training agents with the Wordle-v0 environment is the same as with gym environments generally:

import gym
import gym_wordle

eng = gym.make("Wordle-v0")

done = False
while not done:
    action = ...  # RL magic
    state, reward, done, info = env.step(action)

If you're like millions of other people, you're a Wordle-obsessive in your own right. I have good news for you! The Wordle-v0 environment currently has an implemented render method, which allows you to see a human-friendly version of the game. And it isn't so hard to set up the environment to play for yourself. Here's an example script:

from gym_wordle.utils import play

play()

Documentation

Coming soon!

Examples

Coming soon!

Citing

If you decide to use this project in your work, please consider a citation!

@misc{gym_wordle,
  author = {Kraemer, David},
  title = {An Environment for Reinforcement Learning with Wordle},
  year = {2022},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/DavidNKraemer/Gym-Wordle}},
}

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

gym_wordle-0.1.2a0.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

gym_wordle-0.1.2a0-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file gym_wordle-0.1.2a0.tar.gz.

File metadata

  • Download URL: gym_wordle-0.1.2a0.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

File hashes

Hashes for gym_wordle-0.1.2a0.tar.gz
Algorithm Hash digest
SHA256 021dd96f85cf457b80694983feec6a0971abbdf8e4386d6e58c8710389a09ed5
MD5 b21d5e68870b85b1211b404f3e63543e
BLAKE2b-256 d6199215f1e1368a92bb7af148cade470e91ffbe3b5f744c885f2ea25d959ff8

See more details on using hashes here.

File details

Details for the file gym_wordle-0.1.2a0-py3-none-any.whl.

File metadata

  • Download URL: gym_wordle-0.1.2a0-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

File hashes

Hashes for gym_wordle-0.1.2a0-py3-none-any.whl
Algorithm Hash digest
SHA256 195728deb1a750bbbd557e85807626793f8217e12fb97e1ca8dbc1f713e691a0
MD5 d6c867a1a5c38554a4b94337b84ceef3
BLAKE2b-256 91be2d6b7c3dcba86083524e38d9fd192b528372d2a759896f0e9c7ee85ad5bc

See more details on using hashes here.

Supported by

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