Book Image

AI Crash Course

By : Hadelin de Ponteves
5 (2)
Book Image

AI Crash Course

5 (2)
By: Hadelin de Ponteves

Overview of this book

Welcome to the Robot World … and start building intelligent software now! Through his best-selling video courses, Hadelin de Ponteves has taught hundreds of thousands of people to write AI software. Now, for the first time, his hands-on, energetic approach is available as a book. Starting with the basics before easing you into more complicated formulas and notation, AI Crash Course gives you everything you need to build AI systems with reinforcement learning and deep learning. Five full working projects put the ideas into action, showing step-by-step how to build intelligent software using the best and easiest tools for AI programming, including Python, TensorFlow, Keras, and PyTorch. AI Crash Course teaches everyone to build an AI to work in their applications. Once you've read this book, you're only limited by your imagination.
Table of Contents (17 chapters)
16
Index

The whole Q-learning process

Let's summarize the different steps of the whole Q-learning process. To be clear, the only purpose of this process is to update the Q-values over a certain number of iterations until they are no longer updated (we refer to that point as convergence).

The number of iterations depends on the complexity of the problem. For our problem, 1,000 will be enough, but for more complex problems you might want to consider higher numbers such as 10,000. In short, the Q-learning process is the part where we train our AI, and it's called Q-learning because it's the process during which the Q-values are learned. Then I'll explain what happens for the inference part (pure predictions), which comes, as always, after the training. The full Q-learning process starts with training mode.

Training mode

Initialization (First iteration):

For all couples of states s and actions a, the Q-values are initialized to 0.

Next iterations...