Deep Reinforcement Learning with Python
eBook - ePub

Deep Reinforcement Learning with Python

Master classic RL, deep RL, distributional RL, inverse RL, and more with OpenAI Gym and TensorFlow, 2nd Edition

Sudharsan Ravichandiran

  1. 760 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

Deep Reinforcement Learning with Python

Master classic RL, deep RL, distributional RL, inverse RL, and more with OpenAI Gym and TensorFlow, 2nd Edition

Sudharsan Ravichandiran

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

An example-rich guide for beginners to start their reinforcement and deep reinforcement learning journey with state-of-the-art distinct algorithms

Key Features

  • Covers a vast spectrum of basic-to-advanced RL algorithms with mathematical explanations of each algorithm
  • Learn how to implement algorithms with code by following examples with line-by-line explanations
  • Explore the latest RL methodologies such as DDPG, PPO, and the use of expert demonstrations

Book Description

With significant enhancements in the quality and quantity of algorithms in recent years, this second edition of Hands-On Reinforcement Learning with Python has been revamped into an example-rich guide to learning state-of-the-art reinforcement learning (RL) and deep RL algorithms with TensorFlow 2 and the OpenAI Gym toolkit.

In addition to exploring RL basics and foundational concepts such as Bellman equation, Markov decision processes, and dynamic programming algorithms, this second edition dives deep into the full spectrum of value-based, policy-based, and actor-critic RL methods. It explores state-of-the-art algorithms such as DQN, TRPO, PPO and ACKTR, DDPG, TD3, and SAC in depth, demystifying the underlying math and demonstrating implementations through simple code examples.

The book has several new chapters dedicated to new RL techniques, including distributional RL, imitation learning, inverse RL, and meta RL. You will learn to leverage stable baselines, an improvement of OpenAI's baseline library, to effortlessly implement popular RL algorithms. The book concludes with an overview of promising approaches such as meta-learning and imagination augmented agents in research.

By the end, you will become skilled in effectively employing RL and deep RL in your real-world projects.

What you will learn

  • Understand core RL concepts including the methodologies, math, and code
  • Train an agent to solve Blackjack, FrozenLake, and many other problems using OpenAI Gym
  • Train an agent to play Ms Pac-Man using a Deep Q Network
  • Learn policy-based, value-based, and actor-critic methods
  • Master the math behind DDPG, TD3, TRPO, PPO, and many others
  • Explore new avenues such as the distributional RL, meta RL, and inverse RL
  • Use Stable Baselines to train an agent to walk and play Atari games

Who this book is for

If you're a machine learning developer with little or no experience with neural networks interested in artificial intelligence and want to learn about reinforcement learning from scratch, this book is for you.

Basic familiarity with linear algebra, calculus, and the Python programming language is required. Some experience with TensorFlow would be a plus.

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Deep Reinforcement Learning with Python als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Deep Reinforcement Learning with Python von Sudharsan Ravichandiran im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Computer Science & Computer Science General. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

Jahr
2020
ISBN
9781839215599

Appendix 1 – Reinforcement Learning Algorithms

Let's have a look at all the reinforcement learning algorithms we have learned about in this book.

Reinforcement learning algorithm

The steps involved in a typical reinforcement learning algorithm are given as follows:
  1. First, the agent interacts with the environment by performing an action.
  2. The agent performs an action and moves from one state to another.
  3. Then the agent will receive a reward based on the action it performed.
  4. Based on the reward, the agent will understand whether the action is good or bad.
  5. If the action was good, that is, if the agent received a positive reward, then the agent will prefer performing that action, else the agent will try performing other actions that can result in a positive reward. So reinforcement learning is basically a trial-and-error learning process.

Value Iteration

The algorithm of value iteration is given as follows:
  1. Compute the optimal value function by taking maximum over the Q function, that is,
  2. Extract the optimal policy from the computed optimal value function

Policy Iteration

The algorithm of policy iteration is given as follows:
  1. Initialize a random policy
  2. Compute the value function using the given policy
  3. Extract a new policy using the value function obtained from step 2
  4. If the extracted policy is the same as the policy used in step 2 then stop, else send the extracted new policy to step 2 and repeat steps 2 to 4

First-Visit MC Prediction

The algorithm of first-visit MC prediction is given as follows:
  1. Let total_return(s) be the sum of the return of a state across several episodes and N(s) be the counter, that is, the number of times a state is visited ac...

Inhaltsverzeichnis

  1. Preface
  2. Fundamentals of Reinforcement Learning
  3. A Guide to the Gym Toolkit
  4. The Bellman Equation and Dynamic Programming
  5. Monte Carlo Methods
  6. Understanding Temporal Difference Learning
  7. Case Study – The MAB Problem
  8. Deep Learning Foundations
  9. A Primer on TensorFlow
  10. Deep Q Network and Its Variants
  11. Policy Gradient Method
  12. Actor-Critic Methods – A2C and A3C
  13. Learning DDPG, TD3, and SAC
  14. TRPO, PPO, and ACKTR Methods
  15. Distributional Reinforcement Learning
  16. Imitation Learning and Inverse RL
  17. Deep Reinforcement Learning with Stable Baselines
  18. Reinforcement Learning Frontiers
  19. Appendix 1 – Reinforcement Learning Algorithms
  20. Appendix 2 – Assessments
  21. Other Books You May Enjoy
  22. Index
Zitierstile für Deep Reinforcement Learning with Python

APA 6 Citation

Ravichandiran, S. (2020). Deep Reinforcement Learning with Python (2nd ed.). Packt Publishing. Retrieved from https://www.perlego.com/book/2094762/deep-reinforcement-learning-with-python-master-classic-rl-deep-rl-distributional-rl-inverse-rl-and-more-with-openai-gym-and-tensorflow-2nd-edition-pdf (Original work published 2020)

Chicago Citation

Ravichandiran, Sudharsan. (2020) 2020. Deep Reinforcement Learning with Python. 2nd ed. Packt Publishing. https://www.perlego.com/book/2094762/deep-reinforcement-learning-with-python-master-classic-rl-deep-rl-distributional-rl-inverse-rl-and-more-with-openai-gym-and-tensorflow-2nd-edition-pdf.

Harvard Citation

Ravichandiran, S. (2020) Deep Reinforcement Learning with Python. 2nd edn. Packt Publishing. Available at: https://www.perlego.com/book/2094762/deep-reinforcement-learning-with-python-master-classic-rl-deep-rl-distributional-rl-inverse-rl-and-more-with-openai-gym-and-tensorflow-2nd-edition-pdf (Accessed: 15 October 2022).

MLA 7 Citation

Ravichandiran, Sudharsan. Deep Reinforcement Learning with Python. 2nd ed. Packt Publishing, 2020. Web. 15 Oct. 2022.