Book Image

AI Crash Course

By : Hadelin de Ponteves
5 (4)
Book Image

AI Crash Course

5 (4)
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

Problem to solve

First, let's have a look at the game itself:

Figure 1: The Snake game

Does that look somewhat familiar to you?

I'm pretty convinced that it will; everyone's played Snake at least once in their life.

The game is pretty simple; it consists of a snake and an apple. We control the snake and our aim is to eat as many apples as possible.

Sounds easy? Well, there's a small catch. Every time our snake eats an apple, our snake gets larger by one tile. This means that the game is unbelievably simple at the beginning, but it gets gradually harder, to the point where it becomes a strategic game.

Also, when controlling our snake, we can't hit ourselves, nor the borders of the board. This rather predictably results in us losing.

Now that we understand the problem, we can progress to the first step when creating an AI – building the environment!