Sunday, June 28, 2009

Of Hawks and Doves

The Prisoner's Dilemma is a well known game. The basis is very simple: two prisoners are being questioned for a crime and have the choice to either COOPERATE with the other prisoner, or to DEFECT. If they both cooperate, they both get the REWARD (3 points). If they both defect, they both get the PUNISHMENT (1 point). The juicy part is if one defects, while the other cooperates. In this case the defectors gets the TEMPTATION (5 points), while the cooperator gets the SUCKER'S PAYOFF (0 points).


An actor participating in the Prisoner's Dilemma we will call an Agent:


  public abstract class Agent {
public final int TEMPTATION = 5;
public final int REWARD = 3;
public final int PUNISHMENT = 1;
public final int SUCKERS_PAYOFF = 0;

private String name;
private int score = 0;

public Agent(final String name) { this.name = name; }
public abstract boolean cooperate(final Agent other);
public String getName() { return this.name; }
public void remember(Agent other, boolean cooperates) {
// ignore
}
public int dealWith(Agent other) {
boolean iCooperate = this.cooperate(other);
boolean otherCooperates = other.cooperate(this);
int score = iCooperate == otherCooperates ?
(iCooperate ? REWARD : PUNISHMENT) :
(iCooperate ? SUCKERS_PAYOFF : TEMPTATION);
increaseScore(score);
remember(other, otherCooperates);
return score;
}
public void increaseScore(final int score) { this.score += score;}
public int getScore() { return this.score; }
public void resetScore() { this.score = 0; }
}


The first type of Agent will be the Dove. The Dove will always cooperate, hoping they will be reciprocated:


  public class Dove extends Agent {
public Dove(final String name) { super(name); }
public boolean cooperate(final Agent other) {
return true;
}
}


The second type of Agent is the Hawk. Hawks always aims for the win-lose, hoping that the other is more cooperative:


  public class Hawk extends Agent {
public Hawk(final String name) { super(name); }
public boolean cooperate(final Agent other) {
return false;
}
}


Pitch these two types of agents against each other and it will not be a surprise that the Hawk in every encounter scores the Temptation, while the Dove gets the Sucker's Payoff.


This is proven in a test setup, simulating the Arena of Evolution. In the setup the worst scoring Agent gets eliminated randomly spawning a new Agent in its place. The type of the new Agent is randomly determined and based on the number of Agents of a certain type. For example, if there are 12 Doves and 8 Hawks, the new Agent has a 60% chance of becoming a Dove and a 40% chance of becoming a Hawk.


You can let the agents interact in the following way:


  agentOne.dealWith(agentTwo);
agentTwo.dealWith(agentOne);


The Doves simply get supplanted.


It was long thought that the Hawk had the dominant strategy. But luckily for those who fear such a bleak outcome, a new type reversed the social order from a Malthusian one to a more friendly one -- enter Tit-for-Tat:


  import java.util.*;

public class TitForTat extends Agent {
private Map iKnowWhatYouDidLastTime = new TreeMap();
public TitForTat(final String name) { super(name); }
public boolean cooperate(final Agent other) {
Boolean cooperate = iKnowWhatYouDidLastTime.get(other.getName());
return cooperate == null ? true : cooperate;
}
public void remember(Agent other, boolean cooperates) {
iKnowWhatYouDidLastTime.put(other.getName(), cooperates);
}
}


Tit-for-Tat will remember what an Agent did the last time it was encountered. If it cooperated, so will Tit-for-Tat. If it defected, Tit-for-Tat will pay in kind and defect also. But it keeps a positive attitude to the social traffic by always cooperating if it does not know whom it is dealing with.


What happens now depends a lot on the number of interactions that take place and if there is a large enough population of Doves/Tit-for-Tats so that the good guys can deal positively with each other. If both preconditions are in place, the Hawks are supplanted by Tit-for-Tat. Conversely, if Tit-for-Tat is pitched in a Dove population, both will flourish.


If you are interested in this type of material, I can heartily recommend The Origins of Virtue by Matt Ridley.


On a closing note, there is a type following Tit-for-Tat, which has a bit of a mean streak (its name is "Pavlov"), trying to take advantage of Doves (ie, "suckers") while being on its guard against Tit-for-Tat. This type has quite a ball in a mixed Dove/Tit-for-Tat population.


Doves get pissed on by Pavlov, while the Hawks take a piss on everyone -- the prophetic words uttered in Team America never sounded more true:


