0%

Discover recipes for developing AI applications to solve a variety of real-world business problems using reinforcement learning

Key Features

  • Develop and deploy deep reinforcement learning-based solutions to production pipelines, products, and services
  • Explore popular reinforcement learning algorithms such as Q-learning, SARSA, and the actor-critic method
  • Customize and build RL-based applications for performing real-world tasks

Book Description

With deep reinforcement learning, you can build intelligent agents, products, and services that can go beyond computer vision or perception to perform actions. TensorFlow 2.x is the latest major release of the most popular deep learning framework used to develop and train deep neural networks (DNNs). This book contains easy-to-follow recipes for leveraging TensorFlow 2.x to develop artificial intelligence applications.

Starting with an introduction to the fundamentals of deep reinforcement learning and TensorFlow 2.x, the book covers OpenAI Gym, model-based RL, model-free RL, and how to develop basic agents. You'll discover how to implement advanced deep reinforcement learning algorithms such as actor-critic, deep deterministic policy gradients, deep-Q networks, proximal policy optimization, and deep recurrent Q-networks for training your RL agents. As you advance, you'll explore the applications of reinforcement learning by building cryptocurrency trading agents, stock/share trading agents, and intelligent agents for automating task completion. Finally, you'll find out how to deploy deep reinforcement learning agents to the cloud and build cross-platform apps using TensorFlow 2.x.

By the end of this TensorFlow book, you'll have gained a solid understanding of deep reinforcement learning algorithms and their implementations from scratch.

What you will learn

  • Build deep reinforcement learning agents from scratch using the all-new TensorFlow 2.x and Keras API
  • Implement state-of-the-art deep reinforcement learning algorithms using minimal code
  • Build, train, and package deep RL agents for cryptocurrency and stock trading
  • Deploy RL agents to the cloud and edge to test them by creating desktop, web, and mobile apps and cloud services
  • Speed up agent development using distributed DNN model training
  • Explore distributed deep RL architectures and discover opportunities in AIaaS (AI as a Service)

Who this book is for

The book is for machine learning application developers, AI and applied AI researchers, data scientists, deep learning practitioners, and students with a basic understanding of reinforcement learning concepts who want to build, train, and deploy their own reinforcement learning systems from scratch using TensorFlow 2.x.

