Sonny G. Sterling
All Books Technology Finance About
Home/Books/AI & Machine Learning Puzzle Book
AI
AI & Machine Learning Puzzle Book
32 Solved AI Coding Puzzles Explained in Plain Python
Sonny G. Sterling
AI & Machine Learning Puzzle Book
AI

AI & Machine Learning Puzzle Book

32 Solved AI Coding Puzzles Explained in Plain Python

Every chapter starts with a puzzle, not a lecture. 32 solved AI problems across nine chapters — worked by hand, then written in plain Python, using the same reasoning a real machine-learning algorithm uses.

Paperback$13.99
About this book
Most books about artificial intelligence explain what the algorithms do. This one hands you the problem first and lets you work it out. Which door leads to freedom when one guard always lies? Which fruit is this, given only its weight and size? Did this model actually learn the rule — or did it just memorise the answers? Solve each puzzle by hand, then solve it again in Python, using the exact reasoning a real machine-learning algorithm uses. By the end you will have built working versions of k-nearest neighbors, the perceptron, Naive Bayes and linear regression from scratch — no libraries, no calculus, no prior programming experience required. Covers train/test splits, cross-validation, precision and recall, decision trees with entropy and Gini impurity, search algorithms including A* and Eight Queens, Bayes’ theorem with Monty Hall and the medical-test paradox, k-means clustering with the elbow method, and why one perceptron cannot solve XOR — followed by exactly what a hidden layer fixes. A capstone chapter builds and evaluates a complete AI system end to end, and a closing chapter connects every idea back to scikit-learn. Every line of code was run and checked against its printed output before publication.
What's inside
32 solved puzzles across 9 chapters
k-NN, perceptron, Naive Bayes & linear regression from scratch
Decision trees, entropy, Gini & pruning
Search: BFS, A* and the Eight Queens problem
Bayes’ theorem, Monty Hall & the medical-test paradox
k-means clustering with the elbow method
Neural networks: XOR and what a hidden layer fixes
Every code sample run and verified
No calculus, libraries or prior code required
Specifications
Pages
99
Published
29 August 2026
ISBN / ASIN
979-8170528912
Trim
6" × 9"