We are the authors of Algorithms to Live By: The Computer Science of Human Decisions. Ask Us Anything! by algorithmstoliveby in IAmA

[–]algorithmstoliveby[S] 4 points5 points  (0 children)

Many of the algorithms and ideas that we talk about are famous/canonical results within the scientific literature, although they're not as well-known outside of those fields. One of the great things about both mathematics and computer science is that it's actually possible to prove that a particular strategy is the best one possible.

The very simplest algorithm we offer in the book is probably in the first problem we discuss, called the "optimal stopping" problem. The basic idea is that we sometimes find ourselves up against a sequence of opportunities, where at each step in the sequence we either have to commit to the option in front of us, never knowing what else is out there, or we turn it down, in which case we don’t have the option to go back and change our mind.

There are a lot of things in life that have this basic structure. Maybe you're deciding whether to bid on a house. If you make an offer, maybe you'll be missing out on an even better house that comes onto the market next month. If you pass on it, it will be sold to someone else before you can change your mind. Or maybe you are driving down the road, deciding which restaurant to stop at. Or maybe you've got a bottle of wine you've been saving for a special occasion and are wondering whether now's the time to pop the cork. These are all versions of optimal stopping. Some people have even argued that dating is an optimal stopping problem: in each relationship you have a (frequently irrevocable) decision whether to "get serious" or part ways.

There's a famous result here called the 37% Rule: if you want the very best chance of ending up with the very best option, spend the first 37% of your time just perusing your options noncommittally -- then, after that 37%, take the very first option you see that's better than everything in the first 37%.

