Pirates fails to give one important clue
From the interview problem:
"assume they are very intelligent and extremely greedy (and that they would prefer not to die)."
I think you need to add the following statement to this problem:
"assume that each pirate is aware that every other pirate is very intelligent."
Admittedly, if a pirate is very intelligent, he would be able to figure out the other pirates are intelligent. But what if each pirate is so intelligent that he successfully feigns the appearance of being less intelligent?
This problem can only be solved if each pirate concludes that every other pirate is intelligent enough to arrive at the optimal conclusion.
Monday, February 7, 2005
Yes, it can be intelligent to convince someone that you are not intelligent. It brings up an interesting basis of for morality.
A reputation for keeping your word (even when it would be unintelligent to do so) may profit you and so an intelligent person knows they need a reputation for keeping their word. But, the easiest way to build a reputation for keeping your word is to keep your word.
If Pirate 2 can convince Pirate 1 to vote against the first and third proposition in return for 2 gold pieces, then Pirates 5, 4, and 3 die. But what is to protect Pirate 1 from betrayal when it comes time to pay up? If Pirate 2 grabs all 100 coins for himself, he loses his reputation for keeping his word.
So in short, if Pirate 2 can convince Pirate 1 that Pirate 2 is "stupid" enough to keep his word, and the easiest way to do that is to actually be that "stupid", Pirate 2 gets 98 coins. Is that so "stupid"?
Monday, April 4, 2005
I imagine that's the way the salary pool at Fog Creek is distributed also. Joel: "I take $980,000, my right-hand man takes $0, the third in line gets $1,000, etc."
I don't think so.
Following WanFactory's comment, here are four problems with the current pirates puzzle and amendments to fix up the original puzzle.
WanFactory points out that pirates #2 and #4 will collude with pirate #3 and offer him a better deal if he votes down pirate #5's optimal plan. This will always happen when communication is allowed. That's how voting bodies function - the majority must placate its internal minority in order to assure against jumping ship (pun!) and switching sides. See the politicking of Survivor. Or the US Senate.
Amendment 1: There is no direct communication between pirates before or during the vote. (I guess the vote itself will remain as communication because even a secret ballot would have a public outcome.)
WanFactory also points out that reputation is valuable. Given 0 of the loot, pirates #4 and #2 would not work with pirate #5 again. Neither would pirate #3 because he'd get shafted in a three pirate loot. The leader's reputation for fairness is worth some of the gold coins.
Amendment 2: This is a one-time loot with no past loyalties to honor and no future reputations to maintain. There is also no cheating; if a plan is voted for it is instantly executed (or put into escrow during the vote).
(3) Being able to leave.
If I were pirates #2 and 4, and was offerred 0, I wouldn't vote, I'd just leave. Does that mean there are only three pirates and the plan needs to be approved only by two? Then pirate #1 would change the plan to 99-0-1 in which case pirate #3 (the middle one) would leave too. In which case the plan would be for the top pirate to take all 100, but if that's the plan and all five are still voting then the plan would be rejected. And so on in circles.
Amendment 3: All pirates must vote.
(4) The value of life.
How certain is pirate #5 that pirate #1 or pirate #3 won't flip on him and kill him? Intelligent people have whims (and even kill on them). He's not merely distributing the loot, he's buying his life. Is 98 gold coins worth risking his life for? Some may say one's life is priceless. But realisticaly, it depends on how much a gold coin is worth. (If I were asked this puzzle in an interview, I'd ask all sorts of "What is the expected net present value of future earnings of pirate #5, in gold coins?" insurance questions, just to mess with the interviewer.)
Amendment 4: The voted down pirate is not killed, he is just excluded from further voting and loot-distribution.
Despite these amendments the given solution is still wrong.
Take five intelligent people, give them an ordering, sit them down, put $10,000 on the table, and see what happens. I bet it won't be 9800-0-100-0-100, even if you explain why it's 'optimal.' I guarantee pirate #3 and pirate #1 won't be satisfied with getting $100.
98-0-1-0-1? That's how the French and Russian and Iranian revolutions got started - unfair distribution of wealth. (Is pirate #3 the Third Estate?)
Seriously, if I were pirate #3, I'd vote down the 98-0-1-0-1 plan because 1 coin is not that much to lose. It would communicate to pirate #4 that he better have a more equitable plan or an intelligent pirate #2 will flip on him too. An equally distributed plan would be 20-20-20-20-20. So pirate #3 is really thinking in losses, a 98-0-1-0-1 plan would be -19 from an evenly distributed plan. Pirate #3 would feel slighted by this. And being -20 (pirate #4's 'optimal' plan) isn't significantly worse. Pirate #3 would take the risk that pirate #4 would get the message of pirate #1's eviction and offer a better plan (pirates are known for risk-taking).
Going with this logic (how is it not logical to factor in people's envy and indignation as well as their greed?), we see that pirate #2 has the most power in this set-up. He can vote in all elections and he can never be voted out.
Ultimately what pirate #5 is offering is to sell a contract on a market. The other pirates don't need to buy the contract. They can wait for a better offer, but pirate #5, the seller, can't. I bet tested in the domain (we do do user testing don't we?), pirate #5 averages less than 20 gold coins.
It's curious but with real people the word 'nice' encapsulates many of these concepts. 'Nice' is an internal function calibrating social contracts, reputations and actions. The interviewees who gave an answer according to niceness were simply using the function without consciously thinking about it; that is, it's become built into their kernel. (It may be bad to be unaware of one's actions but do you want people in your office consciously calculating the social benefits of saying "Good morning. How are you?" every day? That would suck in its own way.)
The given solution doesn't pass the sniff test; people think there's something wrong. Now the sniff test ain't foolproof; it's useless in the Monty Hall puzzle for example. But that puzzle deals with probability, about which humans have poor heuristics, and this puzzle deals with people, about which humans have excellent heuristics. People (even intellgent pirates) don't act in the way given. Those who give the stated solution - all Fog Creek programmers do so, we are told - lack relevant domain knowledge. The domain of common sense human behavior. (Or is that why programmers make poor managers?)
Saturday, April 23, 2005
One more comment. The crux of this topic is that the pirates are need to be 'intelligent'. But that's not true, they need to be something far less, they need to be *artificially* intelligent, like the rational man of pre-behavioral economics fame. If you disagree, and think ignoring the human emotions is intelligent, I've got a bridge called AI to sell you.
Saturday, April 23, 2005
Fog Creek Home