How To Create Your Own Reinforcement Learning Environments | Tutorial | Part 1

In this video I lay out how to design an OpenAI Gym compliant reinforcement learning environment, the Gridworld. Despite the simplicity, we will see many parallels with the Open AI Gym, which means you can just plug and play your agents that you’ve coded up for those environments.

The Gridworld is based on the environment out of Sutton & Barto, where an agent has to navigate a grid, from the entrance to the exit. Each step receives a reward of -1, except for the terminal step, which gives a reward of 0.

In part 1 we will code up the reinforcement learning environment, and in part 2, we’ll code up the main loop and the Q learning agent to navigate our Gridworld.

Check out the accompanying explanation over at

#OpenAIGym #ReinforcementLearning #GridWorld

Code for this video is here:

Learn how to turn deep reinforcement learning papers into code:

Deep Q Learning:

Actor Critic Methods:

Curiosity Driven Deep Reinforcement Learning

Natural Language Processing from First Principles: Learning Fundamentals

Here are some books / courses I recommend (affiliate links):
Grokking Deep Learning in Motion:
Grokking Deep Learning:
Grokking Deep Reinforcement Learning:

Come hang out on Discord here:


Source of this AI Video

AI video(s) you might be interested in …