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

Uploaded Source

Built Distribution

gym_wordle-0.1.3-py3-none-any.whl (100.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gym_wordle-0.1.3.tar.gz
  • Upload date:
  • Size: 102.3 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.3.tar.gz
Algorithm Hash digest
SHA256 8c119c8d4492642f2d45f7b30c8181cdc0346d0c36d4e430a6fa6e8d9422291b
MD5 8d5fe9f4ba155d547da6b3a731643988
BLAKE2b-256 7abba229afd1b4bd61d24c9d4fb164525f5ee99383970512f8d9101753ce40a3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gym_wordle-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 100.1 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7edabb3ad988c7cf5a24d967f73b03ab79cd520a07af6b0e9797aea98a037feb
MD5 68471592e488dcd7b95a0a18075ecba9
BLAKE2b-256 f5dfe6a8795f79646de7f79f803819dba717ecd385be4cecc2c97b35d0a26662

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