Algorithms to Live By: The Computer Science of Human Decisions
Rate it:
Open Preview
3%
Flag icon
Look-Then-Leap Rule: You set a predetermined amount of time for “looking”—that is, exploring your options, gathering data—in which you categorically don’t choose anyone, no matter how impressive. After that point, you enter the “leap” phase, prepared to instantly commit to anyone who outshines the best applicant you saw in the look phase.
Daryl Ducharme
discussing the 37% rule with the "secretary problem". That percentage is the time to change to leap mode.
4%
Flag icon
The first set of variants we considered—rejection and recall—altered the classical secretary problem’s assumptions that timely proposals are always accepted, and tardy proposals, never. For these variants, the best approach remained the same as in the original: look noncommittally for a time, then be ready to leap.
Daryl Ducharme
you just need to adjust the percentages accordingly. Down for acceptance not being assured and up for recall being available (with lower acceptance in the recall)
4%
Flag icon
trying to make the best choice when options only present themselves one by one is also the basic structure of selling a house, parking a car, and quitting when you’re ahead. And they’re all, to some degree or other, solved problems.
6%
Flag icon
The math shows that you should always keep playing. But if you follow this strategy, you will eventually lose everything. Some problems are better avoided than solved.
Daryl Ducharme
Anything that seems like the triple or nothing game
6%
Flag icon
But that impatience suggests another consideration that isn’t taken into account in the classical secretary problem: the role of time. After all, the whole time you’re searching for a secretary, you don’t have a secretary. What’s more, you’re spending the day conducting interviews instead of getting your own work done.
Daryl Ducharme
time and other non obvious costs may be specific to you and the way you function best
7%
Flag icon
People tend to treat decisions in isolation, to focus on finding each time the outcome with the highest expected value. But decisions are almost never isolated, and expected value isn’t the end of the story.
Daryl Ducharme
What if something has a higher expected value and you don't experience it because you stick with what you know.
7%
Flag icon
It’s incredibly important advice. It’s also somewhat self-contradictory. Seizing a day and seizing a lifetime are two entirely different endeavors.
Daryl Ducharme
We often forget the latter, so what's the balance?
7%
Flag icon
explore when you will have time to use the resulting knowledge, exploit when you’re ready to cash in. The interval makes the strategy.
7%
Flag icon
sequel is a movie with a guaranteed fan base: a cash cow, a sure thing, an exploit. And an overload of sure things signals a short-termist approach,
Daryl Ducharme
How do we get new franchises?
8%
Flag icon
the present has a higher priority: a cured patient today is taken to be more valuable than one cured a week or a year from now, and certainly the same holds true of profits. Economists refer to this idea, of valuing the present more highly than the future, as “discounting.”
Daryl Ducharme
Is this why there are so many short term plans in business?
9%
Flag icon
Exploration in itself has value, since trying new things increases our chances of finding the best. So taking the future into account, rather than focusing just on the present, drives us toward novelty.
Daryl Ducharme
How much do we discount the future's success compared to a success right now? The more we discount it, the less exploration makes sense.
9%
Flag icon
if we’re following a regret-minimizing algorithm, every year we can expect to have fewer new regrets than we did the year before.
9%
Flag icon
Upper Confidence Bound algorithms implement a principle that has been dubbed “optimism in the face of uncertainty.” Optimism, they show, can be perfectly rational. By focusing on the best that an option could be, given the evidence obtained so far, these algorithms give a boost to possibilities we know less about.
10%
Flag icon
Following the advice of these algorithms, you should be excited to meet new people and try new things—to assume the best about them, in the absence of evidence to the contrary. In the long run, optimism is the best prevention for regret.
12%
Flag icon
Andy Warhol put it, “A Coke is a Coke.” Having instincts tuned by evolution for a world in constant flux isn’t necessarily helpful in an era of industrial standardization.
12%
Flag icon
our intuitions about rationality are too often informed by exploitation rather than exploration. When we talk about decision-making, we usually focus just on the immediate payoff of a single decision—and if you treat every decision as if it were your last, then indeed only exploitation makes sense.
12%
Flag icon
Perhaps the deepest insight that comes from thinking about later life as a chance to exploit knowledge acquired over decades is this: life should get better over time. What an explorer trades off for knowledge is pleasure.
16%
Flag icon
Sorting something that you will never search is a complete waste; searching something you never sorted is merely inefficient.
Daryl Ducharme
don't sort what will not be searched
16%
Flag icon
Computer science shows that the hazards of mess and the hazards of order are quantifiable and that their costs can be measured in the same currency: time.
Daryl Ducharme
time is a currency that matters in life
22%
Flag icon
In any system responsible for managing a vast data base there must be failures of retrieval. It is just too expensive to maintain access to an unbounded number of items.”
Daryl Ducharme
This applies to humans, computers, and tangible items
23%
Flag icon
Unavoidably, the larger a memory is, the more time it takes to search for and extract a piece of information from it.
Daryl Ducharme
This is why w cache is still important on very fast systems. You get speed gains from having a smaller set of items to search.
23%
Flag icon
Recent work by a team of psychologists and linguists led by Michael Ramscar at the University of Tübingen has suggested that what we call “cognitive decline”—lags and retrieval errors—may not be about the search process slowing or deteriorating, but (at least partly) an unavoidable consequence of the amount of information we have to navigate getting bigger and bigger. Regardless of whatever other challenges aging brings, older brains—which must manage a greater store of memories—are literally solving harder computational problems with every passing day.
23%
Flag icon
So as you age, and begin to experience these sporadic latencies, take heart: the length of a delay is partly an indicator of the extent of your experience. The effort of retrieval is a testament to how much you know. And the rarity of those lags is a testament to how well you’ve arranged it: keeping the most important things closest to hand.
24%
Flag icon
It’s a full workweek for you either way, but now you’ve saved your clients three days of their combined time. Scheduling theorists call this metric the “sum of completion times.”
Daryl Ducharme
This algorithm is good to use when other people are dependent on you finishing the task
24%
Flag icon
only prioritize a task that takes twice as long if it’s twice as important.
Daryl Ducharme
if you also take carrying priority into consideration
25%
Flag icon
ignore the number and size of your debts entirely, and simply funnel your money toward the debt with the single highest interest rate. This corresponds rather neatly to working through jobs in order of importance per unit time. And it’s the strategy that will reduce the total burden of your debt as quickly as possible.
25%
Flag icon
Putting off work on a major project by attending instead to various trivial matters can likewise be seen as “the hastening of subgoal completion”—which is another way of saying that procrastinators are acting (optimally!) to reduce as quickly as possible the number of outstanding tasks on their minds. It’s not that they have a bad strategy for getting things done; they have a great strategy for the wrong metric.
Daryl Ducharme
this needs to be connected to ADHD and perfectionism
25%
Flag icon
What happens in a priority inversion is that a low-priority task takes possession of a system resource (access to a database, let’s say) to do some work, but is then interrupted partway through that work by a timer, which pauses it and invokes the system scheduler. The scheduler tees up a high-priority task, but it can’t run because the database is occupied. And so the scheduler moves down the priority list, running various unblocked medium-priority tasks instead—rather than the high-priority one (which is blocked), or the low-priority one that’s blocking it (which is stuck in line behind all ...more
Daryl Ducharme
The solution? priority inheritance based on what it's blocking
25%
Flag icon
Sometimes that which matters most cannot be done until that which matters least is finished, so there’s no choice but to treat that unimportant thing as being every bit as important as whatever it’s blocking.
26%
Flag icon
it’s clear by definition that every set of tasks and constraints has some schedule that’s the best, so scheduling problems aren’t unanswerable, per se—but it may simply be the case that there’s no straightforward algorithm that can find you the optimal schedule in a reasonable amount of time.
Daryl Ducharme
if an algorithm or heuristic doesn't work in a situation, just find what works in that special case.
26%
Flag icon
If trying to perfectly manage your calendar feels overwhelming, maybe that’s because it actually is.
Daryl Ducharme
scheduling is a good place to embrace imperfection
26%
Flag icon
turns out, though, that even if you don’t know when tasks will begin, Earliest Due Date and Shortest Processing Time are still optimal strategies, able to guarantee you (on average) the best possible performance in the face of uncertainty.
Daryl Ducharme
learn to preempt current tasks when it makes sense and let it go when it doesn't
26%
Flag icon
As business writer and coder Jason Fried says, “Feel like you can’t proceed until you have a bulletproof plan in place? Replace ‘plan’ with ‘guess’ and take it easy.” Scheduling theory bears this out.
Daryl Ducharme
don't let perfection get in the way of starting with a pretty good idea
27%
Flag icon
in a memory-management context, but computer scientists now use the term “thrashing” to refer to pretty much any situation where the system grinds to a halt because it’s entirely preoccupied with metawork.
Daryl Ducharme
What's the ratio of useful work to meta work
28%
Flag icon
if the minimum slice is longer than the time it takes to context-switch, then the system can never get into a state where context switching is the only thing it’s doing. It’s also a principle that is easy to translate into a recommendation for human lives. Methods such as “timeboxing” or “pomodoros,” where you literally set a kitchen timer and commit to doing a single task until it runs out, are one embodiment of this idea.
Daryl Ducharme
give yourself reasonable amounts of time on any one task when you need to multitask
28%
Flag icon
Decide how responsive you need to be—and then, if you want to get things done, be no more responsive than that.
Daryl Ducharme
the boundaries needed to multitask
34%
Flag icon
overfitting poses a danger any time we’re dealing with noise or mismeasurement—and we almost always are. There can be errors in how the data were collected, or in how they were reported. Sometimes the phenomena being investigated, such as human happiness, are hard to even define, let alone measure.
Daryl Ducharme
trying to calculate and predict on too many factors will focus more if data is noisy and there is always some noise
36%
Flag icon
The story of the Nobel Prize winner and his investment strategy could be presented as an example of human irrationality: faced with the complexity of real life, he abandoned the rational model and followed a simple heuristic. But it’s precisely because of the complexity of real life that a simple heuristic might in fact be the rational solution.
Daryl Ducharme
heuristics are out way of simplifying how we assess things on the real world with all the nuances that are available to measure
37%
Flag icon
Giving yourself more time to decide about something does not necessarily mean that you’ll make a better decision. But it does guarantee that you’ll end up considering more factors, more hypotheticals, more pros and cons, and thus risk overfitting.
39%
Flag icon
When an optimization problem’s constraints say “Do it, or else!,” Lagrangian Relaxation replies, “Or else what?” Once we can color outside the lines—even just a little bit, and even at a steep cost—problems become tractable that weren’t tractable before.
Daryl Ducharme
it is helpful to think of impossible things as just extremely hard, so that you can think about more useful solutions.
40%
Flag icon
There are many ways to relax a problem, and we’ve seen three of the most important. The first, Constraint Relaxation, simply removes some constraints altogether and makes progress on a looser form of the problem before coming back to reality. The second, Continuous Relaxation, turns discrete or binary choices into continua: when deciding between iced tea and lemonade, first imagine a 50–50 “Arnold Palmer” blend and then round it up or down. The third, Lagrangian Relaxation, turns impossibilities into mere penalties, teaching the art of bending the rules (or breaking them and accepting the ...more
40%
Flag icon
even when you don’t commit the infraction, simply imagining it can be illuminating.
Daryl Ducharme
with lagrangien relaxation, you might still decide not to take the penalty and get a better result.
40%
Flag icon
There is a deep message in the fact that on certain problems, randomized approaches can outperform even the best deterministic ones. Sometimes the best solution to a problem is to turn to chance rather than trying to fully reason out an answer.
Daryl Ducharme
this is a good message for users of generative AI and setting temperature
41%
Flag icon
Exactly calculating the chances of some particular outcome of that process, with many, many particles interacting, is hard to the point of impossibility. But simulating it, with each interaction being like turning over a new card, provides an alternative.
Daryl Ducharme
think of investing the problem. see the probability you end up with in a sample to calculate a close enough probability.
42%
Flag icon
Though you may have never heard of the Miller-Rabin test, your laptop, tablet, and phone know it well.
Daryl Ducharme
look at this test for primality
42%
Flag icon
The polynomial identity test shows that sometimes our effort is better spent checking random values—sampling from the two expressions we want to know about—than trying to untangle their inner workings.
42%
Flag icon
A close examination of random samples can be one of the most effective means of making sense of something too complex to be comprehended directly.
Daryl Ducharme
getting a close approximation is better than never getting an answer.
43%
Flag icon
a Bloom filter works much like the Rabin-Miller primality test: the URL is entered into a set of equations that essentially check for “witnesses” to its novelty. (Rather than proclaim “n is not prime,” these equations say “I have not seen n before.”) If you’re willing to tolerate an error rate of just 1% or 2%, storing your findings in a probabilistic data structure like a Bloom filter will save you significant amounts of both time and space.
Daryl Ducharme
read up on book filters to see how they work
44%
Flag icon
To this day, simulated annealing remains one of the most promising approaches to optimization problems known to the field.
Daryl Ducharme
start from hot (very random) then slowly & smoothly cool things down (less random)
45%
Flag icon
Brian Eno and artist Peter Schmidt created a deck of cards known as Oblique Strategies for solving creative problems. Pick a card, any card, and you will get a random new perspective on your project. (And if that sounds like too much work, you can now download an app that will pick a card for you.)
« Prev 1