Grokking Artificial Intelligence Algorithms
Rishal Hurbans
  • July 2020
  • ISBN 9781617296185
  • 392 pages
  • printed in black & white

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

1 Intuition of artificial intelligence

What is artificial intelligence?

Defining AI

Understanding that data is core to AI algorithms

Viewing algorithms as instructions in recipes

A brief history of artificial intelligence

Problem types and problem-solving paradigms

Search problems: Find a path to a solution

Optimization problems: Find a good solution

Prediction and classification problems: Learn from patterns in data

Clustering problems: Identify patterns in data

Deterministic models: Same result each time it’s calculated

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

Intuition of artificial intelligence concepts

Narrow intelligence: Specific-purpose solutions

General intelligence: Humanlike solutions

Super intelligence: The great unknown

Old AI and new AI

Search algorithms

Biology-inspired algorithms

Machine learning algorithms

Deep learning algorithms

Uses for artificial intelligence algorithms

Agriculture: Optimal plant growth

Banking: Fraud detection

Cybersecurity: Attack detection and handling

Health care: Diagnosis of patients

Logistics: Routing and optimization

Telecoms: Optimizing networks

Games: Creating AI agents

Art: Creating masterpieces

Summary of Intuition of artificial intelligence

2 Search fundamentals

What are planning and searching?

Cost of computation: The reason for smart algorithms

Problems applicable to searching algorithms

Representing state: Creating a framework to represent problem spaces and solutions

Graphs: Representing search problems and solutions

Representing a graph as a concrete data structure

Trees: The concrete structures used to represent search solutions

Uninformed search: Looking blindly for solutions

Breadth-first search: Looking wide before looking deep

Depth-first search: Looking deep before looking wide

Use cases for uninformed search algorithms

Optional: More about graph categories

Optional: More ways to represent graphs

Incidence matrix

Adjacency list

Summary of search fundamentals

3 Intelligent search

Defining heuristics: Designing educated guesses

Informed search: Looking for solutions with guidance

Use cases for informed search algorithms

Adversarial search: Looking for solutions in a changing environment

A simple adversarial problem

Min-max search: Simulate actions and choose the best future

Alpha-beta pruning: Optimize by exploring the sensible paths only

Use cases for adversarial search algorithms

4 Evolutionary algorithms

What is evolution?

Problems applicable to evolutionary algorithms

Genetic algorithm: Life cycle

Encoding the solution spaces

Binary encoding: Representing possible solutions with zeros and ones

Creating a population of solutions

Measuring fitness of individuals in a population

Selecting parents based on their fitness

Steady state: Replacing a portion of the population each generation

Generational: Replacing the entire population each generation

Roulette wheel: Selecting parents and surviving individuals

Reproducing individuals from parents

Single-point crossover: Inheriting one part from each parent

Two-point crossover: Inheriting more parts from each parent

Uniform crossover: Inheriting many parts from each parent

Bit-string mutation for binary encoding

Flip-bit mutation for binary encoding

Populating the next generation

Exploration vs. exploitation

Stopping conditions

Configuring the parameters of a genetic algorithm

Use cases for evolutionary algorithms

Summary of evolutionary algorithms

5 Advanced evolutionary approaches

Evolutionary algorithm life cycle

Alternative selection strategies

Rank selection: Even the playing field

Tournament selection: Let them fight

Elitism selection: Choose only the best

Real-value encoding: Working with real numbers

Real-value encoding at its core

Arithmetic crossover: Reproduce with math

Boundary mutation

Arithmetic mutation

Order encoding: Working with sequences

Importance of the fitness function

Order encoding at its core

Order mutation: Order/permutation encoding

Tree encoding: Working with hierarchies

Tree encoding at its core

Tree crossover: Inheriting portions of a tree

Change node mutation: Changing the value of a node

Common types of evolutionary algorithms

Genetic programming

Evolutionary programming

Glossary of evolutionary algorithm terms

More use cases for evolutionary algorithms

Summary of advanced evolutionary approache

6 Swarm intelligence: Ants

What is swarm intelligence?

Problems applicable to ant colony optimization

Representing state: What do paths and ants look like?

The ant colony optimization algorithm life cycle

Initialize the pheromone trails

Set up the population of ants

Choose the next visit for each ant

Update the pheromone trails

Update the best solution

Determine the stopping criteria

Use cases for ant colony optimization algorithms

Summary of ant colony optimization

7 Swarm intelligence: Particles

What is particle swarm optimization?

Optimization problems: A slightly more technical perspective

Problems applicable to particle swarm optimization

Representing state: What do particles look like?

Particle swarm optimization life cycle

Initialize the population of particles

Calculate the fitness of each particle

Update the position of each particle

Determine the stopping criteria

Use cases for particle swarm optimization algorithms

Summary of particle swarm optimization

8 Machine learning

What is machine learning?

Problems applicable to machine learning

Supervised learning

Unsupervised learning

Reinforcement learning

A machine learning workflow

Collecting and understanding data: Know your context

Preparing data: Clean and wrangle

Training a model: Predict with linear regression

Testing the model: Determine the accuracy of the model

Improving accuracy

Classification with decision trees

Classification problems: Either this or that

The basics of decision trees

Training decision trees

Classifying examples with decision trees

Use cases for machine learning algorithms

Summary of machine learning

9 Artificial neural networks

What are artificial neural networks?

The Perceptron: A representation of a neuron

Defining artificial neural networks

Forward propagation: Using a trained ANN

Backpropagation: Training an ANN

Phase A: Setup

Phase B: Forward propagation

Phase C: Training

Options for activation functions

Designing artificial neural networks

Inputs and outputs

Hidden layers and nodes



Activation functions

Cost function and learning rate

Artificial neural network types and use cases

Convolutional neural network

Recurrent neural network

Generative adversarial network

Summary of artificial neural networks

10 Reinforcement learning with Q-learning

What is reinforcement learning?

The inspiration for reinforcement learning

Problems applicable to reinforcement learning

The life cycle of reinforcement learning

Simulation and data: Make the environment come alive

Training with the simulation using Q-learning

Testing with the simulation and Q-table

Measuring the performance of training

Model-free and model-based learning

Deep learning approaches to reinforcement learning

Use cases for reinforcement learning


Recommendation engines

Financial trading

Game playing

Summary of reinforcement learning

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 $38.39 $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.
customers also reading

This book 1-hop 2-hops 3-hops

FREE domestic shipping on three or more pBooks