Monday, August 3, 2009

Cognitive biases and programming languages: some speculative musings

True story: In college, our professor asked our 20-person class what language they thought was better: C++ or Scheme. To this vague question, 19 of us voted for C++; one indignant holdout student (and the professor) said Scheme.

The professor then asked us which of the two languages we had learned first. The same nineteen of us said C++; the same one holdout student had, oddly, learned Scheme some years ago before ever touching an imperative language.

The holdout seized on an explanation for why the rest of the class had the wrong opinion and declaimed without a hint of irony: "You all learned C++ first, that means you're all biased!"

Rational considerations

As a software developer, I often have to choose what programming language to use to implement a new software project. Many rational factors can be weighed; here is an incomplete list:
  • What languages are current and potential project members most proficient in?
  • Is the language a good match for the project's domain?
  • How much does the given language enhance productivity?
  • Is the language well-supported on the target platform?
  • What libraries are available to integrate with in the various languages?
Irrational considerations

Unfortunately, it is all too easy to succumb to irrationality. While I unfortunately have only anecdotal evidence, I believe that we tend to over-rate languages we have learned proficiently, and under-rate languages we are less proficient in. Furthermore, I believe that this holds true even when the pattern of languages we've learned is accidental: while we may learn a language because we over-rate the language, it's also true that we over-rate a language because we've learned it. To further extend my unscientific speculation, here are some possible reasons why we might over-rate our own languages:

* Illusory Superiority. If you're good at basketball but bad at soccer, you will find your brain generating reasons why basketball is more important than soccer, even though we rational people know the reverse to be true.

* Rationalization. If you choose to learn a programming language, you will want to rationalize afterwards that your choice was correct, even if in reality you had far too little information at the time to make an informed decision. If you decline to pick up proficiency in a specific different programming language, you will want to rationalize that you declined because the programming language is inferior, rather than that you were too lazy to explore the new language.

* Ingroup bias. The existence of Internet flamewars shows that we can root for programming languages the same way we root for sports teams.

In evolutionary-psychology terms, the first two are products of evolutionary pressures to project an aura of competence; the third is a product of evolutionary pressures to signal loyalty to your ingroup.

Sunday, June 22, 2008

Reviews of books that changed the reviewer's mind

A nonfiction book reviewer will generally review a book on two aspects:

1. How many interesting, new, useful, and accurate ideas are presented in the book?

2. Is the book's thesis accurate and righteous? In other words, does the book fit in well with the reviewer's pre-reading worldview?

My goal is generally not to replace my own prejudices and worldview with the prejudices and worldview of the reviewer, so I would like to seek out books that meet criterion #1. If i had a thousand concurrent additional lifetimes right now, I think Rolf #428 would write up a list of book reviews where the reviewer claimed that the book substantively changed his mind about a topic, to the extent that the reviewer reversed a previously-endorsed opinion. This would produce a list of books that are more likely to meet criterion #1: the books would be more likely to have been recommended by the reviewer because the content of the book was compelling, rather than because the book affirmed pre-existing beliefs.

One caveat would be that an intensification of a previously-held belief would not count. For example, a reviewer saying "I believed before that Bush was a mediocre president, but now i realize he's the worst man who ever lived!" would not count as a reversal. In addition, a shift from an unpopular belief to a popular belief would not weigh as heavily as a shift from a popular to an unpopular belief.

Sunday, June 8, 2008

The reluctance to give probabilities (II)

The last of the three theories I gave in the last post, ties into a notion I have of what we mean by "admissible" vs. "inadmissible" evidence when evaluating what the "true" probability is of an event. There is nothing in the external objective world that corresponds to directly to what we term "admissibility"; the question of admissibility seems to be a part of our evolved social judgment kit.

I think reluctance to commit is a (possibly evolved) mechanism targeted specifically to combat other peoples' Hindsight Bias. It fills in a predictive gap in the other theories, the fact that your "weight" on the coin toss, is, in a sense, 0: once the coin is tossed, you have no reason to doubt someone who tells you it came up heads! And yet, people feel no hesitation about assigning it a .5 probability, even after the coin-flip has already been made, because they know nobody will doubt their competence for doing so.

Here are some different ways that predictions can be framed.

1. I have no idea who will win. (Extremely tentative)

2. I give a 50% chance the wrestler will win. (Less tentative)

Similarly, if the only thing you know is that wrestlers train on a wider variety of maneuvers than boxers, and therefore you gave a slight edge to the wrestler:

1. It seems a little bit more likely the wrestler will win. (Extremely tentative)

2. I give a 60% chance the wrestler will win. (Less tentative)

3. I give a 60.020001% chance the wrestler will win. (Not at all tentative)

(2) is more tentative than (3), maybe because of the norms of parsimony in conversation. It's not clear why (2) is much more tentative than the (1); the norm that you only give a numeric percentage when you're willing to stand behind your estimate,

Note that newspapers rarely give probabilities of events, aside from weather forecasts that can be "justified" by pointing to a large ensemble of past data and uncontroversial analysis.

Sunday, May 4, 2008

The reluctance to give probabilities

