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.2.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: gym_wordle-0.1.2.tar.gz
  • Upload date:
  • Size: 3.0 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.2.tar.gz
Algorithm Hash digest
SHA256 bf805d6610a0b6d215a5383ebf523038f8dfbe1f208aa0b6741ece88290abef6
MD5 de1434f58d88795288a3831cb8132c4d
BLAKE2b-256 dcc3e7eac25e5dd80e7f2373c5fbc78db909cd2aedd539b20fa1c8520b59c77d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gym_wordle-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 80405ddf6e48262be71f7449b3cc4cd1cc53f62ce483ef3fa83ab820844fb9c2
MD5 3bb8111879ac6122baedf65446755e6f
BLAKE2b-256 877c0fad008a9c9ce1d7824b6a30a034cc766ec621e5fac2a0e724c6dfbf3668

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