The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
Every idea in artificial intelligence taught twice: as the story of a child learning it, and as the mathematics and code that make the story exact.
A child learns to tell a mango from an orange. This book teaches a machine the same way, and then shows you exactly what the machine is doing when it learns.
Minimum price
$14.72
$18.64
About the Book
A complete course in artificial intelligence, from the first labelled example to alignment, agents and the questions the field has not answered. Every concept is told first as the story of Alex, a boy in a Ghanaian market who grows from sorting fruit at his aunt's stall to building the systems that decide who gets a loan, and then given in full mathematics and in Python code that was run before it was printed. 34 chapters, 194 listings with their outputs, 474 exercises, no graphics processor and no internet connection required.
Artificial Intelligence: Foundations to Frontier is a single, self-contained path from the first example to the current research frontier. It is written for the reader who wants to understand the field rather than operate it: the student who has done a little programming and a little mathematics and wants to know how the machines actually work, the engineer who uses these tools and wants the reasoning behind them, and the researcher from another field who needs the whole picture in one place.
Each of the thirty-four chapters is organised around one idea, and that idea is presented three times. The story comes first: Alex, aged four at the start of the book and twenty at the end, meets the idea in a Ghanaian market, at a kiosk, on a farm or at a mobile-money company, and the reader sees why anyone would want a machine to do this. The mathematics comes second, derived rather than quoted, with every symbol tied back to something in the story. The code comes third: a short Python listing, written with NumPy and the book's own ninety-six-line automatic-differentiation library, run on an ordinary laptop, with its printed output placed directly beneath it. Nothing in the book is asserted that the reader cannot check on their own machine, offline.
The five parts move from foundations (vectors, probability, calculus, search and logic) through machine learning (regression, trees, ensembles, kernels, evaluation, clustering) and deep learning (networks, backpropagation, convolution, recurrence, attention, self-supervision) to the advanced topics that define the field today: reinforcement learning, generative models, large language models, uncertainty, causality, graph networks and multimodal learning. The final part takes the reader out into the world, where models are deployed, run on cheap phones, attacked, audited for fairness, protected for privacy and aligned with what people meant rather than what they wrote.
Two boxes appear in every chapter. An orange one, Where the story breaks, says exactly where the child analogy stops being true of the machine, so that the reader is never left believing the story. A green one, For the researcher, says what the field does not yet know, with the papers to read next. Together with 474 exercises in three tiers, from novice to researcher, they make the book usable as a course text, a self-study programme or a reference.
No graphics processor is needed. No dataset has to be downloaded. The book was written, and every one of its 194 listings was run, in an environment that could reach nothing on the internet, because that is the environment most of its readers will have.
A child learns to tell a mango from an orange. This book teaches a machine the same way.
Every idea in artificial intelligence is taught here twice. First as a story: Alex, a boy in a Ghanaian market, grows from a four-year-old sorting fruit at his aunt's stall into a young engineer building the systems that decide who gets a loan. Then as the mathematics and the code that make the story exact.
Thirty-four chapters take the reader from the first labelled example to the questions the field has not answered: regression and trees, kernels and ensembles, the networks that see, remember and pay attention, generative models, reinforcement learning, causality and uncertainty, language models, graphs and multimodal learning, and then the world these systems are deployed into, from low-resource settings to attacks, fairness, privacy and alignment.
Every one of the 194 listings was run before it was printed, and its output sits beneath it. Nothing is asserted that the reader cannot check on an ordinary laptop, offline, with NumPy and tinynet, the automatic-differentiation library the book builds from scratch in ninety-six lines.
What makes it different?
▪ One story for the whole field. Alex grows from three to twenty across the book, so the reader always knows where a new idea sits relative to the last one.
▪ Every listing run, every output printed. The numbers in the text are the numbers the code produced, including the experiments that did not work as hoped, which are reported as they came out.
▪ The mathematics is derived, not recited. Backpropagation, the ELBO, the Bellman equations, the backdoor adjustment, the conformal guarantee and Bayesian linear regression are each worked through, with a story-to-symbol table that maps every term back to something concrete.
▪ Its own deep-learning library. tinynet, built in Chapter 17 and extended through Part III, so that nothing is hidden behind a framework; a translation table to PyTorch is in Appendix B.
▪ Honest about its limits. Every chapter ends by saying where the analogy fails and what remains unknown.
▪ Written for the reader's actual hardware. A laptop, Python and NumPy. The chapter on low-resource settings quantises, distils and prunes the book's own models until they fit on a two-hundred-cedi phone.
Who is it for?
▪ Undergraduate and master's students in computer science, engineering, statistics and mathematics, as a course text for one or two semesters.
▪ Self-taught programmers who can write a loop in Python and want the field from the ground up, with the mathematics taught as it is needed.
▪ Practising engineers and data scientists who use these tools and want the reasoning behind them.
▪ Researchers and lecturers in other fields who need one book that reaches the current frontier, with reading lists for every chapter.
What the reader needs: a computer with Python 3 and NumPy, and the arithmetic of secondary school. No graphics processor, no internet connection, no prior course in machine learning.
About the Author
Benjamin is a lecturer in Computer Science at prestigious university, and holds a PhD in software engineering and active research in cybersecurity and applied AI. After years of watching capable students give up on AI because the textbooks assumed too much, he wrote the book he wished he could hand them. It explains each concept the way a child would learn it, through a character named Alex, while keeping the full mathematics, formulas and code, so that readers finish with real understanding instead of memorised terms.
Click the buttons to get the free sample in PDF or EPUB, or read the sample online here
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
Learn more about writing on Leanpub
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!
Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.
Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.