Skip to main content

Buffalo Gym environment

Project description

Buffalo Gym

A multi-armed bandit (MAB) environment for the gymnasium API. One-armed Bandit is a reference to slot machines, and Buffalo is a reference to one such slot machine that I am fond of. MABs are an excellent playground for theoretical exercise and debugging of RL agents as they provide an environment that can be reasoned about easily. It helped me once to step back and write an MAB to debug my DQN agent. But there was a lack of native gymnasium environments, so I wrote Buffalo, an easy-to-use environment that it might help someone else.

Buffalo ("Buffalo-v0")

Default multi-armed bandit environment. Arm center values are drawn from a normal distribution (0, arms). When an arm is pulled, a random value is drawn from a normal distribution (0, 1) and added to the chosen arm center value. This is not intended to be challenging for an agent but easy for the debugger to reason about.

Using

Install via pip and import buffalo_gym along with gymnasium.

import gymnasium  
import buffalo_gym

env = gym.make("Buffalo-v0")

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

buffalo_gym-0.0.1.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

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

buffalo_gym-0.0.1-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file buffalo_gym-0.0.1.tar.gz.

File metadata

  • Download URL: buffalo_gym-0.0.1.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for buffalo_gym-0.0.1.tar.gz
Algorithm Hash digest
SHA256 f402b23bb3d002a36535e3b7429d1471b66e6f5c2d2e2bf4d763f7591632cdcf
MD5 be6e33abcee9954cdb55aaa6fba54d77
BLAKE2b-256 a36d79336ef15a11d8b0d104ad40108a9518b95b25f7b6ed5c36579bfcc16704

See more details on using hashes here.

File details

Details for the file buffalo_gym-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: buffalo_gym-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for buffalo_gym-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1ee6d22c0048fe5cb47d68cbfd5ee374b1335d178602df1564998b0809ecd26a
MD5 7221cdd3f60c7476480baaaf0408549f
BLAKE2b-256 8b5ed05027fa49757b2a5d9132644ff968f1d5508fb97890fb3fd1a9a787c87d

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