Table of Contents

  1. TensorFlow 2 Reinforcement Learning Cookbook
  2. Why subscribe?
  3. Contributors
  4. About the author
  5. About the reviewer
  6. Packt is searching for authors like you
  7. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
    4. Download the example code files
    5. Download the color images
    6. Conventions used
    7. Get in touch
    8. Reviews
    9. Technical requirements
    10. Building an environment and reward mechanism for training RL agents
    11. Getting ready
    12. How to do it…
    13. How it works…
    14. Implementing neural network-based RL policies for discrete action spaces and decision-making problems
    15. Getting ready
    16. How to do it…
    17. How it works…
    18. Implementing neural network-based RL policies for continuous action spaces and continuous-control problems
    19. Getting ready
    20. How to do it…
    21. How it works…
    22. Working with OpenAI Gym for RL training environments
    23. Getting ready
    24. How to do it…
    25. How it works…
    26. See also
    27. Building a neural agent
    28. Getting ready
    29. How to do it…
    30. How it works…
    31. Building a neural evolutionary agent
    32. Getting ready
    33. How to do it…
    34. How it works…
    35. See also
    36. Technical requirements
    37. Building stochastic environments for training RL agents
    38. Getting ready
    39. How to do it…
    40. How it works…
    41. Building value-based reinforcement learning agent algorithms
    42. Getting ready
    43. How to do it…
    44. How it works…
    45. Implementing temporal difference learning
    46. Getting ready
    47. How to do it…
    48. How it works…
    49. Building Monte Carlo prediction and control algorithms for RL
    50. Getting ready
    51. How to do it…
    52. How it works…
    53. Implementing the SARSA algorithm and an RL agent
    54. Getting ready
    55. How to do it…
    56. How it works…
    57. Building a Q-learning agent
    58. Getting ready
    59. How to do it…
    60. How it works…
    61. Implementing policy gradients
    62. Getting ready
    63. How to do it…
    64. How it works…
    65. Implementing actor-critic RL algorithms
    66. Getting ready
    67. How to do it…
    68. How it works…
  8. Chapter 3: Implementing Advanced RL Algorithms
    1. Technical requirements
    2. Implementing the Deep Q-Learning algorithm, DQN, and Double-DQN agent
    3. Getting ready
    4. How to do it…
    5. How it works…
    6. Implementing the Dueling DQN agent
    7. Getting ready
    8. How to do it…
    9. How it works…
    10. Implementing the Dueling Double DQN algorithm and DDDQN agent
    11. Getting ready
    12. How to do it…
    13. How it works…
    14. Implementing the Deep Recurrent Q-Learning algorithm and DRQN agent
    15. Getting ready
    16. How to do it…
    17. How it works…
    18. Implementing the Asynchronous Advantage Actor-Critic algorithm and A3C agent
    19. Getting ready
    20. How to do it…
    21. How it works…
    22. Implementing the Proximal Policy Optimization algorithm and PPO agent
    23. Getting ready
    24. How to do it…
    25. How it works…
    26. Implementing the Deep Deterministic Policy Gradient algorithm and DDPG agent
    27. Getting ready
    28. How to do it…
    29. How it works…
  9. Chapter 4: Reinforcement Learning in the Real World – Building Cryptocurrency Trading Agents
    1. Technical requirements
    2. Building a Bitcoin trading RL platform using real market data
    3. Getting ready
    4. How to do it…
    5. How it works…
    6. Building an Ethereum trading RL platform using price charts
    7. Getting ready
    8. How to do it…
    9. How it works…
    10. Building an advanced cryptocurrency trading platform for RL agents
    11. Getting ready
    12. How to do it…
    13. How it works…
    14. Training a cryptocurrency trading bot using RL
    15. Getting ready
    16. How to do it…
    17. How it works…
  10. Chapter 5: Reinforcement Learning in the Real World – Building Stock/Share Trading Agents
    1. Technical requirements
    2. Building a stock market trading RL platform using real stock exchange data
    3. Getting ready
    4. How to do it…
    5. How it works…
    6. Building a stock market trading RL platform using price charts
    7. Getting ready
    8. How to do it…
    9. How it works…
    10. Building an advanced stock trading RL platform to train agents to mimic professional traders
    11. Getting ready
    12. How to do it…
    13. How it works…
  11. Chapter 6: Reinforcement Learning in the Real World – Building Intelligent Agents to Complete Your To-Dos
    1. Technical requirements
    2. Building learning environments for real-world RL
    3. Getting ready
    4. How to do it…
    5. How it works…
    6. Building an RL Agent to complete tasks on the web – Call to Action
    7. Getting ready
    8. How to do it…
    9. How it works…
    10. Building a visual auto-login bot
    11. Getting ready
    12. How to do it…
    13. How it works…
    14. Training an RL Agent to automate flight booking for your travel
    15. Getting ready
    16. How to do it…
    17. How it works…
    18. Training an RL Agent to manage your emails
    19. Getting ready
    20. How to do it…
    21. How it works…
    22. Training an RL Agent to automate your social media account management
    23. Getting ready
    24. How to do it…
    25. How it works…
  12. Chapter 7: Deploying Deep RL Agents to the Cloud
    1. Technical requirements
    2. Implementing the RL agent’s runtime components
    3. Getting ready
    4. How to do it…
    5. How it works…
    6. Building RL environment simulators as a service
    7. Getting ready
    8. How to do it…
    9. How it works…
    10. Training RL agents using a remote simulator service
    11. Getting ready
    12. How to do it…
    13. How it works…
    14. Testing/evaluating RL agents
    15. Getting ready
    16. How to do it…
    17. How it works…
    18. Packaging RL agents for deployment – a trading bot
    19. Getting ready
    20. How to do it…
    21. How it works…
    22. Deploying RL agents to the cloud – a trading Bot-as-a-Service
    23. Getting ready
    24. How to do it…
    25. How it works…
  13. Chapter 8: Distributed Training for Accelerated Development of Deep RL Agents
    1. Technical requirements
    2. Distributed deep learning models using TensorFlow 2.x – Multi-GPU training
    3. Getting ready
    4. How to do it...
    5. How it works...
    6. Scaling up and out – Multi-machine, multi-GPU training
    7. Getting ready
    8. How to do it...
    9. How it works...
    10. Training Deep RL agents at scale – Multi-GPU PPO agent
    11. Getting ready
    12. How to do it...
    13. How it works...
    14. Building blocks for distributed Deep Reinforcement Learning for accelerated training
    15. Getting ready
    16. How to do it...
    17. How it works...
    18. Large-scale Deep RL agent training using Ray, Tune, and RLLib
    19. Getting ready
    20. How to do it...
    21. How it works...
  14. Chapter 9: Deploying Deep RL Agents on Multiple Platforms
    1. Technical requirements
    2. Packaging Deep RL agents for mobile and IoT devices using TensorFlow Lite
    3. Getting ready
    4. How to do it...
    5. How it works...
    6. Deploying RL agents on mobile devices
    7. Getting ready
    8. How to do it...
    9. How it works...
    10. Packaging Deep RL agents for the web and Node.js using TensorFlow.js
    11. Getting ready
    12. How to do it...
    13. How it works...
    14. Deploying a Deep RL agent as a service
    15. Getting ready
    16. How to do it...
    17. How it works...
    18. Packaging Deep RL agents for cross-platform deployment
    19. Getting ready
    20. How to do it...
    21. How it works...
  15. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think
18.226.93.207