I was brainstorming solutions to a problem in a data science course.

The problem involved reading in a dataset of US hospitals and writing R functions that accepted a specific reason for admission (e.g., heart failure, heart attack, pneumonia) and a specific state (e.g., “TX”) and returned the best hospital in that state as indexed by the hospital’s mortality rate for that condition/disease/event. It wasn’t a difficult problem to solve.

After finding the solution, I wondered how I got there. I know that at some point I had no parts of the solution planned (say right around the point I was reading the actual problem), and fairly easily and quickly sketched my way to get to where I wanted. Maybe it went something like this:

I did not get there with brute force or a purely trial-and-error method. My selection of each path was informed with knowledge, and I chose to not try an infinite number of possible options based on that knowledge. In other words, there are infinite dead-end solutions (designated with the dotted bad path nodes in the graph), and the dotted lines mean that I decided they were dead-end paths not by trying them, but by conjecture.

Sometimes one will have to try a path to realize that it’s a dead end, but the number of those incidents is tiny compared to the total number of bad paths (technically nonexistent since you’re dividing by infinity). Paths like that are solid bad path nodes in the graph.

That’s how a person programmer solves the problem. How would a computer programmer get there?

I think there are two ways:

  1. Create a program that does only that job.
  2. Create an AI.

Option 2 is a problem that is not yet solved. It is not yet solved because in many ways we still do not understand how we solve those programming problems. We don’t yet understand our creativity and how, exactly, we create knowledge. Once we do, the AI programmer’s method would be similar to the person programmer’s.

Option 1 will not be as good or powerful as Option 2. Actually it would suck in comparison. But it would involve:

  1. Natural language understanding. Or at least some way of being told what the problem is.
  2. Deep internal knowledge of programming languages. Or at least knowledge of the one programming language we know we need.
  3. Ability to receive specification of what the correct answer looks like (sounds like an analog to unit testing).
  4. An ability to optimize solving by eliminating most possible paths based on the problem meta data.
  5. An optimized ability to brute force its way through all the remaining paths.

This is brainstorming for now and I don’t have more specifics in mind about any of those listed requirements. I will, though.