

“
Marvelously crafted.
Just the kind of book every young computer scientist would want to master before college.
Professor Isaac Chuang
MIT Computer Science


AMAZON · BARNES & NOBLE · MIT PRESS · TARGET · WALMART

In THE COMPUTER ALWAYS WINS, Elliot Lichtman will teach you some of computer science’s most powerful concepts in a refreshingly accessible way: exploring them through word games, board games, and strategy games you already know. Learn recursion by playing tic-tac-toe, efficient search through puzzle games like sudoku and Wordle, and machine learning by way of the playground classic rock-paper-scissors. Finish the book, and you’ll come away with not only a deeper understanding of these foundational programming techniques but also a new appreciation for the amazing feats that can be accomplished using simple, readable code.















What fun! Written with clarity and humor, this book can be appreciated by readers at every level, from teenagers at the start of their coding journey to even college professors like me.
Arthur Benjamin
The Secrets of Mental Math


Great introductions to complex topics
not only teach new tools, but open up entirely new ways of thinking. The Computer Always Wins is that great introduction for the eager, curious reader who wants to learn to think algorithmically. A real treat. I would have loved it when I was a student.

Richard Rusczyk
Art of Problem Solving

Half my age and twice as wise, Lichtman is the teacher I wish I had. Scratch that: he’s the teacher I’m grateful to have now.
Ben Orlin
Math with Bad Drawings


Through approachable yet compelling examples, Lichtman beautifully demonstrates how to turn relatable instincts for strategic gameplay into concrete principles for strategic programming.
Grant Sanderson
3Blue1Brown


A real delight. The joy of algorithms shines through, page after page.
John MacCormick
Nine Algorithms That Changed the Future


Marvelously crafted. Just the kind of book every young computer scientist would want to master before college.
Professor Isaac Chuang
MIT Computer Science

