Skip to main content

gym_toytext

This repository contains the text environments previously present in OpenAI Gym <0.20. These environments had been in the master branch of openai/gym but later excluded in this pull.

List of environments

environment commit history first committer
GuessingGame-v0 guessing_game.py @JKCooper2
HotterColder-v0 hotter_colder.py @JKCooper2
KellyCoinflip-v0 and KellyCoinflipGeneralized-v0 kellycoinflip.py @gwern
NChain-v0 nchain.py @machinaut
Roulette-v0 roulette.py @gdb

We also provide alternative versions of GuessingGame:

  • GuessingGame-v1 and GuessingGameRange-v1 use different default parameters.
  • GuessingGameRange-v0 and GuessingGameRange-v1 show observations in the format of (low, high).

Compatibility

  • gym>=0.26: Please use gym_toytext>=0.26.
  • gym>=0.19, gym<0.26: Please use gym_toytext==0.25.

Install

pip install gym-toytext

Usage

import gym
import gym_toytext

env = gym.make("GuessingGame-v0")
observation, info = env.reset()
low, high = env.action_space.low, env.action_space.high
while True:
    action = (low + high) / 2.
    observation, reward, termination, truncation, info = env.step(action)
    if termination or truncation:
        break
    if observation == 1:
        low = action
    elif observation == 3:
        high = action
env.close()

Metadata

Release files for gym-toytext 0.26.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gym-toytext 0.26.1
File Size Uploaded
gym-toytext-0.26.1.tar.gz 10.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gym-toytext 0.26.1
File Interpreter ABI Platform
gym_toytext-0.26.1-py3-none-any.whl Python 3 none any Details

Total release size: 21.6 kB

Release files / gym-toytext-0.26.1.tar.gz

Download URL gym-toytext-0.26.1.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
67760d87c272f59ab95497c5098c35476b607a6cc678c5bd8a3fc47b4e8ff74a
BLAKE2b-256 checksum
How to use checksums
5763b816fe354c952078b973b86ca814ab8676c874383755694e513993e4daab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.11.1 requests/2.28.1 setuptools/65.6.3 requests-toolbelt/1.0.0 tqdm/4.66.4 CPython/3.11.0

Release files / gym_toytext-0.26.1-py3-none-any.whl

Download URL gym_toytext-0.26.1-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d19276b184bcd1b255135236fa8c816fb40230521aa0de6819ef7db7ffd364b5
BLAKE2b-256 checksum
How to use checksums
ffb7cc3cb49525cb7e549588a3960ac3833bca357d537a90f6ba3eb9b8110678
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.11.1 requests/2.28.1 setuptools/65.6.3 requests-toolbelt/1.0.0 tqdm/4.66.4 CPython/3.11.0

Release history Release notifications | RSS feed

This release

0.26.1 This release

2 release files

0.25.0

2 release files

0.20.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page