"We're dicks! We're reckless, arrogant, stupid dicks. And the Film Actors Guild are pussies. And Kim Jong Il is an asshole. Pussies don't like dicks, because pussies get fucked by dicks. But dicks also fuck assholes: assholes that just want to shit on everything. Pussies may think they can deal with assholes their way. But the only thing that can fuck an asshole is a dick, with some balls. The problem with dicks is: they fuck too much or fuck when it isn't appropriate - and it takes a pussy to show them that. But sometimes, pussies can be so full of shit that they become assholes themselves... because pussies are an inch and half away from ass holes. I don't know much about this crazy, crazy world, but I do know this: If you don't let us fuck this asshole, we're going to have our dicks and pussies all covered in shit!"


Quod Erad Demonstratum

Monday, June 8, 2009

Wisdom of Understanding

I saw this little wisdom gem the other day on a Yogi-Tea label

To Learn, read
To Know, write
To Master, teach

I have found this to be very true. Reading about topics gains you facts. Writing about them lets you explore ideas, opinions, what-ifs, strategies, pros/cons. When teaching you want to know about the nooks and crannies, and all the little details.

Gallipoli and the Course of History

Gallipoli is a small peninsula south-west of Istanbul, in modern day Turkey. During the first world war, when the Ottoman Empire decided to side with the Germans and the Austrian-Hungarians against the rest of the world, the British had the plan to blast their way through a range of forts that protect the narrow waterway all the way up to the Black Sea. Churchill, the well known World War II politician, was the main architect of the plan. The plan failed, because too many allied ships were destroyed, mainly by mines.

A couple of months later, the allies invaded the peninsula with hundred thousands of men, with the aim to conquer the forts by land and thus clear a path for the Navy to sail to Constantinople (now called Istanbul) in order to force their foes out of the war. The invasion met with stiff resistance from the Turkish defenders -- much to the dismay of the invaders! The allied forces were unable to advance even beyond the beaches and things soon bogged down into a trench war. One year later, the enterprise was abandoned, leaving over 200,000 allied and 300,000 turkish dead, mostly young men in the prime of their life.

Now what makes this a remarkable campaign is how it connects a number of strands in history.

For one, it was the first and only large-scale sea invasion against defended positions before D-Day. A lot of the things that were done right on D-Day, were learned from the failed Gallipoli campaign. The allies learned the value of air and naval support and they improved upon the whole design of the armored landing boat, which played a crucial role in Normandy. Furthermore, tactics were aimed at making progress land inwards as soon as possible, something which was not done in Gallipoli.

Just imagine what would have happened if the allies failed in their landing at the beaches of Normandy. It is accepted wisdom that the Soviet Union was on a roll and would have defeated the Germans eventually. The true value of D-Day, therefore, was not to ascertain the defeat of Germany, but to prevent the Soviets from conquering all of Western Europe. Just imagine France, the Netherlands, Belgium, Luxemburg, Denmark and Western Germany, all under the oppressive boot of Stalin. What turn would the Cold War have taken? Would the USA still have won it?

Second, the reputation of Churcill was tarnished after Gallipoli. He was officially viewed as the instigator of the whole failed enterprise. Even though he was an advocate of initially pushing harder up the Dardanelles and forcing the straits (which would quite possibly have been successful), his more powerful compatriots thought otherwise and blocked that idea. And even though he was committed to sending more troops to Gallipoli, his compatriots once again blocked this. It is quite likely that if Churchill would have gotten his way, the campaign would have taken a different turn. But the First Lord of the Admiraly was young and without much political clout in that day and age.

Just imagine what would have happened if Churchill succeeded at Gallipoli and would have forced Turkey out of the War. Much less opportunity would have been had by the Turks to start their own new pan-Arab brand of Jihadism of which we feel the effects even today. Also, Churchill could have been a more formidable political force during the Rise of Hitler, possibly countering Chamberlain. Churchill would not have caved in to Hitler's demands -- he was a hawk. Germany was not as ready for war as mythology would have it. An early attack by the allied powers against the German infrastructure, especially during the Polish campaign, could have ended the war very early.

Third, a young man named Kemal was the Hero of Gallipoli. He showed remarkable courage under fire and was chiefly responsible for preventing the allies from making any progress. Kemal was a political enemy of the rather incompentent, but still powerful Enver. Riding the waves of his success, he prevailed and came to be known as Ataturk, the father of modern day secular Turkey.

Just imagine that Kemal did not have this success to feed his ambitions and the modern day Turkey project started by the Young Turks would have been a failure. Turkey has a strong economy and military nowadays. What if it did not reform?

