This post is a review of Algorithms to Live By: The Computer Science of Human Decisions by Brian Christian and Tom Griffiths (Amazon, Audible).
I love this book, but its title might be a slight exaggeration. I would have called it Some analogies of varying strength between computer science questions and life questions, with some special focus on optimal stopping, sorting, scheduling, and game theory. I guess that doesn’t have quite the same ring to it.
Anyway, I was worried before I started this book that the computer science in it would be too dumbed-down. It wasn’t. The book still has the best explanations of different sorting procedures that I’ve ever seen – explaining MergeSort with stacks of playing cards, and the similarity between MergeSort and an elimination tournament in sports.
I learned a lot from this book. For example: The University of Hawaii, which did not have the option of running physical cables between its different campuses, invented wireless networking, or at least packet-switching over radio waves, and exponential backoff that makes it possible for many packet-switching transmitters to share the same frequency.
There was also a bit of practical advice. The book discusses the explore/exploit tradeoff. In other words, “Should I go to a restaurant known to be good, or should I try a new restaurant, and risk being let down with the possible reward of discovering a new good restaurant?” The answer is, “It depends how much longer you plan to live in that town. If it’s your last night, go to a restaurant known to be good, because discovering a new restaurant has little utility. If you plan to live there ten more years, explore more often.” I like this advice, and I think it extends generally: when you’re young, try lots of stuff. Then when you’re older, you’ll know what works for you.
Also, here are some software engineering things that I am a little better at just because I read the book:
- Explaining different sorting algorithms
- Understanding TCP
- Understanding different problems with caching
- Understanding different problems with scheduling
- Finding prime numbers
And the list goes on. So here’s the TL;DR for this book: strongly recommended.
Till next time, happy learning!
-Will