A fascinating exploration of how insights from computer algorithms can be applied to our everyday lives, helping to solve common decision-making problems and illuminate the workings of the human mind
All our lives are constrained by limited space and time, limits that give rise to a particular set of problems. What should we do, or leave undone, in a day or a lifetime? How much messiness should we accept? What balance of new activities and familiar favorites is the most fulfilling? These may seem like uniquely human quandaries, but they are not: computers, too, face the same constraints, so computer scientists have been grappling with their version of such issues for decades. And the solutions they've found have much to teach us.
In a dazzlingly interdisciplinary work, acclaimed author Brian Christian and cognitive scientist Tom Griffiths show how the algorithms used by computers can also untangle very human questions. They explain how to have better hunches and when to leave things to chance, how to deal with overwhelming choices and how best to connect with others. From finding a spouse to finding a parking spot, from organizing one's inbox to understanding the workings of memory, Algorithms to Live By transforms the wisdom of computer science into strategies for human living. Algorithms to Live by: The Computer Science of Human Decisions
Brian Christian Ê 6 READ & DOWNLOAD
In this book the authors explain famous algorithms in real world context.
My notes from this book -
(1) Optimal Stopping
(2) Old people don't lose memory - they have so much of it that it slows their system.
(3) Procrastination can be seen as an efficient scheduling problem with wrong priority.
(4) Predictive Models - Gaussian, Power Law, Erlang
(5) Over-fitting - It really is true that a company will build whatever the CEO decides to measure.
(6) Penalize complexity - Occam's Razor Principle
(7) A bit of conservative, a certain bias in favor of history, can buffer us against the boom and bust cycle of fads
(8)Over-fitting Examples - Military Training, taste buds
(9) Early Stopping - Appropriate for Uncertainty
(10) The prefect is the enemy of the good.
(11) Continuous Relaxation for discrete optimization.
(12) Lagrangian Relaxation - You don't HAVE to obey the law. There are consequences to everything and you get to decide whether you want to face those.
(13) Random Sampling - Miller Rabin Primality Test
(14) Charity - GiveDirectly uses random samples of review
(15) Bloom filters for search engine crawls.
(16) Simulated Annealing - Random restart hill climbing.
(17) Randomness - heart of creativity?
(18) Networking - Circuit Switching -> Packet Switching
(19) Exponential backoff
(20) AIMD - Additive Increase Multiplicative Decrease, TCP's Sawtooth
(21) Game Theory - Price of Anarchy. Selfish routing only has 4/3 as it's price of Anarchy that's how internet is working fine (infact 33% close to optimal).
(22) Price of Anarchy is very high in case of Prisoner's Dilemma.
(23) Tragedy of Commons - Pollution, Climate Change, Number of Vacations employees use etc.,
(24) Game Theory - Information Cascade.
(25) Vickrey Auction
I recommend this book to all! Nonfiction, Science, Philosophy Excelente mistura de matemática, estatística, computação e problemas do dia-a-dia. Um daqueles livros raros que te ensina coisas novas, novas perspectivas e ainda dá dicas úteis. Uma ótima surpresa. Esperava mais sobre mente e bioquímica mas não fez falta nenhuma. Nonfiction, Science, Philosophy An engaging conceptual tour of computational/networking concepts, how they apply in the computer world, and how we can use them to reframe, streamline, and manage a diverse array of real-life problems, both silly and serious. As a reader who knows little about computer science - but loves learning new frameworks, drawing analogies between disparate fields, and finding metaphors for life everywhere - I thoroughly enjoyed this.
Some of my favorite principles/concepts:
* 37% rule of optimal stopping (when to stop scouting prospects and just commit);
* explore/exploit tradeoff (chance of finding a new gem vs. certainty of enjoying a known fave);
* LRU (last recently used) sorting as an efficient prophylactic for searching;
* layered caches as metaphor for human memory (brain fart as cache miss);
* overfitting (when interpreting data: prefer simple accuracy to complex precision);
* constraint relaxation as a technique to address knotty problems;
* buffer-bloat (when backlog is bad, best to reject all incoming requests until it clears);
* exponential back-off (when head-butts recur, double your wait time before trying again);
* computational kindness (by reducing the options on the table, we do people's brains a favor). Nonfiction, Science, Philosophy I really enjoyed this book. It's a nice popular review of research, in a style similar to Malcolm Gladwell. It was fascinating to see the wide-reaching applications of classic algorithms from computer science and also humbling to see how many problems are essentially impossible to truly optimize. However, as luck would have it, there are often simple approximations that give a pretty good solution with very little effort. The authors do a good job giving interesting backstory on the algorithms and relating them in ways that are hopefully accessible to readers who aren't familiar with computer science.
My favorite chapters were the ones that were the most strongly anchored in the mundane, especially Optimal Stopping (parking space/househunting), Explore/Exploit (should I try a new restaurant or go to my old favorite?) and Scheduling (what to do with your to-do list). Some of the others, such as Networking and Overfitting were more theoretical and less memorable, but still had nice historical vignettes of the people behind famous names like Bayes.
If you have a technical/analytical inclination and have ever wondered what the ideal way to solve an everyday problem, I think you'll find a lot to like in this book. Nonfiction, Science, Philosophy A simple algorithm to conceive of literary plots could be to slot them as belonging to one of these categories: Man vs. Nature, Man vs. Self, Man vs. Man & Man vs. Society.
Brian & Tom enlists findings from computer science to guide us through these. Algorithms here are the shortcuts or even the intuitions that guide us through problems that are intractable at first glance. We, apparently, use them everyday. Brian & Tom are here to document this and to show how exactly we can make them more efficient, by exploring the idea of human algorithm design—searching for better solutions to the challenges people encounter every day. The central thesis is that it’s best to use shortcuts to improve your probability of success and remember that “perfection is the enemy of the good.” The book’s algorithms are intended to reduce time spent puzzling, conserve energy for the things that matter.
When it comes to the first two categories, computer science is shown to be a good guide to problems created by the fundamental structure of the world, and by our limited capacities for processing information. As with all the sciences before it, computer science and data science are pretty effective in dealing with these issues. And the computational approach seems to be a remarkably useful improvement in dealing with areas like self-control or complex everyday decisions.
In this part of the book, when we deal with Man vs. Nature & Man vs. Self, we mostly encounter well-defined problems and potential algorithms to deal with them.
We have a nice variety of approaches here:
First, we are given a taste of the “Optimal stopping problems” which spring from the irreversibility and irrevocability of time - How do you decide when to stop searching, be it for a the perfect mate, the perfect employee, the perfect job or the perfect weekend movie? The answer seems to be simple: 37% - you stop once 37% of your options have been checked out. Much more useful than it sounds, this number is the output of an algorithm. Whether it’s an apartment, a parking space, or a spouse, the right moment to stop searching and start choosing falls under the umbrella of problems called “optimal stopping.” The general solution to optimal stopping problems reveals that you should spend 37 percent of your time gaining an impression of what’s out there and the rest of the time selecting anything better than the average of what you observed thus far. Need to rent an apartment in three weeks? Simply take one week to observe and two weeks to pounce on the next best thing. This means that you have a good sample of the options you have so you don’t jump to early decision and miss out on the good choices that were just around the corner, and at the same time, you don’t waste all your time only searching!
Then we are introduced to “the explore/exploit dilemma”, springing from time’s limited supply - should we revisit favourite restaurants and places and ensure a good time (exploit) or should we explore bravely out to new experiences and places (explore) in the hope that we might stumble on something incredible? If we don’t explore, we might miss out on a lot of YOLO stuff , but if we only explore and do not exploit the good stuff we have already discovered (a favourite dish, a cared-for home, spouse, close friends, etc.) then we might me missing out on even more. SO how do we figure out an optimal ration between Explore/Exploit? Turns out computer scientists have been working on finding this balance for more than fifty years. They even have a name for it: the explore/exploit tradeoff. The explore/exploit tradeoff tells us how to find the balance between trying new things and enjoying our favourites. The answer is to think about the time you have left - the more time you have the more your strategy should shift. So the young should explore more and the elderly should exploit more and wherever you are in that continuum, you should ration the Es accordingly. YOLO, after all.
There are more: Relaxation and randomization emerge as vital and necessary strategies for dealing with the ineluctable complexity of challenges like trip planning and vaccinations, Sorting theory tells us how (and whether) to arrange our offices, Caching theory tells us how to fill our closets, Scheduling theory tells us how to fill the unforgiving minute well, etc.
Then comes the next two categories: Man vs. Man and Man vs. Society problems - these are, in effect, the problems that we pose and cause each other. Here the authors move away from computer science and enlists mathematics as well, specifically and predictably, game theory, to help us out. And the cross-pollination between game theory and computer science gives us algorithmic game theory for tackling issues like investing, bubble and even plain arguments. The solutions are much less rigorous here, with 1) the advice to “change the game” if the game threatens to go into less than optimal equilibriums and 2) an exhortation to be “computationally kind” to reduce the cognitive load of the participants, emerging as the main “algorithms to live by” when it comes to living in society.
So as always, the book would seem to be teaching us again that no matter how computationally adept we are, dealing with each other is something that just can’t be fitted into any algorithm, formula or thumb-rule. We gotta wing it. Nonfiction, Science, Philosophy
This is one of those books that you pick up in the hope that it lives up to its title but is likely not to because it was written by someone from marketing. Every now and then it pays off, and this is one of those times.
This book spoke volumes to me. I have studied math, and I love math especially applying it to scientific problems. But I have never looked into algorithms, nor have I been taught algorithms. What a shame! I took to the ideas instantly and it all made complete sense - not only the algorithms, but the living by them. I guess it all ties into how our brains work and how Turing likened computers to our brains. It all makes sense because our brains are computers that work by algorithms. Messy algorithms that clash and battle against each other, but predictable in some ways.
So embracing how algorithms work and some of the solutions they suggest and applying them to your everyday life may seem like a stretch, but you're already doing it, you just don't realise it. And you may not be solving your problems in the most effective manner, but the authors explore the reasons for that too.
So if you view reality like I do, pick this book up. It has more revelations in it than any holy text. It gives me frameworks to work on problems that I already think about. It helped me make even more sense of this crazy place.
As soon as I finished the audiobook I started right back at the beginning again. The narrator is one of the authors and he does a brilliant job. I'm going to get a physical copy of this too when it is out in paperback. It's a keeper. It's a treasure. So much bliss! Nonfiction, Science, Philosophy Even though I'm a computer programmer, I have to say when I saw the title I was a bit put off. Algorithms are what I use for telling a computer what to do, but I'm not sure I feel comfortable with using them to tell myself what to do. Real life is less tidy and binary than the data in a computer.
But, perhaps out of train-wreck curiousity, I picked it up and took a look. The first thing I noticed is that Alison Gopnik gave it a dust jacket endorsement. Ok, you have my full attention now.
Once I started reading, I understood a bit better what the authors were getting at. A lot of what ought to be called philosophy, is nowadays most often carefully looked at by computer scientists. Questions like:
1) how do you balance finding new, vs. getting satisfaction from what you already know is good enough? Should I eat at my favourite restaurant, or give a new one a try? Should I move to a new city or stay where I know where the best bookstore/coffeeshop/bar/restaurants are? Should I try out a new career or employer, or stay with the job I've got?
2) how do you balance keeping things orderly, and keeping them handy?
3) how do I balance the risk of missing out on some important news, vs. the problem of spending my life endlessly checking email and texts?
4) how do I balance the risk of not thinking deeply enough about something, vs. the risk of overthinking something that is actually simple?
We have spent over half a century looking at these questions in detail, in order to make computer programs work more efficiently when they sort, analyse, or store and retrieve data. Our lives are rarely so tidy and binary as a computer's data, but all of these questions are highly relevant to questions we face in our own messy, analogue lives.
This isn't, I think, a reason to decide that you should spend 37% of your expected adult lives dating, and then propose to the next person you date who is better than anyone you've dated so far (as one information theory algorithm might suggest). But, there are a lot of situations in life where we have to choose between deciding how picky to be vs. it's time to make our pick. For example, the amount of time to look for a house, or a parking spot, or a new job, are places where I think it's ok to use a bit of algorithmic logic instead of just going with your gut impulse (which is a lot easier for people to sway with savvy salesmanship).
For me, though, more likely than that I will actually use the quicksort algorithm for my socks (see chapter 3) is that I will think more clearly about the issues involved when I do have a large sorting project to do. Just reading about the tradeoffs involved, helps to think more clearly about them. In sorting, what are the chances you are ever going to need to search through the stuff you're sorting anyway? If there's a good chance you won't, just do a rough bucket sort and call it done. In searching, are you needing the best chance of getting the absolute best, or the best chance of getting something above average? If you pass on an opportunity and then go back, what is the chance that opportunity will still be there (in the crowded parking lot, not much; in job search, depends on the labour market).
The fun thing about this kind of book, is that it is not about any particular topic per se, it is about all topics and none. It is a book for thinking about thinking, and thinking about better ways to think. It is fun in the same way that solving puzzles or playing games is fun; it's not that the puzzle or game is important in itself, it's that it's fun to feel your brain working effectively on a hard task (which is why the puzzle or game can't be too easy, or it won't be fun). Reading this book is an opportunity to think well about a lot of topics from your everyday life, and who knows, it may make you think slightly better about them after you're done. I probably won't really live by these algorithms, but it is more fun to live with them (i.e. having them available when I feel like it), and this book is a pain-free and enjoyable way to get introduced. Nonfiction, Science, Philosophy Okay, I loved this book. So what is it about?
The big picture
We encounter many problems in our daily life, for instance, should I park my car here or proceed with the hope of finding a free spot a bit further? Should I try new restaurants or just stick to good old ones I know? How can I find my life's purpose? What is the fastest way I can sort out my books, hmmm, should I even try sorting out my shelves? How can I best schedule my tasks for maximum productivity and many more routine problems like these.
These problems have a mathematical and computer science basis to which the scientific community has found optimum or near to optimum answers and this book teaches us how we can apply these solutions to our daily life problems. Amazing, isn't it? :D
The book itself:
Well, the idea of the book is just marvelous. In addition, the writers are profoundly knowledgeable and educated both from academic and non-academic perspectives; hence, they've woven perfectly selected anecdotes, philosophical, economical or psychological facts, literary phrases into the fabric of their stories which makes the book superb.
This book is not an easy read at all, and it's a good thing in contrast with common belief since it challenges and stretches your mind and expands your thoughts horizons. Part of this difficulty stems from the fact that authors are having a hard time simplifying mathematical and computer science facts. The material sometimes gets a bit tough to comprehend. On the other hand, It seems to me that authors are trying hard to make the text complex. :|
Final word
This book definitely is amongst the richest books I've ever consumed, lots of knowledge and insights are compiled in an applicable manner.
I would whole-hardheartedly recommend this books to all the nerds and geeks out there and everyone who enjoys improving efficiency and productivity of his/her day-to-day life. Nonfiction, Science, Philosophy I enjoy thinking about algorithms as they are applied to technical problems. So, when I saw this book, I thought, This is a book written just for me. And, that assessment was absolutely correct. It is a fascinating book, all about how sophisticated algorithms are applicable to everyday problems.
The book starts out describing the optimal stopping problem. It is also sometimes called the secretary hiring problem, and I have seen it applied to dating to find a romantic partner, and this book points out that it can also be applied to looking for an apartment in a seller's market, or searching for a parking space. It can be summed up by the phrase, Quit while you're ahead. Basically, you have a finite amount of time to complete a search for the best item or person. What do you do? It can be shown, mathematically, that you should conduct a search for 37% of your total available time, without making any decisions. Then, at the very next time you find an item or person that is better than all of the previous ones, you should jump on it! I read about this, beforehand, but I didn't realize that 37% comes from 1/e, where e is the natural exponent.
The next topic in the book is the dichotomy between explore and exploit. That is to say, when you are looking for something to do, will you try something new (explore), or repeat something that has pleased you in the past (exploit). The answer has to do with how much more time you have in this situation. Movie sequels are all about exploiting, because movie revenues are decreasing. If you are new to an area, you will explore restaurants, but if you are moving away soon, you will return to restaurants you have previously visited. I enjoyed how this issue is related to the multi-armed bandit problem. This is a mathematical problem that has lots of applications; choosing the best slot machine in a casino, for example, or designing a web site that will maximize profits for a company.
Sorting is a big topic in the book. It turns out that top poker players sort themselves out, and don't want to play with players they think are better. Libraries use an inefficient caching system, putting recent acquisitions in front. Instead, they should put the most popular books in front. The Naguchi filing system involves returning all files to the extreme left. This goes against the recommendations of efficiency experts, who recommend sorting by topic. Leaving a pile of papers on top of a desk is an example of the MOST efficient filing system! I enjoyed reading an anecdote about Barack Obama visiting Google, before he became president. At Google, he was treated to a pretend job interview. He was asked, if you had to design an algorithm to sort a million 32-bit integers, what would you do? He replied that he would not use a bubble-sort algorithm, and all the people in the audience applauded his correct answer!
I enjoyed reading about human memory from an algorithmic point of view. Memory recall is a problem of organization. It was fascinating to read that a graph of the probability of remembering something as a function of elapsed time exactly mimics the probability that a word appears in a newspaper headline twice in a row!
Knowing more makes it harder to remember things; what we call memory decline is actually just learning. A brain fart is actually just a cache miss!
Related to sorting are various problems of scheduling. Examples from the book include multiple laundry loads to minimize total washing plus drying time, and minimizing the rotting of food from a CSA (Community-Supported Agriculture).
No book on everyday applications of algorithms should bypass Bayesian reasoning, and this is an important subject in this book. Our memories of images of plane crashes and car crashes are roughly the same; as a result, we are surprised that there are orders of magnitude more deaths in car crashes, than in plane crashes.
The dangers of over-fitting are discussed at length. As an example, police and FBI agents sometimes over-train; they sometimes use good gun-training etiquette during a shoot-out, with fatal consequences. I really appreciated the discussion of how over-fitting is avoided in biological evolution. It is dangerous for organisms to evolve to over-fit an ecological niche, because the species might not be able to rapidly adapt to an uncertain future environment.
I also thought that the description of exponential backoff was very well treated in the book. This esoteric-sounding algorithm is used in all computer networks, but is also used by many of us in treating flaky friends, and in punishment for probation violations.
The last chapter in the book was about game theory. It is helpful, in reading this book, to have some previous background, an understanding of a Nash equilibrium. The following quote sums it up nicely:
Love is like organized crime. It changes the structure of the marriage game so that the equilibrium becomes the outcome that works best for everybody.
I highly recommend this book. Regardless of your mathematics background, it will intrigue you and amaze you, to see how math permeates our everyday lives. Nonfiction, Science, Philosophy I was captivated by much of this book. It's the perfect antidote to the argument you often hear from young maths students - 'What's the point? I'll never use this in real life!' This often comes up with algebra (which often is useful), but reflects the way that we rarely cover the most applicable bits of maths to everyday life at high school. Although this book is subtitled 'the computer science of human decisions', it's really about the maths of human decision making (which is often supported by computers) - I suspect the 'computer science' label is to make it more sexy than boring old mathematics.
If there is any danger that the 'M' word would turn you off, the book tends to skip over the mathematical workings, concentrating on the outcomes and how they're relevant to the kind of decisions we make in everyday life - and it's that application side that makes it particularly interesting (helped by a good, readable style from the co-authors). So, for instance, one of the earliest areas covered is the kind of decision where you are selecting between a number of options that arrive sequentially and where you have to make a decision on which is best for you part way through the sequence, even though there may be better options in the future. The classic examples for this are some kinds of job interviews, house buying and finding a partner for life.
It might seem there can be no sensible advice, but mathematically it's very clear. You wait until you've got through 37% of the choices, then pick the next one that's better than any you've seen before. It's not that this will necessarily deliver your best of all possible worlds. More often than not it won't. But it will give you a better result than any other mechanism for deciding when to go for a particular option. Of course it's not always easy to apply. For example, unless it's something like an interview with closed applications, how do you know when you are 37% of the way through the available options? Luckily, the authors point out that there are approximations to get around this, which include that the approach can also apply to the amount of time available for the process.
And that's just the start. Along the way you will discover the best way to sort the books on your shelves into alphabetic order (something I confess I did last year, using a sub-optimal mechanism), how to balance exploration (for example, trying out new restaurants) with exploitation (for example, returning to tried and tested restaurants), how the concept of caching can revolutionise your filing system (and make that pile of papers on your desk that everyone mocks the sensible approach), why Bayes theorem is so important and much more. I absolutely revelled in this book.
The content only fades a bit when the applications aren't about real world decisions. So, for instance, there's some material about how the internet works that is very interesting if you like that kind of thing (I do), but hasn't got the same feeling of personal utility to it, so lacks some of the bite of the other chapters. This is even more obvious in the section on randomness. I would also have liked to see more acknowledgement that most of the content was really from the area of study called operational (operations in the US) research, a discipline that happens to make use of computers, rather than true computer science - but that's a specialist moan.
Realistically speaking, I don't think much of the content of this book will truly change how any of us do things. Interestingly, the authors reveal than an expert in the field pretty much consciously ignored the mathematical approach in a particular case, opting for more of a 'feels right' choice. But that doesn't stop the whole business, whether it's the relative simplicity of the 37% rule or the mind twisting possibilities of game theory, from being both potentially practical and highly enjoyable as presented here. Recommended. Nonfiction, Science, Philosophy