Book Image

Keras Reinforcement Learning Projects

By : Giuseppe Ciaburro
Book Image

Keras Reinforcement Learning Projects

By: Giuseppe Ciaburro

Overview of this book

Reinforcement learning has evolved a lot in the last couple of years and proven to be a successful technique in building smart and intelligent AI networks. Keras Reinforcement Learning Projects installs human-level performance into your applications using algorithms and techniques of reinforcement learning, coupled with Keras, a faster experimental library. The book begins with getting you up and running with the concepts of reinforcement learning using Keras. You’ll learn how to simulate a random walk using Markov chains and select the best portfolio using dynamic programming (DP) and Python. You’ll also explore projects such as forecasting stock prices using Monte Carlo methods, delivering vehicle routing application using Temporal Distance (TD) learning algorithms, and balancing a Rotating Mechanical System using Markov decision processes. Once you’ve understood the basics, you’ll move on to Modeling of a Segway, running a robot control system using deep reinforcement learning, and building a handwritten digit recognition model in Python using an image dataset. Finally, you’ll excel in playing the board game Go with the help of Q-Learning and reinforcement learning algorithms. By the end of this book, you’ll not only have developed hands-on training on concepts, algorithms, and techniques of reinforcement learning but also be all set to explore the world of AI.
Table of Contents (13 chapters)

Solving the knapsack problem using Dynamic Programming

We introduced DP in the previous sections. Now the time has come to tackle a practical case. We will do this by analyzing a classic problem that has been studied for more than a century since 1897: the knapsack problem. The first to deal with it was the mathematician Tobias Dantzig, who based the name on the common problem of packing the most useful items in a knapsack without overloading it.

A problem of this type can be associated with different situations arising from real life. To better characterize the problem, we will propose another, rather unique problem. A thief goes into a house and wants to steal valuables. They put them in their knapsack, but they are limited by the weight. Each object has its own value and weight. He must choose the objects that are of value, but that do not have excessive weight. The thief must...