Deep Reinforcement Learning Tutorial for Python in 20 Minutes




[ad_1]

Worked with supervised learning?

Maybe you’ve dabbled with unsupervised learning.

But what about reinforcement learning?

It can be a little tricky to get all setup with RL. You need to manage environments, build your DL models and work out how to save your models down so you can reuse them. But that shouldn’t stop you!

Why?

Because they’re powering the next generation of advancements in IOT environments and even gaming and the use cases for RL are growing by the minute. That being said, getting started doesn’t need to be a pain, you can get up and running in just 20 minutes working with Keras-RL and OpenAI.

In this video you’ll learn how to:
1. Create OpenAI Gym environments like CartPole
2. Build a Deep Learning model for Reinforcement Learning using Tensorflow and Keras
3. Train a Reinforcement Learning model using Deep Q Policy based learning using Keras-RL

Github Repo for the Project: https://github.com/nicknochnack/TensorflowKeras-ReinforcementLearning

Want to learn more about it all:
Open AI Gym: https://gym.openai.com/envs/
Keras RL: https://keras-rl.readthedocs.io/

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!

Music by Lakey Inspired
Chill Day – https://www.youtube.com/watch?v=3HjG1Y4QpVA

Source


[ad_2]

Comment List

  • Nicholas Renotte
    December 7, 2020

    Great video! Got it up and running in no time. One question tough: What exactly does the value of 4 out of env.observation_space.shape[0] represent? Isn't the state supposed to be a pixel vector? Or is this some kind of abstraction openAI makes?

  • Nicholas Renotte
    December 7, 2020

    Does this work with other OpenAI Gym environments like Atari?

  • Nicholas Renotte
    December 7, 2020

    Thanks for the greate video. When I run the code 'dqn.fit(env,nb_steps=50000, visualize=False, verbose=1)', I got the error "get_recent_state() missing 1 required positional argument: 'current_observation'"

  • Nicholas Renotte
    December 7, 2020

    nice pace and simple work through, love it man.

  • Nicholas Renotte
    December 7, 2020

    Nice introduction. It seems the DQN method is value-based even you are using BoltzmanQPolicy. BoltzmanQPolicy is like epsilon-greedy, a method to balance exploitation and exploration. Methods like DPG, PPO, A2C, and DDP can be considered as policy-based methods.

  • Nicholas Renotte
    December 7, 2020

    I got a probleme at the Step 3

    3. Build Agent with Keras-RL
    the error is : "TypeError: len is not well defined for symbolic Tensors. (dense_2/BiasAdd:0) Please call `x.shape` rather than `len(x)` for shape information."
    does anyone have a solution?

  • Nicholas Renotte
    December 7, 2020

    AttributeError: 'Sequential' object has no attribute '_compile_time_distribution_strategy'
    when i try dqn.compile, any idea?
    i tried copying the code itself but the error continues.

  • Nicholas Renotte
    December 7, 2020

    hi, when i run the first program , i get output but the gui cartpole freezes up. any idea what going on?

  • Nicholas Renotte
    December 7, 2020

    Wow, this was very interesting. Great video. I've been interested in trying to use Deep-RL on android games. Do you know how one could go about this? I was thinking of using screenshots as inputs to the DQN. i'd have to create a custom environment, right? Is this something you are familiar with? Thanks again for the video.

  • Nicholas Renotte
    December 7, 2020

    great tutorial! keep making more

  • Nicholas Renotte
    December 7, 2020

    Awesome video! I just started my master in AI and seeing your videos helps a lot to remember a couple “key” things before the start of the semester!

    I also just started a YT channel, if you’re down we could maybe see how we could create something together, might be fun!

    Have a good day 👋🏼

Write a comment