Algorithms to Live By
The Computer Science of Human Decisions
Brian Christian and Tom Griffiths on what computer science has established about problems humans also face — searching, sorting, scheduling, forecasting and deciding when to stop — and what the formal results suggest about handling them.
- First published
- 2016
- Publisher
- Henry Holt
- Pages
- 359
- Shelf
- Technology
- Level
- Entry
- ISBN-13
- 9781480560406
Record checked against
Catalogue note
- Reads as
- TechnicalAssumes and builds craft knowledge.
- Level
- Accessible / FoundationalNo prior reading assumed.
- Approach
- Applied
- Written for
- Engineers, Newcomers to the subject
Saved in this browser only — no account, nothing sent anywhere. My library
Read this if
- You build software and want the ideas under the tools.
- You want to decide better when the information is incomplete.
- You want to know how we know things, and how that goes wrong.
- You work in this area and want depth rather than an overview.
- You are starting from scratch here and want a way in that assumes no prior reading.
The premise
Their argument is that many everyday problems have exact formal analogues that computer science has already studied, and that the optimal strategies are known, counter-intuitive, and transferable.
Their framing is careful: these are not metaphors. Choosing when to stop looking at apartments is the same mathematical problem as optimal stopping, and the solution applies.
These are not analogies. The apartment search is optimal stopping, and the known solution actually applies.
Devmark’s reading — not a quotation from the book
Optimal stopping
Their opening result, and the best known. When you must choose from a sequence of options with no going back, the optimal strategy is to observe roughly the first thirty-seven per cent without committing, then take the next option better than everything seen.
Its appeal is that it gives a defensible answer to a class of decisions usually made by feel, and the success rate — also about thirty-seven per cent — is an honest statement of how well anyone can do.
Explore and exploit
Their treatment of the multi-armed bandit problem: how long to keep trying new options versus committing to the best one found.
Their key insight is that the answer depends on how much time remains. Exploration is rational when there is time to benefit from what you learn and irrational when there is not — which explains why the old sensibly return to known favourites and the young sensibly do not.
Sorting and caching
Their argument that sorting is only worth its cost if you will search repeatedly, and that many domestic and organisational sorting efforts are unjustified by the number of subsequent searches.
Their treatment of caching is the more useful half: least-recently-used eviction is provably near-optimal, which is a strong argument for keeping what you last used nearest to hand rather than organising by category.
Scheduling
Their survey of scheduling theory produces specific answers. To minimise total completion time, do the shortest task first. To minimise lateness, do the one due soonest. To minimise the number of late items, a different rule again.
Their most useful finding is that the objective determines the algorithm, so a person who cannot say what they are optimising cannot be scheduling well by any standard.
The right scheduling rule depends entirely on what you are minimising. Most people have never named it.
Devmark’s reading — not a quotation from the book
Bayes and prediction
Their explanation of how to forecast a duration from a single observation, using the distribution the quantity is drawn from.
The practical content is the distinction between normally distributed quantities, where the expected remainder shrinks as you wait, and power-law quantities, where it grows — which is why waiting longer for a delayed train and a long-running project have opposite implications.
Overfitting and when to think less
Their argument that more data and more complex models are not always better, and that the same applies to human deliberation.
Their conclusion — that under uncertainty, simpler rules and earlier stopping frequently outperform more elaborate reasoning — is the philosophically interesting part, and it connects to the heuristics literature.
Computational kindness
Their most original social suggestion: recognising that asking someone an open question imposes computation on them, and that offering constrained options is a kindness rather than a presumption.
"When would suit you?" is expensive; "Tuesday at two or Thursday at ten?" is cheap. It is a small idea that changes behaviour immediately.
Where it overreaches
Not every mapping holds. Some human problems differ from their formal analogues in ways that matter — preferences change during a search, information is not independent, and the cost of a wrong answer is not symmetric.
The authors are generally careful about this, but several chapters press the analogy harder than the correspondence supports, particularly in the relationships material.
What to take from it
The explore/exploit framing, which is the most broadly applicable idea in the book: the right balance between trying something new and returning to a known good option depends almost entirely on how much time remains to benefit from what you learn.
And computational kindness, which is free, immediate, requires no mathematics, and improves every scheduling conversation you have for the rest of your life by moving the work from the other person to you.
What to take away
- 01Look, then leapObserve about a third of the options without committing, then take the next one better than all of them.
- 02Explore while time remainsThe horizon determines the answer, which is why the young and the old should behave differently and do.
- 03Sort only if you will search repeatedlyMost organising effort is unjustified by the number of subsequent lookups it saves.
- 04Name what you are minimisingTotal completion time, lateness and number of late items each need a different rule.
- 05Constrain the questionOffering two options instead of an open one moves the computation from them to you.
