Book - Algorithms to Live By

book

Algorithms are not followed only by computers. When we cook from a recipe, we’re following an algorithm. When we drive a car, we’re following an algorithm. “Algorithms to Live By”, a book written by Brian Christian and Tom Griffiths, looks at popular algorithms and applies them to solve our “human” problems. Here are my key insights from the book.

Optimal stopping

What is common with looking for an employee, hunting for an apartment, riding around a block looking for an empty parking slot? In each problem, there are two ways you can fail: stopping too early and stopping too late. And mathematics has a theory, which makes it possible to calculate an optimal stopping at the best time. There is a theory called optimal stopping, or the 1 / e ~ 36.7 % stopping rule.

Lesson for humans

Use 37% of the dedicated time to calibrate your requirements, find out what market offers, what options do you have and what do you want. Then once you calibrate your wishes well enough, start the search, and be ready to choose the first best option.

Efficient scheduling

Efficient scheduling covers many problems, and it’s one of the most discussed topics in project management. How to do more in a given period? In computers world every program, every process wants to get more memory and more processor time. Thus computers use efficient scheduling algorithms, which we can apply in our daily lives.

Lesson for humans

When putting your plan, consider those four aspects:

  • Earliest due date - Decide on what you should focus now based on all due dates.
  • Shortest processing time - Order tasks in such way that you can tackle small problems first.
  • Thrashing - Don’t be occupied by meta-work of switching the contexts instead of doing the work.
  • Throughput and response - Increased throughput decreases responsiveness. Choose your strategy accordingly.

Explore vs. Exploit

To do or not to do, that is the question. Or in the context of this book - should I try new things or stick with our favorite ones? In computer science, the balance between exploration and exploitation is known the “multi-armed bandit problem.” According to the authors, life can be described as a multi-armed bandit problem with varying payouts, what means we should not stop exploring.

Lesson for humans

Always keep exploring to minimize your chances of regret in life.

Sorting

To understand sorting, one must realize algorithm complexities (Big O notation). Sorting may be a time-consuming operation, but what if there is no need to clean up the mess.

Lesson for humans

“Sometimes mess is more than just the easy choice. It’s the optimal choice.” - Algorithms to Live By

Caching

Caching is the foundation of today’s computers and storages. Hard disks, processors, operating systems, even browsers - there are plenty of temporary and intermediate storages just to show the output faster.

“There are only two hard things in Computer Science: cache invalidation and naming things.” - Phil Karlton

One of the most popular strategies used for caching is Least Recently Used (LRU). LRU keeps frequently used things close, and usually a much better principle than FIFO.

Lesson for humans

“The key to a good human memory then becomes the same as the key to a good computer cache: predicting which items are most likely to be wanted in the future.” - Algorithms to Live By

Overfitting

Every decision is a kind of prediction: what are the best holidays destinations, what investment will make me rich, where is a particular trend heading. Including more factors in a model will always, by definition, make it a better fit for the data we have already. But a better fit for the available data does not necessarily mean a better prediction.

“It’s possible to overfit one’s own preparation. In one particularly dramatic case, an officer instinctively grabbed the gun out of the hands of an assailant and then instinctively handed it right back— just as he had done time and time again with his trainers in practice.” - Algorithms to Live By

Lesson for humans

Overtraining is as useless as not training at all.


Overall, the authors did a creative job of applying computer algorithms to “human” problems. Some of the examples are too bold to be true, but there are plenty of great and unexpected insights. If you want to improve your daily life methodically, you may apply game theory, networking patterns, randomness, or the approaches I described above.

Links:

Algorithms to Live By: The Computer Science of Human Decisions


I'm Valdas Maksimavicius. I write about data, cloud technologies and personal development. You can find more about me here.