Thursday, January 14, 2016

Decision Making in Terms of a Search Problem

Life is a long path of decisions. Each decision leads you closer and closer to your goal - whatever that goal may be for you. Especially as a senior about to graduate from college, it looks pretty scary, and I don’t know exactly how to get to my end goal (the rainbows and sunshine and gold) at the end of the road.



When considering a person’s life decisions, let’s look at it in terms of a search problem. We can call life a tree with one start node, and many different possible end nodes. Each level represents a different time period in one’s life, with the node representing the state a person occupies at that time period (i.e. the root note is the state of “birth”). 


In this “life” tree, one cannot go backwards, although sometimes someone can go to the same node from different paths (graduate college  med school vs graduate college → gap year  med school). 

So what’s the best method for traversing this tree - especially if the optimal goal node is unknown at the beginning?

Classical search methods - uninformed search methods like breadth-first search and depth first search or informed search methods like A* with different heuristics are not possible for us. We cannot keep all paths in memory and then go back to a node in the past that might be more optimal than the one we are at currently. For example, you can’t say in senior year of Princeton, "I don’t think I like being a physics major. I want to go back to that other path I could have taken sophomore year - biology.” You would have to continue along with the choices in your current path - take extra time to switch majors and graduate, or just suck it up and graduate as physics.

No, for life, we have to perform local search - working with the states we occupy currently and the paths that lead from there. That means that in the tree diagram above, we can only transition to neighbor nodes of the node that we currently occupy at any time. 

Our state-space landscape, a visualization of states on the x-axis and the objective function on the y-axis, we can see that there is a global maximum, the highest overall point out of every possible state, and many local maxima. We can think of local maxima as a small hill where if you look around, everything in your line of sight is lower than you. Your local small hill might be shorter than Mount Everest, the world’s global maximum, but you don’t see it in your neighborhood.


The objective function can be money, or happiness, or whatever metric you choose. Doesn’t matter - it’s your life. So let’s start searching for the state that brings you the most of whatever you value.

The life tree for a lot of college students in my position looks like different career nodes leading from a single graduation node:

Now the conventional way lots of people choose to make this decision is hill-climbing search, also known as greedy local search. If your objective function is “money” or “prestige”, then it seems like it’s a logical move to go for the job, or node, that is most high-paying or prestigious at the moment then, right? This is what greedy local search does. It looks for the neighboring node with the highest objective value at each stage, and takes that path. That’s what makes students looking for the end goal of prestige grab onto the most prestigious job they can find, and then after two years, another more prestigious one, and then after two years, another title. It intuitively sounds like it makes sense to do this.

However, greedy local search has problems dealing with plateaus or local maxima. If your life plateaus - i.e. you don’t get a promotion that you expected, you stay stagnant for a long time at your job - where do you go? What do you do when there’s no higher-objective node to take next?


Greedy local search has problems with local maxima because it won’t sacrifice high prestige in order to find the absolute highest point you could reach - so it will rarely find the global maximum. This is what is going through people’s minds when they say, “I’m already 40, I could never go back to law school and become a lawyer like I always wanted. Besides, I have a high-paying job right now and I’m pretty comfortable.” Greedy local search will never take you past “feeling pretty comfortable” to “maximum possible potential”. 

Greedy local search is conservative. It, for the most part, makes sure you’re not homeless. It makes sure you have a food, shelter, a job that pays. But give you the chance to reach your dreams? For the most part, no. 

Another strategy is simulated annealing. Hill-climbing never makes downward moves, so it can get stuck in plateaus or local maxima. Simulated annealing, similarly to hill-climbing, will try to go up the objective function gradient, but for some steps, will do a random move. This is the person who has a safe job and does well at it for a few years, and then quits to go backpacking in South America to “find herself”. Sometimes it works, sometimes, not so much.

So what is the best local search strategy for life? Let’s look at an example:

Greedy local search, for someone in my situation (about to graduate college, confused about life, the usual) means taking the most prestigious or high-paying job out available, greedily. And then after that, it involves always taking the “best” step — going to consulting, going to business school, becoming a partner, retiring well. Sometimes people throw simulated annealing in there: starting a company, joining a small, promising company, traveling the world — but often that is a randomly taken path that doesn’t optimally build off of past experience.


Let’s do a case study of Elon Musk. He is someone who I, and many students in my position, see as reaching the pinnacle of money, prestige, and fulfillment.

Elon Musk. Random numbers.

His objective function was, I’m guessing, some combination of impact and prestige. He chose to go to Stanford for grad school and then immediately dropped out to form an Internet phonebook company, Zip2. This probably was not the most impactful nor prestigious job he could get. But I’m guessing he did it because the type of thinking and type of work that it involved really interested him. He truly wanted to learn about starting a business, about enterprise software engineering, etc. Indeed, the learning that he did there served him well in his future ventures.

Maybe the best local search strategy for life depends on another heuristic, or function that helps you decide on the next step to take in a search algorithm. What Elon Musk has been doing is a greedy search of knowledge and interest. Each step of the way, Elon Musk envisioned his end goal — prestige and fulfillment, particularly in areas that benefit the future of mankind — and took steps that gave him direct knowledge in that field. He wanted to learn about starting an Internet business? He started an Internet business, Zip2. He wanted to learn about disrupting an entire industry? He disrupted the banking industry with X.com/PayPal. He wanted prestige and fulfillment, but he didn’t spring for a reputable company, or a non-profit, or even a reputable non-profit.

Mapping his possible state space against his knowledge gained will produce a very very different graph than mapping state space against prestige.

Of course, not everyone has a “field” in mind when their objective function is just general prestige or money. So as Peter Thiel says in Zero to One, many college students hedge their bets by choosing a general field and then transitioning to whatever catches fire in the future (consulting to virtual reality? anyone?). This can work, but I’m postulating that people have to take long bets on what they truly want to do, as many fields become more and more specific, in order to truly reach their highest potential. Starting off with the right foundational knowledge at least puts you in the neighborhood of your global maximum.

I strongly believe people should stop greedy local searching on prestige or money, and start searching on knowledge of a specific genre — the foundational tool that will lead you through life’s downward moves on prestige, but towards the global maximum of your life potential.

*pictures, except for #2 and 3, made in Google Docs

*this article also at https://medium.com/@barbarazhan/decision-making-as-a-local-search-problem-f9e0e0c23e94?source=latest---------1

No comments:

Post a Comment