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.
![]() | ![]() |
---|---|
(Left) Android RL Table-Tennis App, Ch9 | (Right) Cross-platform Deep RL Agent deployment options, Ch9 |
Build: Deep RL agents from scratch using the all-new and powerful TensorFlow 2.x framework and Keras API |
Implement: Deep RL algorithms (DQN, A3C, DDPG, PPO, SAC etc.) with minimal lines of code |
Train: Deep RL agents in simulated environments (gyms) beyond toy-problems and games to perform real-world tasks like cryptocurrency trading, stock trading, tweet/email management and more! |
Scale: Distributed training of RL agents using TensorFlow 2.x, Ray + Tune + RLLib |
Deploy: RL agents to the cloud and edge for real-world testing by creating cloud services, web apps and Android mobile apps using TensorFlow Lite, TensorFlow.js, ONNX and Triton |
![]() | ![]() |
---|---|
(Left) GridworldEnv, Ch1 | (Right) Neural evolutionary agent learning performance, Ch1 |
![]() |
---|
![]() |
The chapter-wise recipes covered in the book are listed below with direct links to the code:
1.1 Building environment and reward mechanism for training RL agents
1.2 Implementing neural-network-based RL policies for discrete action spaces and decision-making problems
1.3 Implementing neural-network-based RL policies for continuous action spaces and continuous-control problems
1.4 Working with OpenAI Gym for RL training environments
1.5 Building a neural agent
2.1 Building stochastic environments for training RL agents
2.2 Building value-based Reinforcement Learning agent algorithms
3.3 Implementing Double Dueling DQN algorithm and the DDDQN agent
3.4 Implementing Deep Recurrent Q-Learning algorithm and the DRQN Agent
3.5 Implementing Asynchronous Advantage Actor-Critic algorithm and the A3C agent
3.6 Implementing Proximal Policy Optimization algorithm and the PPO agent
3.7 Implementing Deep Deterministic Policy Gradient algorithm and the DDPG agent
4.1 Building Bitcoin trading RL platform using real market data
4.3 Building advanced cryptocurrency trading platform for RL agents
5.1 Building stock-market trading RL platform using real stock-exchange data
5.2 Building stock-market trading RL platform using price charts
5.3 Building advanced stock trading RL platform to train agents that trade like human pros
6.2 Building an RL agent to complete tasks on the web: Call to Action bot
6.4 Training an RL agent to automate flight booking for your travel
6.6 Training an RL agent to automate your social-media account management
]7.1 Implementing RL agent’s runtime components](https://github.com/PacktPublishing/Tensorflow-2-Reinforcement-Learning-Cookbook/blob/master/Chapter07/sac_agent_runtime.py)
7.2 Building RL environment simulator as a service
7.6 Deploying RL agents to the cloud: Trading-Bot-as-a-Service
8.1 Building distributed deep learning models using TensorFlow 2.x: Multi-GPU training
8.4 Building blocks for distributed Deep Reinforcement learning for accelerated training
8.5 Large-scale Deep RL agent training using Ray, Tune and RLLib
9.0 Runtime options for cross-platform deployments
9.1 Packaging Deep RL agents for mobile and IoT devices using TensorFlow Lite
9.3 Packaging Deep RL agents for the web and Node.js using TensorFlow.js