MENU

Fun & Interesting

Building a Custom Environment for Deep Reinforcement Learning with OpenAI Gym and Python

Nicholas Renotte 151,374 4 years ago
Video Not Working? Fix It Now

Tired of working with standard OpenAI Environments? Want to get started building your own custom Reinforcement Learning Environments? Need a specific Python RL environment built for a project you’re working on in the field? In this video you’ll learn how to do exactly that in 25 minutes. In this video you’ll learn how to build a basic custom reinforcement learning environment to get started with reinforcement learning. We’ll go through how to build your own environment class, setting up the __init__, step and reset methods and then train a simple RL model to learn how to interact with it using Python, Keras-RL and OpenAI Gym. In this video you'll go through: 1. How to build a  custom environment with OpenAI  Gym 2. Training a DQN Agent on a Custom OpenAI Environment 3. Testing out a Reinforcement Learning agent on a Custom Environment Get the CODE: https://github.com/nicknochnack/OpenAI-Reinforcement-Learning-with-Custom-Environment Chapters 0:00 - Start 0:30 - Cloning Baseline Reinforcement Learning Code 3:12 - Custom Environment Blueprint and Scenario 5:22 - Installing and Importing Dependencies 7:44 - Creating a Custom Environment with OpenAI Gym 9:21 - Coding the __init__() method for a OpenAI Environment 12:26 - Coding the step() method for an OpenAI Environment 16:50 - Coding the reset() method for an OpenAI Environment 17:23 - Testing a Custom OpenAI Environment 20:29 - Training a DQN Agent with Keras-RL 23:48 - Running a DQN Agent on a Custom Environment using Keras-RL Oh, and don't forget to connect with me! LinkedIn: https://www.linkedin.com/in/nicholasrenotte Facebook: https://www.facebook.com/nickrenotte/ GitHub: https://github.com/nicknochnack Happy coding! Nick P.s. Let me know how you go and drop a comment if you need a hand!Tired of working with standard OpenAI Environments?

Comment