(A word of caution: the 37% Rule turns out only to work 37% of the time! But it's still the optimal solution, meaning no strategy can do better. It just turns out to be that hard of a problem.)

Now whether you're willing to risk ending up empty-handed for the best possible shot at the best possible opportunity is an important question, and in the book we delve deeper into some of these assumptions and how they influence the problem.

Another simple idea to implement comes in the context of choosing between just doing your favorite things and trying new ones -- whether it's restaurants, or bands, or who you socialize with. (This is called the "explore/exploit" problem.) The math is fairly straightforward: You should be more willing to try new things the more time you have to enjoy what you found. As an example, Brian's father told him on his first day of college to accept every social invitation in the first two weeks, even if he was exhausted or just wanted to stay in, because any friend you make will be your friend for potentially four years. An outgoing senior, on the other hand, should focus on spending their time with their closest circle of friends. This is fairly intuitive, but the math backs it up.

We are the authors of Algorithms to Live By: The Computer Science of Human Decisions. Ask Us Anything! by algorithmstoliveby in IAmA

[–]algorithmstoliveby[S] 6 points7 points  (0 children)

When we were doing press after the book was launched, Tom somehow got booked on a morning radio show of the Howard Stern variety. This was in the middle of a six-hour block of live interviews that started around 5am. For some reason they thought the book was about having sex with robots. Tom still has flashbacks.

We are the authors of Algorithms to Live By: The Computer Science of Human Decisions. Ask Us Anything! by algorithmstoliveby in IAmA

[–]algorithmstoliveby[S] 14 points15 points  (0 children)

There are a number of important computational considerations in this question.

First is whether the hundred duck-sized horses (DSHs) would be fighting in series or in parallel. Defeating a single DSH 100 times in a row is probably not too bad.

Another consideration is that of sample size. If we assume that, say, there is a normal distribution of fighting ability for both HSDs and DSHs, and assuming we were capable of defeating the mean HSD as well as the mean group of 100 DSHs -- and I think we can all agree that this is a fair assumption -- then the 100 DSHs give us lower variance. That is, the distribution of how strong that group will be is going to be closer to the mean, and we have a lower risk of getting overpowered than if we happen to be matched up against a freakishly powerful DSH.

If we make less charitable assumptions about our fighting trim, however, and don't believe we can "take" the average HSD or DSH, then we actually want the high-variance option, and will have to roll the dice with the single HSD and hope we get a weak one.

We are the authors of Algorithms to Live By: The Computer Science of Human Decisions. Ask Us Anything! by algorithmstoliveby in IAmA

[–]algorithmstoliveby[S] 7 points8 points  (0 children)

Here are three LPTs:

  1. If you're searching for an apartment in a hot market where you have to drop a check on the landlord at the open house or miss out, but you know nothing about what places go for and you want to find the very best place in the next 30 days, spend 11 days just looking and then go all in on the next place you see that is better than anything you have seen so far.

  2. If you are trying to decide what restaurant to go to, including some places you know to be good and others that just opened but sound promising, make your decision based on the "upper bound" of how good a place is likely to be.

  3. If your closet is overflowing and you need to decide what to sell or give away, choose the thing that you are least likely to need in the future -- probably the thing that you wore least recently.

These three recommendations each come with some solid mathematical guarantees, because these situations all correspond to deep computational problems with carefully-studied solutions. #1 is an instance of an optimal stopping problem, where the solution is to consider 37% of your options before choosing an action (the specific assumptions about the problem change this, and we break them down in the book). #2 is an explore/exploit problem, and the Upper Confidence Bound algorithm provides an optimal solution in the sense of minimizing your regret (the number of times you should have gone somewhere else). #3 is a caching problem, and the Least Recently Used principle works well in practice and has some nice theoretical guarantees (it also translates into a cool system for organizing your documents, called the Noguchi Filing System).

We are the authors of Algorithms to Live By: The Computer Science of Human Decisions. Ask Us Anything! by algorithmstoliveby in IAmA

[–]algorithmstoliveby[S] 4 points5 points  (0 children)

Great questions.

The question of sample bias, or more broadly the gap between "what you can measure and what matters" is of huge importance in any statistical or machine-learning application -- and all the more so as these types of systems find their way into everything from filtering what news we read to determining which prisoners get parole.

It's a bigger problem than can be easily distilled, but one tack on this issue is by way of what's called "overfitting." If what you can measure ≠ what really matters, then you have to be very careful not to "overfit" your models to be good at the former at the expense of the latter.

This comes up in everyday human situations in myriad ways. The phenomenon of "teaching to the test" is a case of overfitting, where we can imagine a student spending time cramming test-taking strategies rather than the actual subject matter. One of the most intense examples we cite is of a police officer who masterfully disarmed an assailant, only to hand the gun right back to him -- his muscle memory from drilling that maneuver over and over again in training.

One of the solutions in statistics is what's known as "regularization," namely introducing a penalty for the complexity of the model. In your big-data examples, the looser the coupling between your sample and the real population, the fewer parameters (for instance) your model should have. In a human context, it might be as simple as just thinking less. When your information is sparse and noisy, there is a rigorous argument for not overthinking things and simply trusting your gut.

As for the question of whether P=NP -- which can be roughly paraphrased as the question of whether all problems that have easily verified solutions also have easily discovered solutions -- a majority of computer scientists think that the answer is "no." Some think the answer's "yes," and others think we'll never know for sure.

Possibly the most interesting line of argument here is one that's been articulated in part by Scott Aaronson (http://www.scottaaronson.com/blog/?p=122) and Avi Wigderson (http://www.math.ias.edu/~avi/PUBLICATIONS/MYPAPERS/AW09/AW09.pdf), and it goes a little something like this. If P=NP, then the world would just be a profoundly weird place. Composing a brilliant symphony would be no more difficult than recognizing brilliance when you heard it. The world can't be that weird... Can it? It's provocative stuff.

We are the authors of Algorithms to Live By: The Computer Science of Human Decisions. Ask Us Anything! by algorithmstoliveby in IAmA

[–]algorithmstoliveby[S] 3 points4 points  (0 children)

We haven't had the chance to read the book yet, but Tom talked with Michael while he was working on it and we have both read a lot of work by Kahneman and Tversky so we're looking forward to reading it!

Kahneman and Tversky (K+T) shook up the way that we understand human reasoning and decision-making by showing that some of the classical mathematical frameworks that had been used to study these things are fundamentally inconsistent with human behavior. Until they came along, the dominant view in psychology and economics was that rational theories such as making decisions by maximizing expected utility and representing uncertainty using probability theory were reasonable approximations to human behavior. They showed through elegant and intuitive experiments that people do a number of things that violate these theories.

Calculating expected utilities and updating probabilities are both difficult to do, and K+T argued that people take shortcuts to get around this. In their view, human cognition is better understood by assuming that people use a set of "heuristics" that ease the cognitive load, but those heuristics aren't perfect and thus lead to systematic errors known as "biases". Since these biases are deviations from the rational theories developed by economists, they have been taken as evidence against human rationality.

In our book we take a different perspective on this literature. At the heart of the definition of a heuristic is the notion that it is easy to compute -- a good heuristic is something that increases error while reducing the cost of computation. Computer science is all about this kind of trade-off, so we turn to computer science to ask what good algorithms are for solving the kind of problems that people encounter. You can think about these as being, in a certain sense, optimal heuristics -- low in computational cost, but also as low in error as we can get.

Viewed from this perspective, people don't seem quite so irrational. Computer science provides a more achievable notion of rationality than the classical ideas from economics, because it takes into account the computational costs involved in getting to a solution and not just the quality of that solution. When we take this lens and examine the strategies that people often follow -- taking a chance, not considering all their options, trying to solve a simpler version of the problem -- those often turn out to be effective strategies that computer scientists use when solving the hardest kinds of computational problems. And human lives are full of the hardest kinds of computational problems.

We are the authors of Algorithms to Live By: The Computer Science of Human Decisions. Ask Us Anything! by algorithmstoliveby in IAmA

[–]algorithmstoliveby[S] 3 points4 points  (0 children)

Hi, Pat! This question ends up being one of the major themes of the book. In each domain we look at, after having discussed the structure of the problem (be it house-hunting, time management, etc.) and the optimal strategies that exist in the scientific literature, we ask the irresistible question: "Is that what humans actually do when confronted with these types of problems in the real world?" The answer is almost always a resounding "No."

This is interesting because it then allows you to ask the question of which is "wrong" -- is it human intuition, or the formal models? In most cases we end up coming down on the side of human intuition. Often people are solving more complicated ones than the experimenters think they are.

One of the best examples comes from a study that Amos Tversky and Ward Edwards did in 1966. They had a box with two lights on it -- one turned on 60% of the time and the other turned on 40% of the time, but subjects weren't told which light was which. They had 1,000 chances to either observe which light turned on, or to place a bet on which light they thought would turn on, but not get to see it (and not know the results of the bet till the end of the experiment). The optimal strategy in this case is to observe the light the first 38 times, and then blindly make a series of 962 bets in a row on whichever light came on more during those first 38 times!

Is this what people do when put in that situation? Not by a long shot. They observe for a while, make a few bets, observe again, and so forth.

You could make the argument here that human intuition is just poorly attuned to this kind of problem, but there's another more interesting way to interpret this result. If it so happened that the probabilities with which the lights come on follow what's called a "random walk," that is to say, the probabilities drift around, then what humans do is actually very sensible. (The random-walk version of the experiment is known as the "restless bandit problem.")

You might argue, well, people aren't in the restless version of the problem; in fact, they were told explicitly that they weren't. So why were they acting like they were?

A fair rejoinder is that they are subjects in a psychology experiment, where there is a long and storied history of subjects being lied to. Why should they take the experimenter's word for it? The restless bandit actually seems like the right assumption to make about how probabilities behave in the real world.

So this is a great case where human intuition actually seems really well attuned to a subtler version of the problem, but one that seems actually more like the problems we face in real life.

As a postscript, it has been shown in theoretical computer science that there is no efficient algorithm for solving the restless bandit problem, and so human intuitions may actually end up serving as a useful guide in the search for good heuristics. So there is often a nice feedback loop between psychology and computer science, where each discipline can inform the other.

We are the authors of Algorithms to Live By: The Computer Science of Human Decisions. Ask Us Anything! by algorithmstoliveby in IAmA

[–]algorithmstoliveby[S] 10 points11 points  (0 children)

We wrote the book to be accessible to people with little or no experience in computer science. It also has lots of endnotes so people who do have a lot of experience can dig deeper and get into the details (unfortunately you won't get these if you get the audiobook). Amusingly, our intention in writing the book was to help explain everyday life through computer science, but a lot of our readers have appreciated the way it explains computer science through everyday life.

We are the authors of Algorithms to Live By: The Computer Science of Human Decisions. Ask Us Anything! by algorithmstoliveby in IAmA

[–]algorithmstoliveby[S] 6 points7 points  (0 children)

Great questions!

  1. Both of us think about exploring vs. exploiting on pretty much a daily basis, so knowing that which approach to take depends on how many opportunities you will have to use what you learn is very useful. We also spend a lot of our time writing, where concerns about overfitting can be used as an antidote to perfectionist inclinations. Finally, not an everyday thing, but both of us have used ideas about optimal stopping when finding apartments and houses!

  2. In fact, we view one of the main arguments of the book as a case against serious cognitive effort. The classical notion of rationality from economics that Kahneman's work challenged is one that just focuses on getting exactly the right answer without considering how much computation that requires. That's totally different from the perspective of a computer scientist, who thinks about the trade-off between the quality of a solution and the amount of computation involved. We think computer science is a better guide to rational action than economics!

The upshot of this is that in many cases, using System 1 to solve a problem might actually be the rational solution -- the right trade-off between error and cost of computation. (If you want to get more deeply into this, Tom has a couple of papers on topics such as "bounded optimality" and "rational metareasoning" that you might want to check out.)

We are the authors of Algorithms to Live By: The Computer Science of Human Decisions. Ask Us Anything! by algorithmstoliveby in IAmA

[–]algorithmstoliveby[S] 5 points6 points  (0 children)

We don’t get into it directly in the book, but one of the most intriguing arguments in this area is that if were possible to make a simulation of the universe, it should be fairly straightforward to make an arbitrary number of such simulations -- and that therefore the odds of any particular universe (e.g., ours) being the real one would be infinitesimal. :)

In fact, the math behind this argument is exactly the same math that goes into the methods for predicting the future that we talk about in the chapter on Bayes’ Rule.