Skip to content

Gym Armed Bandits is an environment bundle for OpenAI Gym

License

Notifications You must be signed in to change notification settings

NoblesseCoder/gym-karmedbandits

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gym-karmedbandits

A simple gym environment implementing the Multiple Armed Bandits (MAB) problem as described in chapter-2 in Reinforcement Learning: An Introduction, Richard S. Sutton & Andrew G. Barto.

Installation

git clone git@github.com:NoblesseCoder/gym-karmedbandits.git
cd gym-karmedbandits
pip install -e .

Imports

import gym
import gym_karmedbandits
env = gym.make('KArmedBandits-v0') #useage

True Value & Reward Distribution Plot

MAB_reward_dist_plot.jpg

Demo

ε-Greedy Agent to solve the stationary MAB environment

References

[1] https://stackoverflow.com/questions/45068568/how-to-create-a-new-gym-environment-in-openai

[2] https://medium.com/@apoddar573/making-your-own-custom-environment-in-gym-c3b65ff8cdaa

[3] Reinforcement Learning: An Introduction, Richard S. Sutton & Andrew G. Barto