Recognizing your Assumptions

Computers can help

There is this feeling you have when you work with a computer. You ask it to do something. Something simple. Something where you know exactly what the output should be. And you go ahead and tell the computer to do that thing. And the output is wrong. Not just a little wrong, but if this was a person you would seriously question their ability to do basic things like brush their teeth or go to the grocery store. But because it is a computer, you have to assume it is not the computer that made a mistake, but you.

My favorite way to share about this feeling is this youtube video on “The Exact Instructions Challenge.” I was a teaching assistant for a programming class in college where the instructor brought in a loaf of bread, PB&J, and a knife. She had the students try to guide her in making a sandwich. She was a little more compassionate than the youtuber with his kids. But in just a couple minutes of trying to instruct someone who is trying to misinterpret you, it becomes clear that creating clear instructions is hard.

Most people run into these communication gaps daily. It can be frustrating to try to come to a mutual understanding with someone you seem to have nothing in common with. Diverse perspectives are great, but it also means the team is more likely to have conflicts coming out of those unique points of view. If you are lucky, you recognize that you have a different assumption than someone else, and then you can talk about that root conflict.

Programmers and people who work as modelers deal with these issues almost constantly. When you work with a computer, you know it is trying as hard as it can to do exactly what you told it to. You also have the option to try again when you see it did not understand. But that does not really solve the fact that it is hard to be clear enough that an entity with no context actually understands you. It will make a lot of mistakes.

In each of the above examples, we have friction. Philosophically I believe it is the responsibility of the communicator to try a different explanation. In the example of people trying to work with a computer, you really have no alternative than to try a new angle. Still, it certainly helps when you have the possibility that the entity you are working with can meet you in the middle.  

Towards that end, working with a computer can help you learn how to communicate more clearly. Computers are more forgiving than someone who is (seemingly) intentionally misunderstanding you. You also can take as many tries as you like without the computer getting frustrated or giving up. If you can convince a computer, you at least have a very clear description of what you are trying to get at.

To illustrate, let's go through an example. In my last post I dove straight into the “Diet problem.” But taking a step back, suppose we want to ask a computer to tell us what food to eat in a day. What do we care about that we should tell the computer?

You could start by giving the computer a list of food options and say “what food do you pick computer?” And the computer… will do nothing. It needs a goal or there is no reason for it to do anything at all. If you tell it your goal is to minimize costs given some food you could eat, it tells you to eat nothing because that is the cheapest option. If you change your mind and ask it to maximize tastiness, it will tell you to eat an infinite amount of something from your list of foods (interestingly, when we are talking about infinities, it won’t even bother to tell you to eat the tastiest thing).

Maybe you are starting to see the problem: if you ask the computer to feed you things according to one rule you will eat nothing or everything. And so, we need to ask it to either balance multiple things or introduce constraints. Constraints say there are requirements in the situation that we have to follow that keeps us in the real world. I like to point out that physical laws, societal laws, and business rules are all good candidate constraints. Without constraints, computers love infinity. They are a bit like children in that way (can we have ice cream for every meal?).

Communicating a problem to a computer means you need to define your goals, limitations, and really anything you want to consider. If you want to clearly explain a problem to a human, the experience of explaining it to a computer helps you know all of the assumptions that went into your logic. In both cases, you get a deeper understanding of the thing you are trying to communicate when you get feedback on your attempts.

Towards that end, I built an Excel version of the diet problem, using most of the same data as is in the NEOS link from last week. You can change more of the inputs than NEOS allows, and I added the ability to set your goal based on cost, calories, or tastiness. You can also set a maximum cost, or change anything you would like (you may have to fix some things if you do more than update values in cells. Email me if you run into trouble). To actually use this file, you can go to the google drive folder, but then you have to download it and use excel to actually change / run the optimization.

A few suggestions of what to try: If you make the maximum servings really big (e.g., 1000) you can see that when you maximize cost (take the upper bound off on cost in Y13) it thinks you should eat a lot of red peppers. Maximizing tastiness with my son’s taste preferences encourages you to eat a lot of grapes.

Please play around! And if you want me to add features, or you have any questions, shoot me a message. You will have to turn on the Excel solver add-in (this is included in Excel, screenshots below for how to turn it on, and then get to it).

Click “Developer” in the ribbon, then “Excel Add-ins,” then check the Solver Add-in.

On the “Data” tab after solver is turned on, you will have it available on the right

Reply

or to participate.