Grokking Artificial Intelligence Algorithms
Rishal Hurbans
  • July 2020
  • ISBN 9781617296185
  • 392 pages
  • printed in black & white
ePub + Kindle available Aug 10, 2020

From start to finish, the best book to help you learn AI algorithms and recall why and how you use them.

Linda Ristevski, York Region District School Board
Grokking Artificial Intelligence Algorithms is a fully-illustrated and interactive tutorial guide to the different approaches and algorithms that underpin AI. Written in simple language and with lots of visual references and hands-on examples, you’ll learn the concepts, terminology, and theory you need to effectively incorporate AI algorithms into your applications. And to make sure you truly grok as you go, you’ll use each algorithm in practice with creative coding exercises—including building a maze puzzle game, performing diamond data analysis, and even exploring drone material optimization.

About the Technology

Artificial intelligence touches every part of our lives. It powers our shopping and TV recommendations; it informs our medical diagnoses. Embracing this new world means mastering the core algorithms at the heart of AI.

About the book

Grokking Artificial Intelligence Algorithms uses illustrations, exercises, and jargon-free explanations to teach fundamental AI concepts. All you need is the algebra you remember from high school math class. Explore coding challenges like detect­ing bank fraud, creating artistic masterpieces, and setting a self-driving car in motion.
Table of Contents detailed table of contents

0 Preface

0.1 Our obsession with technology and automation

0.1.1 We’re wired to automate

0.2.1 Intention and impact: Understanding your vision and goals

0.2.2 Unintended use: Protecting against malicious use

0.2.3 Unintended bias: Building solutions for everyone

0.2.5 Singularity: Exploring the unknown

1 Intuition of Artificial Intelligence

1.1 What is Artificial Intelligence?

1.1.1 Defining AI

1.1.2 Understanding Data is Core to AI Algorithms

1.1.3 Viewing Algorithms as Instructions in Recipes

1.2 A Brief History of Artificial Intelligence

1.3 Problem Types and Problem-Solving Paradigms

1.3.1 Search Problems: Find a path to a solution

1.3.2 Optimization Problems: Find a good solution

1.3.3 Prediction and Classification Problems: Learn from patterns in data

1.3.4 Clustering Problems: Identify patterns in data

1.3.5 Deterministic Models: Same result each time it’s calculated

1.3.6 Stochastic/probabilistic models: Potentially different result each time it’s calculated

1.4 Intuition of Artificial Intelligence Concepts

1.4.1 Narrow Intelligence: Specific-purpose solutions

1.4.2 General Intelligence: Humanlike solutions

1.4.3 Super Intelligence: The great unknown

1.4.4 Old AI and New AI

1.4.5 Search Algorithms

1.4.6 Biology-Inspired Algorithms

1.4.7 Machine Learning Algorithms

1.4.8 Deep Learning Algorithms

1.5 Uses for Artificial Intelligence Algorithms

1.5.1 Agriculture: Optimal Plant Growth

1.5.2 Banking: Fraud Detection

1.5.3 Cybersecurity: Attack Detection and Handling

1.5.4 Healthcare: Diagnosis of Patients

1.5.5 Logistics: Routing and Optimization

1.5.6 Telecoms: Optimizing Networks

1.5.7 Games: Creating AI Agents

1.5.8 Art: Creating Masterpieces

2 Search Fundamentals

2.1 What is Planning and Searching?

2.2 Cost of Computation: The Reason for Smart Algorithms

2.3 Problems Applicable to Searching Algorithms

2.4 Representing State: Creating a framework to represent problem spaces and solutions

2.4.1 Graphs: Representing search problems and solutions

2.4.2 Representing a Graph as a Concrete Data Structure

2.4.3 Trees: The concrete structure used to represent search solutions

2.5 Uninformed Search: Looking blindly for solutions

2.6 Breadth-first Search: Look wide before looking deep

2.7 Depth-first Search: Looking deep before looking wide

2.8 Use Cases for Uninformed Search Algorithms

2.9 Optional: More About Graph Categories

2.10 Optional: More Ways to Represent Graphs

2.10.1 Incidence Matrix

2.10.2 Adjacency List

3 Intelligent Search

3.1 Defining Heuristics: Designing educated guesses

3.2 Informed Search: Looking for solutions with guidance

3.2.2 Use Cases for Informed Search Algorithms

3.3 Adversarial Search: Looking for solutions in a changing environment

3.3.1 A Simple Adversarial Problem

3.3.2 Min-max Search: Simulate actions and choose the best future

3.3.3 Alpha-beta Pruning: Optimize by exploring the sensible paths only

3.3.4 Use Cases for Adversarial Search Algorithms

4 Evolutionary Algorithms

4.1 What is Evolution?

4.2 Problems Applicable to Evolutionary Algorithms

4.3 Genetic Algorithm: Life Cycle

4.4 Encoding the Solution Space

4.4.1 Binary Encoding: Represent possible solutions with zeros and ones

4.5 Creation a Population of Solutions

4.6 Measuring Fitness of Individuals in a Population

4.7 Selecting Parents Based on their Fitness

4.7.1 Steady State: Replacing a portion of the population each generation

4.7.2 Generational: Replacing the entire population each generation

4.7.3 Roulette Wheel: Selecting parents and surviving individuals

4.8 Reproducing Individuals from Parents

4.8.1 Single-point Crossover: Inheriting one part from each parent

4.8.2 Two-point Crossover: Inheriting more parts from each parent

4.8.3 Uniform Crossover: Inheriting many parts from each parent

4.8.4 Bit-String Mutation for Binary Encoding

4.8.5 Flip-Bit Mutation for Binary Encoding

4.9 Populating the Next Generation

