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

Classes and objects

Classes, like functions, are another part of code that sits outside of the main code, executed only when called in the main flow of code. Objects are instances of a corresponding class, existing within the main flow of our code. To better understand it, think of a class as a plan of something, for example, a plan of a car. It contains information on how certain components look and work with each other. A class in Python is a general plan of something.

You can think of objects as real-life constructions based on the plan. For example, a real, working, and self-driving car would be an example of an object. You create a plan of a car (which is a class) and then you build a car based on this plan (which is an object). And of course, when you have a plan of something, you can create as many copies as you want; for example, you can run a production line to produce cars.

To give you more insight into classes, we will create a simple bot....