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

Implementation

Alright, let's smash this. But first, try to smash this yourself without me. Of course, this is a journey we'll take together, but I really don't mind if you take some steps ahead of me. The faster you become independent in AI, the sooner you'll do wonders with it. Try to implement the Q-learning process mentioned previously, exactly as it is. It's okay if you don't implement everything; what matters is that you try.

That's enough coaching; no matter how successful you were, let's go through the solution.

First, start by importing the libraries that you'll use in this implementation. There's only one needed this time: the numpy library, which offers a practical way of working with arrays and mathematical operations. Give it the shortcut np.

# AI for Logistics - Robots in a warehouse
# Importing the libraries
import numpy as np

Then, set the parameters of your model. These include the discount...