4.9.1 Exploration vs. Exploitation

4.9.2 Stopping Conditions

4.10 Configuring the Parameters of a Genetic Algorithm

4.11 Use Cases for Evolutionary Algorithms

5 Advanced Evolutionary Approaches

5.1 Evolutionary Algorithm Life Cycle

5.2 Alternative Selection Strategies

5.2.1 Rank Selection: Even the playing field

5.2.2 Tournament Selection: Let them fight

5.2.3 Elitism Selection: Choose only the best

5.3 Real-value Encoding: Working with real numbers

5.3.1 Real-value Encoding at its Core

5.3.2 Arithmetic Crossover: Reproduce with math

5.3.3 Boundary Mutation

5.3.4 Arithmetic Mutation

5.4 Order Encoding: Working with sequences

5.4.1 Importance of the Fitness Function

5.4.2 Order Encoding at its Core

5.4.3 Order Mutation: Order/Permutation Encoding

5.5 Tree Encoding: Working with hierarchies

5.5.1 Tree Encoding at its Core

5.5.2 Tree Crossover: Inheriting portions of a tree

5.5.3 Change Node Mutation: Changing the value of a node

5.6 Common Types of Evolutionary Algorithms

5.6.1 Genetic Programming

5.6.2 Evolutionary Programming

5.7 Glossary of Evolutionary Algorithm Terms

5.8 More Use Cases for Evolutionary Algorithms

6 Swarm Intelligence: Ants

6.1 What is Swarm Intelligence?

6.2 Problems Applicable to Ant Colony Optimization

6.3 Representing State: What do paths and ants look like?

6.4 The Ant Colony Optimization Algorithm Life Cycle

6.4.1 Initialize the Pheromone Trails

6.4.2 Set up the Population of Ants

6.4.3 Choose the Next Visit for Each Ant

6.4.4 Update the Pheromone Trails

6.4.5 Update the Best Solution

6.4.6 Determine the Stopping Criteria

6.5 Use Cases for Ant Colony Optimization Algorithms

7 Swarm Intelligence: Particles

7.1 What is Particle Swarm Optimization

7.2 Optimization Problems: A slightly more technical perspective

7.3 Problems Applicable to Particle Swarm Optimization

7.4 Representing State: What do particles look like?

7.5 Particle Swarm Optimization Life Cycle

7.5.1 Initialize the Population of Particles

7.5.2 Calculate the Fitness of Each Particle

7.5.3 Update the Position of Each Particle

7.5.4 Determine the Stopping Criteria

7.6 Use Cases for Particle Swarm Optimization Algorithms

8 Machine Learning

8.1 What is Machine Learning?

8.2 Problems Applicable to Machine Learning

8.2.1 Supervised learning

8.2.2 Unsupervised learning

8.2.3 Reinforcement learning

8.3 A Machine Learning Workflow

8.3.1 Collecting and Understanding Data: Know your context

8.3.2 Preparing Data: Clean and wrangle

8.3.3 Training a Model: Predicting with Linear Regression

8.3.4 Testing the Model: Determine the accuracy of the model

8.3.5 Improving Accuracy

8.4 Classification with Decision Trees

8.4.1 Classification Problems: Either this or that

8.4.2 The Basics of Decision Trees

8.4.3 Training Decision Trees

8.4.4 Classifying examples with decision trees

8.6 Use Cases for Machine Learning Algorithms

9 Artificial Neural Networks

9.1 What are artificial neural networks?

9.2 The perceptron: A representation of a neuron

9.3 Defining artificial neural networks

9.4 Forward propagation: Using a trained ANN

9.5 Back propagation: Training an ANN

9.5.1 Phase A: Setup

9.5.2 Phase B: Forward propagation

9.5.3 Phase C: Training

9.6 Options for activation functions

9.7 Designing artificial neural networks

9.7.1 Inputs and outputs

9.7.2 Hidden layers and nodes

9.7.3 Weights

9.7.4 Bias

9.7.5 Activation functions

9.7.6 Cost function and learning rate

9.8 Artificial neural network types and use cases

9.8.1 Convolutional neural network

9.8.2 Recurrent neural network

9.8.3 Generative adversarial network

10 Reinforcement Learning with Q-Learning

10.1 What is reinforcement learning?

10.1.1 The inspiration for reinforcement learning

10.2 Problems applicable to reinforcement learning

10.3 The life cycle of reinforcement learning

10.3.1 Simulation and data: Make the environment come alive

10.3.2 Training with the simulation using Q-learning

10.3.3 Testing with the simulation and Q-table

10.3.4 Measuring the performance of training

10.3.5 Model-free and model-based learning

10.4 Deep learning approaches to reinforcement learning

10.5 Use cases for reinforcement learning

10.5.1 Robotics

10.5.2 Recommendation engines

10.5.3 Financial trading

10.5.4 Game playing

What's inside

  • Use cases for different AI algorithms
  • Intelligent search for decision making
  • Biologically inspired algorithms
  • Machine learning and neural networks
  • Reinforcement learning to build a better robot

About the reader

For software developers with high school–level algebra and calculus skills.

About the author

Rishal Hurbans is a technologist, founder, and international speaker.

placing your order...

Don't refresh or navigate away from the page.
print book $35.99 $59.99 pBook + eBook + liveBook
Additional shipping charges may apply
Grokking Artificial Intelligence Algorithms (print book) added to cart
continue shopping
go to cart

eBook $33.59 $47.99 3 formats + liveBook
Grokking Artificial Intelligence Algorithms (eBook) added to cart
continue shopping
go to cart

Prices displayed in rupees will be charged in USD when you check out.

FREE domestic shipping on three or more pBooks