Text Environments forked from OpenAI Gym
Project description
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 |
Compatibility
gym>=0.26
: Please usegym_toytext>=0.26
.gym>=0.19, gym<0.26
: Please usegym_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()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gym-toytext-0.26.0.tar.gz
(9.4 kB
view hashes)
Built Distribution
Close
Hashes for gym_toytext-0.26.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e1d66c75406b78e4202170d1c4177d91125f9f1f63b0ca6b7aff8cc36e0842c |
|
MD5 | 5141215e13e624b5c04ba73936883ad5 |
|
BLAKE2b-256 | 1c7017d9fee2f315e8e2ec24a2ca40a3c91c266e540f31f80f495f4712f1697b |