Algorithms to Live By

The Computer Science of Human Decisions · Brian Christian and Tom Griffiths

Brian Christian and Tom Griffiths take the core ideas of computer science and turn them on the problems of everyday life. When should you stop looking at apartments and sign a lease? How should you sort a closet, or a desk buried in paper? When is it worth trying the new restaurant instead of going back to the one you already like? Each of these turns out to be a question computer scientists have studied for decades, under names like optimal stopping, explore and exploit, caching and scheduling.

What I enjoyed most is that the book takes the algorithms seriously. The 37 percent rule, Bayes’s rule, least-recently-used caching and simulated annealing are all explained with real care, and the authors are honest about where the mathematics helps and where it doesn’t. Running through it is a humane lesson: many problems are simply hard, and a good algorithm is often about accepting a good answer in reasonable time instead of chasing a perfect one. Whether or not you write code, this is one of the most enjoyable introductions to thinking like a computer scientist that I have read.

Algorithms to Live By, cover