Skip to main content

Gridworlds environments for OpenAI gym.

Project description

Implementation of three gridworlds environments from book Reinforcement Learning: An Introduction compatible with OpenAI gym.

Usage

$ import gym
$ import gym_gridworlds
$ env = gym.make('Gridworld-v0')  # substitute environment's name

Gridworld-v0

Gridworld is simple 4 times 4 gridworld from example 4.1 in the [book]. There are fout action in each state (up, down, right, left) which deterministically cause the corresponding state transitions but actions that would take an agent of the grid leave a state unchanged. The reward is -1 for all tranistion until the terminal state is reached. The terminal state is in top left and bottom right coners.

WindyGridworld-v0

Windy gridworld is from example 6.5 in the book. Windy gridworld is a standard gridworld as described above but there is a crosswind upward through the middle of the grid. Action are standard but in the middle region the resultant states are shifted upward by a wind which strength varies between columns.

Cliff-v0

Cliff walking is a gridworld example 6.6 from the book. Again reward is -1 on all transition except those into region that is cliff. Stepping into this region incurs a reward of -100 and sends the agent instantly back to the start.

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_gridworlds-0.0.2.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gym_gridworlds-0.0.2-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file gym_gridworlds-0.0.2.tar.gz.

File metadata

File hashes

Hashes for gym_gridworlds-0.0.2.tar.gz
Algorithm Hash digest
SHA256 01779d99c51b86325de0ff4e3361bb47f5f6f76d94698bb302ed531bbb91a7d4
MD5 0ff7f3341325e21ecf3ed88bbc6789f0
BLAKE2b-256 5856e7cf3be8386d3e6b196b826f54499d16c914669f80a1571bee884a1d7ed7

See more details on using hashes here.

File details

Details for the file gym_gridworlds-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for gym_gridworlds-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 036641ef9aaafa8ced1e279ead9df614c5b2c004228f96ba600012fd267a7568
MD5 337fb940866a52603dff3d6af0a8dedc
BLAKE2b-256 006a62b65640733b10bcffa683c2fe28d8adc41f8a6f82c4954aad3660a8da6e

See more details on using hashes here.

Supported by

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