Search fundamentals
Learn the fundamentals of search algorithms.
An illustrated guide
Learn the algorithms that power search, optimization, machine learning, deep learning, and generative AI.
From start to finish, the best book to help you learn AI algorithms and recall why and how you use them.
This book takes an impossibly broad area of computer science and communicates what working developers need to understand in a clear and thorough way.
The most comprehensive content I have seen on AI algorithms.
This book removes the fear of stepping into the mechanics of AI.
An excellent hands-on introduction to a broad range of AI algorithms like genetic algorithms, swarm optimization, and machine learning.
This applies the excellent standards of the Grokking-series model to AI Algorithms. It’s a great resource to help anyone understand AI algorithms.
Covers a range of AI algorithms building up an understanding of how and why, thereby giving the reader a solid foundation to try any method.
Stepping stone for AI algorithms with real-world examples and solid definitions....Detailing of ethics in AI was icing in the cake.
Artificial intelligence algorithms are the backbone of search and optimization, deep learning, reinforcement learning, and, of course, generative AI. Grokking AI Algorithms, Second Edition introduces the most important AI algorithms using relatable illustrations, interesting examples, and thought-provoking exercises. Written in simple language and with lots of visual references and hands-on code examples, it helps you build a natural intuition into how intelligent systems learn, plan, and adapt. This second edition has been thoroughly revised, with new chapters on large language models, image generation, and more.
Learn the fundamentals of search algorithms.
Build intelligent agents to solve puzzles and play games.
Find solutions using the theory of evolution and genetic algorithms.
Explore AI through collective behavior in nature like ant colonies and bird flocking.
Make predictions with regression and decision trees.
Understand how AI learns and recognize patterns with neural networks.
See how AI improves through trial and error with reinforcement learning.
Build a LLM from scratch and understand how they work.
Create an image diffusion model to generate images from text prompts.
Grokking AI Algorithms is for software developers and anyone in the software industry who wants to grasp the intuitions and uncover the workings and algorithms behind AI through practical examples and visual explanations instead of going through theoretical deep dives and mathematical proofs.
Explore what intelligence means, why data is the fuel of AI, and how algorithms act like recipes. Then trace the progression from classic search and evolutionary methods to modern machine learning, deep learning, and generative AI.
See how planning becomes a sequence of search steps and why we constantly revise plans in dynamic environments. Compare breadth-first and depth-first search in a maze and watch how each explores routes to reach a goal efficiently.
Go beyond blind search with heuristics—rules of thumb that score states when perfect solutions are impractical. Step into adversarial search and watch minimax evaluate game trees as you play Connect Four against an AI opponent.
Learn how variation, selection, and mutation turn evolution into a powerful search strategy for huge solution spaces. Apply genetic algorithms to the knapsack problem and tune fitness, crossover, and mutation to improve solutions over generations.
Extend the genetic algorithm toolkit by exploring how solutions are encoded for different problems. Try real-number, order, and tree encodings and see how representation choices shape what evolution can discover.
Discover how simple agents like ants use pheromones to create intelligent group behavior. Use ant colony optimization to find efficient routes between attractions and compare it to your own path-planning.
Learn particle swarm optimization through the physics of bird flocks—alignment, cohesion, and separation. Balance aluminum and plastic to optimize a drone while PSO blends inertia, cognitive, and social forces.
See how machine learning uncovers patterns in data and chooses the right algorithm for the task. Fit a linear regression model to diamond price vs. carat and learn how slopes, intercepts, and learning rate shape predictions.
Connect biological neurons to the perceptron and see how weighted inputs and activation functions produce learning. Build a small neural network that predicts accidents from driving conditions and watch it improve through training.
Explore reinforcement learning as reward-driven behavior and map it to the Markov decision process. Train a Q-learning agent in a parking-lot grid world and see how Q-tables store better choices over time.
Build intuition for language modeling by turning sentences into bigrams and probability tables. Train a tiny model on sample text and watch next-word predictions emerge, just like autocomplete.
Understand diffusion as iterative denoising that reveals structure inside random noise. Follow the sculptor analogy and tune noise and learning rate to see how images gradually sharpen over steps.
Rishal is a technologist, entrepreneur, and author who is passionate about crafting innovative products and meaningful experiences. He has over a decade of expertise delivering diverse technology solutions across the finance, health, agriculture, mining, and aviation industries. Rishal is driven by a deep interest in making complex concepts accessible through visual, intuitive, and practical experiences. Rishal continues to build at the intersection of design, technology, and creativity, guided by the belief that technology should amplify human potential.