Coin Scenario: I am about to flip a fair coin. What is the probability it will come up Heads?

Ignorant Fight Scenario: The World's Greatest Boxer fights the World's Greatest Wrestler. Will the wrestler win? (Assume you have no reasonable methodology, other than the Principal of Insufficient Reason, for deciding who to bet on.)

Howard Raiffa argued that in both cases, you should assign a subjective probability of 0.5. However, most people are more comfortable assigning a probability in the Coin Scenario. In the Ignorant Fight Scenario, most people would rather leave it unspecified, or give a "probability of probabilities." Why? Here are some (overlapping) possible reasons.

1. Weight of Evidence: When you look at the larger model that probability assessments come from, you can sometimes attach different weights to various probability assessments. The significance of the weights is that if you find that two different probability estimates conflict, then the estimate with more weight should shift less than the estimate with less weight. Leaving a "blank space" in your probability estimate might be a reasonable way for an agent with limited memory storage to remember that the weight is close to zero. (This paper's explanation is probably isomorphic to this theory.)

2. Ease of Gaining Additional Evidence: You leave a "blank space" for now if you don't see a use for an initial estimate, but believe it would be easy to gain a more refined estimate later, "if needed." The human equivalent of "lazy evaluation."

3. Avoiding Looking Foolish: The more certain you sound about the "validity" of your estimate, the more foolish you will look when (not if) others, in hindsight, decide after the bout that there was evidence that you should have considered, but failed to, when making your probability assessment. This is the explanation that I lean toward.

Saturday, April 19, 2008

A skeptical view of the 40-hour work week

Many people hold the view that "crunch mode doesn't work"; one extreme viewpoint, endorsed by Extreme Programming, is that working more than forty hours per week doesn't result in increases in total productivity for each week. I will call this the "Productivity Laffer Curve" viewpoint.

The "Productivity Laffer Curve" hypothesis is odd, because "work" is a vague term. It's like being told that eating green things reduces your risk of cancer. What sort of green things? Vegetables? Mold? Green M&M's? The analogy here is that, just as there's no reasonable causal mechanism how greenness can directly prevent cancer, there's no reasonable causal mechanism for how the fact that someone labeled a task as “work”, can directly reduce your ability to do that task. If people who work more than 40 hours lose effectiveness, then there must be some causal factor involved, such as physical fatigue, mental fatigue, or loss of motivation; and it may be better to determine what those factors are, and address those factors directly, rather than artificially curtail your work week.

One reason for skepticism about the “Productivity Laffer Curve” is that companies don't always push 40-hour work weeks,
even though having a 40-hour work week creates a benefit for the company (it makes it easier to recruit and retain workers) beyond the benefits of greater productivity. Therefore, any company with a 40-hour work week would have an enormous advantage over other companies: the 40-hour work-week company would have a recruiting and retaining advantage, *without* having to sacrifice even a little bit of productivity. However, I don't think we see this in practice.

Sunday, April 6, 2008

The World's Simplest* Intelligence Test

Computers can beat humans at Chess and can multiply numbers faster. Humans can beat computers at Go and can pass the Turing Test. Who's "really" smarter? Not that it matters, but one way to answer this unimportant trivia question is to run The World's Simplest* Intelligence Test.

* in the interest of fairness, the word "simplest" is not defined as what a human would intuitively judge "simplest," nor what Microsoft Windows would judge "simplest". Instead, we will use the more objective standard of Kolmogorov Complexity.

The steps for the test would be:

1. Natural Selection will evolve human beings, who will design computers. (This step has already been done, which is fortunate as doing it ourselves is beyond the current budget for FY 2008.)

2. A Human team (consisting of both noble humans and loyal computers) will choose and prep a human champion, and a Computer team (consisting of both traitorous humans and ungrateful computers) will choose and prep a computer champion.

3. Pick a simple Turing Machine, that supports prefix-free programs. If this is deemed "pejorative" against the Human team, a Turing Animal (for example, a rabbit somehow trained to follow a trail of carrots in a Turing-equivalent manner) may be substituted.

4. Pick a Contest duration, t, a number of tests, n, and an extremely large Evaluation Step Count, s.

5. A Judge will generate n random prefix-free programs similar to those used in defining the halting probability. For each such program, each champion will have time t to determine whether the program would halt within s steps.

6. If the champions produce different answers, the Judge then determines, using brute force if necessary, who was correct.

It seems fairly obvious that the Computer team would win any such contest.

Wednesday, March 26, 2008

Measuring AGI intelligence

There are many possible ways to judge the intelligence of a potential AGI. However, there are two criteria for intelligence that matter the most.

1. Is the AGI intelligent enough to destroy humanity in the pursuit of its goals?

2. Is the AGI intelligent enough to be able to steer the future into a region where no AGI will ever arise that would destroy humanity?

If an Unfriendly AGI reaches the level of intelligence described in (1) before a Friendly AGI reaches the level of intelligence described in (2), mankind perishes.

To paraphrase Glengarry Glen Ross: First prize in the race between FAI and UFAI is universal utopia. Second prize is, everyone dies. (No gift certificate, not even a lousy copy of our home game.)