Skip to content

Basic Python implementation of Tabular Q-Learning working with OpenAI-Gym environments

Notifications You must be signed in to change notification settings

BrunoBSM/Basic_Q-Learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Basic_Q-Learning

Basic Python implementation of Tabular Q-Learning working with OpenAI-Gym

Requirements

Usage

This implementation if of a Tabular Q-Learning, in order to change the Environment, make sure it is compatible. This means it must have a discrete state/observation space and a discrete action space. In order to choose a different Environment, simply change the following "Taxi-v2" to the name of the environment you'd like to test.

env = gym.make("Taxi-v2")

To change the parameters for learning rate, discount factor and episodes, respectively, change these lines:

lr = 0.6
gamma = 1.0
MAX_EPISODES = 1001

For learning purposes I encourage you to test different parameters and compare performances.

Useful Links

Medium Tutorial, Arthur Juliani

Q-Learning by hand example

Reinforcement Learning: An Introduction, Sutton and Barto - Amazing book on the basis for Reinforcement Learning

About

Basic Python implementation of Tabular Q-Learning working with OpenAI-Gym environments

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages