Algorithms to Live By

by Brian Christian and Tom Griffiths

2016 · 368 pages · Summary updated 24 October 2026

Algorithms to Live By by Brian Christian and Tom Griffiths applies computer science to everyday decisions, from when to stop searching to how to schedule your week. For curious readers who want sharper ways to decide.

Get the book

Links may earn a commission.

The gist

Brian Christian and Tom Griffiths argue that many everyday problems match problems computer scientists have studied, and their solutions can guide us. Use the 37 percent rule to know when to stop searching. Explore early and exploit late. Do not sort what you rarely search. Keep what you used most recently, as in a Least Recently Used cache. Choose a scheduling rule that fits your goal, and batch interruptions to avoid thrashing. Combine priors with evidence using Bayes's rule, and avoid overfitting by thinking less when data is noisy. Relax hard constraints, use randomness, and practice computational kindness toward others.

Key ideas

  1. 01

    Use the 37 percent rule to know when to stop looking

    In the secretary problem, you see options one at a time and must accept or reject each forever. The best strategy is to look at the first 37 percent without committing, to set a standard, then take the first option better than all you have seen. It gives about a 37 percent chance of picking the very best, the highest possible. The authors apply it to apartment hunting and dating. If you can go back to rejected options or might be turned down, look for less time.

  2. 02

    Explore early, exploit late

    The explore and exploit trade-off asks whether to try something new or stick with what you know is good. The deciding factor is how much time you have left. New information is worth more when you have time to use it. So a newcomer to a city should try many restaurants, and someone leaving soon should go back to a favorite. The authors, drawing on Laura Carstensen's research, read older people's smaller circles of close friends as a rational shift toward exploiting, not as decline.

  3. 03

    Sort less and cache by recent use

    Sorting is costly, and the cost grows faster than the number of items. It pays only if you will search often, so an inbox you rarely search does not need folders. For deciding what to keep near, computers use Least Recently Used: discard what you used longest ago. Apply it to a closet. The Noguchi filing system puts each used file back at the left of a shelf, so files sort themselves by recent use. A messy pile with recent papers on top is a decent cache too.

  4. 04

    Pick a scheduling rule that fits your goal

    No single schedule is best. To minimize your worst lateness, do the task due soonest first. To finish the most tasks on time, use Moore's algorithm and drop the largest task when you will miss a deadline. To cut total waiting time, do the shortest tasks first, weighted by importance. The authors warn against thrashing, when switching between tasks eats all the time, and suggest batching interruptions, such as checking email a few times a day, a method computers call interrupt coalescing.

  5. 05

    Predict with Bayes and the right prior

    Bayes's rule combines what you already believe with new evidence. J. Richard Gott predicted the Berlin Wall's lifespan in 1969 by assuming he saw it at a random point in its life, the Copernican principle. The right prediction also depends on the kind of distribution. For lifespans, predict near the average. For power-law things like box-office earnings, predict a multiple of what you have seen. Good priors come from real experience, and news coverage of rare events can distort them.

  6. 06

    Avoid overfitting: sometimes think less

    A model that fits past data too closely fails on new data. Charles Darwin listed pros and cons of marriage, and the authors argue that adding more factors does not always improve a decision. Machine learning fights overfitting with cross-validation, testing on new data, and regularization, penalizing complexity. Early stopping, thinking less, works too. When information is noisy or the future is uncertain, a simple rule or a gut decision can beat a detailed analysis that captures noise instead of signal.

  7. 07

    Relax constraints and allow some randomness

    Some problems, like finding the shortest route through many cities, are too hard to solve perfectly. Computer scientists relax them: drop a rule, solve the easier version, then move back toward reality. The human version is asking what you would do without a given constraint. Randomness also helps. Stanislaw Ulam's solitaire games led to the Monte Carlo method of sampling instead of calculating. Simulated annealing uses early randomness to escape answers that are only locally good. A random choice now and then keeps you from getting stuck.

  8. 08

    Practice computational kindness

    Thinking costs effort, so you can be kind by reducing the mental work you ask of others. Instead of asking a friend what they want to do, offer two options. Instead of asking when someone is free, propose a time. Game theory adds a related lesson: when everyone's best move makes all worse off, as with unlimited vacation policies that lead people to take less leave, change the rules of the game. The authors close by saying that a good process matters more than a perfect outcome.

Full summary

Computer science for everyday choices

Algorithms to Live By by Brian Christian and Tom Griffiths came out in 2016. Its subtitle is The Computer Science of Human Decisions. Christian is a writer whose earlier book, The Most Human Human, looked at what artificial intelligence reveals about people. Griffiths is a cognitive scientist who studies how people make decisions, first at the University of California, Berkeley, and later at Princeton.

Their argument is that many everyday problems are versions of problems computer scientists have already studied in depth. When to stop looking for an apartment, how to organize a closet, how to plan a busy week and how to deal with uncertainty all have formal equivalents. The solutions computer scientists found can guide human choices. Just as important, the field shows which problems are truly hard. When no perfect answer exists, it offers good-enough strategies and permission to stop agonizing.

The book has eleven chapters, each on one family of algorithms, and a short conclusion.

Optimal stopping: when to stop looking

The first chapter is about the secretary problem. You are hiring for a job and interview candidates one at a time. After each interview, you must hire the person or reject them forever. How do you maximize your chance of picking the best one?

The answer is the 37 percent rule. Spend the first 37 percent of your search looking without committing, just to set a standard. Then commit to the first option better than everything you have seen. This gives you about a 37 percent chance of choosing the very best, which is the highest chance any strategy can offer. The authors apply it to apartment hunting and dating. They tell the story of the operations researcher Michael Trick, who used the rule to decide when to propose.

They also show how the answer changes with the rules. If you can go back to a rejected option, or if a candidate might say no, you should look for less time. If you have objective scores rather than just comparisons, a threshold rule works better. The broader lesson is that a search has a cost, and the problem is not finding the best option but knowing when to stop.

Explore and exploit

The second chapter covers the trade-off between trying new things (explore) and enjoying what you already know is good (exploit). Computer scientists model this as the multi-armed bandit, a gambler facing several slot machines with unknown payouts.

The key factor is how much time you have left. Early in a period, explore, because new information can pay off for a long time. Late in a period, exploit, because there is little time to use what you learn. A person new in town should try many restaurants. A person leaving soon should return to their favorite. The authors describe the Gittins index and the upper confidence bound approach, which gives a bonus to options you know little about, and the related idea of minimizing regret.

They apply this to aging. Older people tend to have fewer, closer friends and to prefer familiar activities. The authors, drawing on the psychologist Laura Carstensen's research, argue that this is not decline but a rational shift from exploring to exploiting as time grows shorter.

Sorting and caching

The third chapter is on sorting. Sorting is costly, and its cost grows faster than the number of items. The authors explain Big O notation and contrast slow methods such as bubble sort with faster ones such as merge sort. Their practical point is that sorting is only worth it if you will search the sorted items often. For an email inbox or a pile of papers you rarely search, sorting is wasted effort. They also look at sports tournaments as sorting algorithms and at pecking orders in animals and organizations as a way to avoid constant fights.

The fourth chapter is on caching, the problem of deciding what to keep close at hand when space is limited. The best general rule computers use is Least Recently Used: when you need space, throw out the item you used longest ago. Applied to a closet, this means getting rid of what you have not worn in the longest time. The authors also describe the Noguchi filing system, in which you put every file you use back at the left end of a shelf, so the files sort themselves by recent use. A messy pile on a desk, with recent papers on top, is a similar and efficient cache.

They end with memory. Drawing on the psychologist Michael Ramscar, they suggest that older people's slower recall may partly reflect a larger store of information to search, not only a failing brain.

Scheduling

The fifth chapter treats time management as a scheduling problem. The first lesson is to decide what you are optimizing for, because different goals need different rules:

  • To minimize the lateness of your latest task, use earliest due date: do the task due soonest first.
  • To finish the most tasks, use Moore's algorithm: work by due date, and when you are going to miss one, drop the largest task.
  • To reduce the total time tasks spend waiting, use shortest processing time: do the quickest tasks first. Weight them by importance if they matter differently.

The authors describe priority inversion, which nearly crippled NASA's Mars Pathfinder rover in 1997. A low-priority task held a resource that a high-priority task needed, so the important task waited. They also warn against thrashing, the state where a system spends so much time switching between tasks that it gets nothing done. The human version is constant context switching. Their fix is interrupt coalescing: batch your interruptions, such as checking email a few times a day, instead of answering each one as it arrives.

Bayes's rule and overfitting

The sixth chapter is about prediction from little data. Bayes's rule says to combine what you already believe (your prior) with the new evidence. The authors describe how the physicist J. Richard Gott visited the Berlin Wall in 1969 and predicted how long it would last, using the Copernican principle: assume you are seeing it at a random point in its life. They then show that the right prediction depends on the kind of distribution. For things with a typical size, such as human lifespans, predict close to the average. For things that follow a power law, such as box-office earnings, predict a multiple of what you have seen so far. For things with no memory, such as some waiting times, predict a constant amount more. Good priors, they argue, come from real experience of the world, and the stories we hear in the media can distort them.

The seventh chapter covers overfitting: building a model so closely around past data that it fails on new data. They tell how Charles Darwin weighed marriage with a list of pros and cons, and argue that more factors do not always mean a better decision. In machine learning, the cures include cross-validation, testing a model on data it has not seen, and regularization, penalizing complexity. Early stopping is a cure too: think less. When the data is noisy or the future uncertain, simple rules and gut decisions can beat elaborate analysis.

Relaxation and randomness

The eighth chapter is about problems too hard to solve perfectly, such as the traveling salesman problem: the shortest route through many cities. For these, computer scientists use constraint relaxation. They solve an easier version with some rules removed, then work back toward the real problem. The human version is to ask what you would do if a constraint did not exist, such as money or fear, and then see how close you can get.

The ninth chapter shows how randomness can help. The mathematician Stanislaw Ulam, while playing solitaire, realized that it was easier to play many games and count the results than to calculate the odds. This became the Monte Carlo method. Randomized tests can check whether a large number is prime far faster than certain methods. Simulated annealing, which starts with a lot of randomness and cools it gradually, helps escape solutions that look good locally but are not the best overall. The human lesson is that a bit of randomness, such as trying a random restaurant or route, can stop you getting stuck.

Networking and game theory

The tenth chapter draws lessons from how the internet moves data. Messages travel in packets, and receivers send acknowledgments. When packets are lost, senders use exponential backoff, waiting twice as long after each failure, which the authors suggest for persistent social or institutional problems too. The additive increase, multiplicative decrease rule lets a sender raise its speed slowly and cut it sharply at the first sign of overload. The authors also describe bufferbloat, where long queues cause delay, and argue that dropping some tasks is better than letting an endless backlog build up. In conversation, listeners' small responses act like acknowledgments that keep speakers on track.

The eleventh chapter is about game theory. Each person's best move depends on what others do. A Nash equilibrium is a state where no one can gain by changing strategy alone, but equilibria can be bad for everyone, as in the prisoner's dilemma. The price of anarchy measures how much worse things get when everyone acts selfishly. The authors argue that unlimited vacation policies can make people take less time off, because no one wants to be seen taking more than others. The answer is mechanism design: change the rules of the game so that self-interest leads to good outcomes. The Vickrey auction, where the highest bidder pays the second-highest price, rewards honest bidding. The authors also describe information cascades, where people follow others' actions instead of their own information, as in bubbles.

Computational kindness

The conclusion offers the idea of computational kindness. Since thinking is costly, we can be kind to others by reducing the mental work we ask of them. Instead of asking a friend what they want to do, propose two options. Instead of asking when someone is free, offer a time. The authors also argue that rational behavior is not about always getting the best outcome. It is about following a good process, and accepting that a good process will sometimes give bad results.

What the critics say

Reviewers generally praise the clear explanations, but some find the leap from algorithm to life uneven. The 37 percent rule, for example, assumes conditions rarely met in real dating or house hunting, such as a known number of options and no going back, and the authors admit this. Some readers find the technical sections heavy and the practical advice thin. Others note that many of the life lessons, such as batching email, are familiar without the computer science.

Who should read it

Read it if you like ideas from mathematics and computing and want to see how they apply to decisions about time, search, organization and uncertainty. No technical background is needed, but readers who enjoy explanations of how things work will get the most out of it.

Do this week

Flashcards

12 cards

 

Quiz

Question 1 of 5

According to the 37 percent rule, what should you do during the first 37 percent of a search?

Questions this book answers

What is Algorithms to Live By about?

Algorithms to Live By by Brian Christian and Tom Griffiths shows how solutions from computer science apply to everyday decisions. Chapters cover optimal stopping, explore and exploit, sorting, caching, scheduling, Bayes's rule, overfitting, relaxation, randomness, networking and game theory. Each explains a family of algorithms and what it suggests about choosing a home, managing time or dealing with uncertainty.

What is the 37 percent rule in Algorithms to Live By?

The 37 percent rule solves the secretary problem, where you see options one at a time and cannot go back. Spend the first 37 percent of your search only looking, to set a standard. Then commit to the first option better than all you have seen. This gives about a 37 percent chance of choosing the very best, the highest possible under those conditions.

What are the main ideas of Algorithms to Live By?

Know when to stop searching (37 percent rule). Explore early and exploit late. Sort only what you will search. Keep what you used recently (Least Recently Used). Match your scheduling rule to your goal and batch interruptions. Use Bayes's rule with good priors. Avoid overfitting by keeping decisions simple. Relax hard constraints, use some randomness and practice computational kindness.

What is explore vs exploit in Algorithms to Live By?

It is the trade-off between trying new options to gain information (explore) and using the options you already know are good (exploit). The authors model it as the multi-armed bandit problem. The key factor is time: explore when you have a long time ahead to use what you learn, and exploit as your time runs out.

What is computational kindness?

Computational kindness is the authors' term for reducing the mental effort you ask of other people. Thinking is costly, so open-ended questions such as what do you want to do or when are you free push the work onto others. Proposing two options or a specific time is kinder, because it gives the other person a simple problem to solve.

What are the criticisms of Algorithms to Live By?

Reviewers praise the explanations, but some say the leap from algorithm to life is uneven. The 37 percent rule, for example, assumes a known number of options and no going back, which rarely holds in dating or house hunting. Some readers find the technical parts heavy and the practical advice thin or already familiar.

New books, occasionally

Get new summaries by email.

Free. Double opt-in. Unsubscribe with one click.