Much of the Agile movement has been influenced by scientific theories, like Complexity Theory, Chaos Theory or Game Theory. Let's look at how the latter can be applied to software development.
Game Theory focuses on how groups of people interact and often compete. It is as much about outsmarting competition than fostering collaboration between "players" in the "game".
Here's an example of a classic game applied to software development, simplified for the sake of argument:
Two developers are working on the same project where there is no common code ownership. Both developers are running late, and each one of them is struggling with a section of code where the other developer might be able to help. What should they do? Here's the deal:
- If the developers don't collaborate with each other, the project will run late by a couple of weeks, and they'll each get only half their yearly bonus.
- If one developer helps the other one without reciprocity, the one getting the help will be on time and get 100% of his bonus. The helper however will be the only one running late, he will be considered solely responsible for the whole project going overboard and he will get no bonus.
- If both collaborate with each other, the project will be delivered on time, both get 100% of their bonus, and everybody wins.
Question: will the two developers collaborate? The problem is, why would one developer start helping the other, when he's not sure that he will be returned the favor ? There is the issue of trust, and the possibility that the cheater strategist will beat the altruist every time.
What we have here, is a "soft" version of the famous Prisoner's dilemma, a game where two individuals won't cooperate with each other even if that is in their overall best interest.
Looking closer at the issue, a couple of things make the collaboration difficult:
- At a personal level, the reward of not helping is greater than that of cooperating. The helper could lose all of his bonus. 50% is better than nothing.
- The developers don't trust each other because it is a one-time interaction for a "big bang" delivery.
The non-collaborative strategies adopted by the two developers is a Nash Equilibrium, i.e. no player gains by changing unilaterally his strategy (i.e helping out) while the other player keeps his (selfish) strategy unchanged. Each player has made the best decision possible taking into account the other player. But the situation is not optimal for the players, nor for the project as a whole. However, while unilateral changes in strategy don't pay off, nothing prevents the players from meeting up with their managers and reaching another Nash Equilibrium by concerting their strategies and that would profit all parties involved.
And so it seems that acting on the above two issues, we can make the collaboration successful:
- Reward cooperation. For example, if the project is not delivered on time nobody gets a bonus. Collective code ownership ensures that all participants in the "game" are responsible for the whole project, not just the part assigned to them.
- Break the project delivery into multiple phases, or iterations and adopt a Strategy for the iterated prisoners' dilemma (IPD): the more the developers interact with each other to produce something, the more trust can be built over the long run.
The above is a simplified, even simplistic example, but it illustrates how software development can be seen as a cooperative game and why being Agile may help with project issues steaming from non-collaborative environments.