Fourth, an Australian reporter made his name as a critic of the Gallipoli campaign. His famous "Gallipoli Letter", detailing the failure of the campaign, had a huge impact and was one of the main reasons why the campaign was cancelled. The name of this reporter was Keith Murdoch. He sowed the seeds of a media empire. His son, Rupert, took over from him and carried the empire to greatness. One can only hold in awe what the Murdochs achieved.

Just imagine what would have happened if Keith did not get his shot at fame by denouncing the Gallipoli campaign. Would he have been able to engineer a media empire?

So many questions that will never be answered. Nevertheless, ostensibly just a side show, Gallipoli may have had a greater impact on history than meets the eye.

Sunday, June 7, 2009

Automating automation

At Independent IP we have made automation a mantra. Wherever we can, we automate manual processes so we can lower our costs, run the show with as few people as possible and ultimately have our customers benefit from all this by paying a competitive fee for a better platform.

Despite this, there are always a couple of stepping stones before reaching the ultimate goal -- an automated process.

DOING; in the first phase, the lifecycle of a process starts out as an activity not formally defined that someone is repeatedly doing. At this point in time, we are not or only partially aware of it.

IDENTIFYING; in the second phase, we are aware of the activity and it will be described in a document or flow diagram. At this point in time we are aware of the costs, both current and when scaling up. This is also the moment that we draft wishes to have the process automated.

STANDARDIZING; the third phase is when the process can be performed by other people as well. Standardization has kicked in.

AUTOMATING; finally, the whole process is automated.

Starting a new process immediately in phase 4 usually never works. This is for various reasons:
- the process has not had the chance to gain real business value because it is still a product of the mind
- the process has not been repeatedly tried and improved upon, so it may not be the best way to do things
- the process does not yet exist, so we do not know very well what we try to accomplish

Move slowly and do not rush through the phases. Respect the ripening of processes to yield the best harvest.

In the end it is about automating automation and doing that in the most effective way.

Friday, June 5, 2009

Truth hurts

"Ignorance is bliss", as Cypher so succinctly put it in the Matrix, after he describes how Knowing spoils his dinners. He was probably inspired by Thomas Gray's "Where ignorance is bliss, 'Tis folly to be wise". Not knowing Cypher lived in an artificial world would have preserved the joy of eating food. Knowing that he did, spoiled it all. He bemoans the fact that he Knows.

The Search for Self is a murky path, full of unpleasantness. You will find things about yourself that you dislike, weaknesses and imperfections, things you did or were done to you and do not want to be reminded of, or choices you made that had unhappy outcomes. It might make you feel depressed, angry or sorrowful, or perhaps even spirals you down into self-destructive behaviour. Compare that with a lot of people who have a skewed Sense of Self, yet are perfectly happy in their bubbles and even perform well in society. Why then do we still doggedly pursue this knowledge? What is so great about it?

There are a couple of reasons. Knowing thyself...
... paves the way for improving yourself
... helps you to prevent disadvantageous situations
... helps you to determine a career path
... makes you stronger, because no one can tell you anything about you that you did not already know
... helps to manage expectations about what you can and cannot do
... allows you to better understand other people

On a company-level, self knowledge becomes even more critical. The temptation to see life through rose-tinted glasses is enormous. Optimism is often seen as the driving force for a venture. I say here and now that optimism is overrated and even dangerous -- a culture of optimism disallows bad news to be merged into painting the big picture, therefore always putting decision makers on the back foot.

Optimists often have short-term success, but know not how to deal with setbacks. They disbelieve, ignore, deny, and do basically anything to keep their world view intact.

Any company is much better served by a good sense of what it can and, more importantly, what it cannot do. It can set ambitious, yet attainable goals for itself, that boost morale in a way that pep talks and speeches could never accomplish. It sets its goal and then does it.

On a society level, the refusal to Explore Self, or discuss that what happens is well known: Political Correctness. An affliction that seeks to, as biologist Matt Ridley puts it, "argue from ought to is". Political Correctness is carried by none less than all those sweet and well-intending people who want the world to be a good place.

To prevent all that nastiness from entering decision making, it is ignored. Euphemisms, censorship, and looking the other way are all manifestations of Political Correctness. The consequences are that a society is unable to deal with wrongs that it even fears to identify.

So instead, we retreat inside a safe bubble that tells us life is good, people are good and we are good. No pain, just bliss.

And that is just the truth of it.