Keras Reinforcement Learning Projects
eBook - ePub

Keras Reinforcement Learning Projects

9 projects exploring popular reinforcement learning techniques to build self-learning agents

Giuseppe Ciaburro

  1. 288 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

Keras Reinforcement Learning Projects

9 projects exploring popular reinforcement learning techniques to build self-learning agents

Giuseppe Ciaburro

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul libro

A practical guide to mastering reinforcement learning algorithms using Keras

Key Features

  • Build projects across robotics, gaming, and finance fields, putting reinforcement learning (RL) into action
  • Get to grips with Keras and practice on real-world unstructured datasets
  • Uncover advanced deep learning algorithms such as Monte Carlo, Markov Decision, and Q-learning

Book Description

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.

What you will learn

  • Practice the Markov decision process in prediction and betting evaluations
  • Implement Monte Carlo methods to forecast environment behaviors
  • Explore TD learning algorithms to manage warehouse operations
  • Construct a Deep Q-Network using Python and Keras to control robot movements
  • Apply reinforcement concepts to build a handwritten digit recognition model using an image dataset
  • Address a game theory problem using Q-Learning and OpenAI Gym

Who this book is for

Keras Reinforcement Learning Projects is for you if you are data scientist, machine learning developer, or AI engineer who wants to understand the fundamentals of reinforcement learning by developing practical projects. Sound knowledge of machine learning and basic familiarity with Keras is useful to get the most out of this book

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Keras Reinforcement Learning Projects è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Keras Reinforcement Learning Projects di Giuseppe Ciaburro in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Computer Science e Artificial Intelligence (AI) & Semantics. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
2018
ISBN
9781789347975

Simulating Random Walks

Stochastic processes involve systems that evolve over time (but also more generally in space) according to probabilistic laws. Such systems or models describe the complex phenomena of the real world that have the possibility of being random. These phenomena are more frequent than we can believe. We encounter these phenomena when the quantities we are interested in are not predictable with absolute certainty. However, when such phenomena show a variability of possible outcomes that can be somehow explained or described, then we can introduce a probabilistic model of the phenomenon.
For example, say that we are examining the motion involved in a random walking movement. We study the motion of an object that is constrained to move along a straight line in the two directions allowed. At each movement, it moves randomly to the right or left, each step being of equal length and independent of the other steps. A Markov chain is a stochastic process whereby the evolution of a system depends only on its present state and not on its past state. A Markov chain is characterized by a set of states and by the probability of transition between states. Think of a point that can move randomly forward or backward along a line at discrete intervals of time, covering a certain distance at each interval. This is an example of a random walk. In this chapter, we will simulate a random walk using Markov chains through a Python code implementation.
In this chapter, we will cover the following topics:
  • Random walk
  • Random walk simulation
  • Basic probability concepts
  • Markov chain
  • Forecasting using a Markov chain
  • Markov chain text generator
At the end of the chapter, the reader will know the basic concepts of the Markov process, the basic concepts of random walks, how the random walk algorithms work, know how to use a Markov chain to forecast the weather, and how to simulate random walks using Markov chains.

Random walks

Random walks are a mathematical model that is used to describe a path that is given by a succession of random steps, which, depending on the system that we want to describe, may have a certain number of degrees of freedom or direction. The term random walk was introduced by Karl Pearson in 1905. In a random walk, each step has a random direction and possibly also a random dimension. It represents a theoretical model to describe any random process through the evolution of known quantities that follow a precise statistical distribution. Physically speaking, the path that we are going to draw over time will not necessarily describe a real motion, but rather indicate more generally the evolution of features over time. This means that random walks find applications in physics, chemistry, and biology, but also in other fields, such as computer science, economics, and sociology.

One-dimensional random walk

In a one-dimensional random walk, we study the motion of a point-like particle that is constrained to move along a straight line in one of only two directions (right and left). For each (random) movement, it can move one step to the right with a fixed probability p or to the left with a q probability. Each step is of equal length, and is independent of the others, as shown in the following diagram:
The position of the point after n steps—identified by its abscissa, X(n)—obviously contains a random term. We want to calculate the probability after n movements that the particle will return to the starting point (it should be noted that nothing assures us with any certainty that the point will actually return to that position). To do this, we will use the X(n) variable, which gives the abscissa of the straight line after the particle has moved n steps to the left. Obviously, this is a discrete random variable with a binomial distribution.
This variable takes the following scheme: at every instant, n takes a step to the right or left according to the result of a random variable, Z(n), which takes on +1 value with probability of p> 0 and a -1 value with a probability of q, with p + q = 1, as shown in the previous diagram. Suppose that the random Zn variable with n = 1, 2,... are independent, and all have the same distribution. Then the position of the particle at the n instant is given by the following equation:
The Xn variable represents a Markov chain because, to determine the probability that the particle is in a certain position in the next moment, we only need to know where it is at the current moment, even if we are aware of where it was in all moments prior to the current one.

Simulating 1D random walk

We have previously said that a random walk contains a ...

Indice dei contenuti

  1. Title Page
  2. Copyright and Credits
  3. Packt Upsell
  4. Contributors
  5. Preface
  6. Overview of Keras Reinforcement Learning
  7. Simulating Random Walks
  8. Optimal Portfolio Selection
  9. Forecasting Stock Market Prices
  10. Delivery Vehicle Routing Application
  11. Continuous Balancing of a Rotating Mechanical System
  12. Dynamic Modeling of a Segway as an Inverted Pendulum System
  13. Robot Control System Using Deep Reinforcement Learning
  14. Handwritten Digit Recognizer
  15. Playing the Board Game Go
  16. What's Next?
  17. Other Books You May Enjoy
Stili delle citazioni per Keras Reinforcement Learning Projects

APA 6 Citation

Ciaburro, G. (2018). Keras Reinforcement Learning Projects (1st ed.). Packt Publishing. Retrieved from https://www.perlego.com/book/825780/keras-reinforcement-learning-projects-9-projects-exploring-popular-reinforcement-learning-techniques-to-build-selflearning-agents-pdf (Original work published 2018)

Chicago Citation

Ciaburro, Giuseppe. (2018) 2018. Keras Reinforcement Learning Projects. 1st ed. Packt Publishing. https://www.perlego.com/book/825780/keras-reinforcement-learning-projects-9-projects-exploring-popular-reinforcement-learning-techniques-to-build-selflearning-agents-pdf.

Harvard Citation

Ciaburro, G. (2018) Keras Reinforcement Learning Projects. 1st edn. Packt Publishing. Available at: https://www.perlego.com/book/825780/keras-reinforcement-learning-projects-9-projects-exploring-popular-reinforcement-learning-techniques-to-build-selflearning-agents-pdf (Accessed: 14 October 2022).

MLA 7 Citation

Ciaburro, Giuseppe. Keras Reinforcement Learning Projects. 1st ed. Packt Publishing, 2018. Web. 14 Oct. 2022.