[#Script #Coding] Python Reinforcement Learning using OpenAI Gymnasium – Full Course

Python Reinforcement Learning using OpenAI Gymnasium – Full Course

By freeCodeCamp.org
Published: Mar 21, 2023


freeCodeCamp.org Learn the basics of reinforcement learning and how to implement it using Gymnasium (previously called OpenAI Gym). Gymnasium is an open source Python library originally created by OpenAI that provides a collection of pre-built environments for reinforcement learning agents. It provides a standard API to communicate between learning algorithms and environments, as well as a standard set of environments compliant with that API.

Reinforcement learning is an area of machine learning concerned with how intelligent agents ought to take actions in an environment in order to maximize the notion of cumulative reward.

Google Colab Notebook (full tutorial code): https://colab.research.google.com/drive/1oNxRpRnht2Ogu5Id76YLLg_hkmwy-yKy?usp=sharing

Gymnasium documentation: https://gymnasium.farama.org/

Course developed by @EverythingTechWithMustaf
Mustaf on LinkedIn: https://www.linkedin.com/in/mustafa-esoofally-aab0501ab/

    Contents

  • (0:00:00) Introduction
  • (0:04:19) Reinforcement Learning Basics (Agent and Environment)
  • ((0:12:15) Introduction to OpenAI Gymnasium
  • (0:14:59) Blackjack Rules and Implementation in Gymnasium
  • (0:18:27) Solving Blackjack
  • (0:19:46) Install and Import Libraries
  • (0:23:19) Observing the Environment
  • (0:27:55) Executing an Action in the Environment
  • (0:33:01) Understand and Implement Epsilon-greedy Strategy to Solve Blackjack
  • (0:42:28) Understand the Q-values
  • (0:47:29) Training the Agent to Play Blackjack
  • (0:57:10) Visualize the Training of Agent Playing Blackjack
  • (1:04:34) Summary of Solving Blackjack
  • (1:09:57) Solving Cartpole Using Deep-Q-Networks(DQN)
  • (2:29:29) Summary of Solving Cartpole
  • (2:34:07) Advanced Topics and Introduction to Multi-Agent Reinforcement Learning using Pettingzoo

Learn to code for free and get a developer job: https://www.freecodecamp.org

Read hundreds of articles on programming: https://freecodecamp.org/news

Proudly powered by WordPress
Creative Commons License
EricBrooks.Com® is licensed under a Creative Commons License.

Disclaimer: The views expressed herein are solely those of Eric Brooks. They do not necessarily reflect those of his employers, friends, contacts, family, or even his pets (though my cat, Puddy, seems to agree with me on many key issues.). In accordance to my terms of use, you hereby acknowledge my right to psychoanalyze you, practice accupuncture, and mock you incessantly with every visit. As the user, you also acknowledge that the author has been legally declared a "Problem Adult" by the Commonwealth of Pennsylvania, and is therefore not responsible for any of his actions. ALSO, the political views and products advertised on this site may/may not reflect the views of Puddy or myself, so please don't take them as an endorsement. We just need to eat.


Connect