Monday, April 28, 2014

Learning to play.

In 2007, the Swedish gambling agency ran a simple gambling game called LIMBO. Gamblers were invited to stake 10 kronor on a number of their choice between 1 and 99,999. The person choosing the smallest number that no-one else chose is the winner: taking home a prize of around 100,000 kronor. What number would you choose?

Poisson-Nash equilibrium for an average of 53,783 players
When I played the game at Erik Mohlin's interesting and engaging seminar at the Institute for Futures Studies last Friday, I chose '1'. A bit naive, maybe, and quite a few others thought the same way. The winning number in an audience of about twenty of us was '5'. While the game is not straightforward, it is possible to determine a probabilistic equilibrium strategy. If all players pick numbers according to the distribution on the right, then no player can improve their performance by changing away from this distribution. Note that the probability of choosing large numbers is not zero, but it is very very small. 

The question Erik asked was how people learn to play the game. It is unlikely that everyone worked out the best strategy using stochastic game theory. Indeed, in the first week in Sweden people didn't play so well. Like me, they clustered around very low numbers, maybe not realizing that everyone else would do the same. But over time the distribution stretched out and they collectively took a strategy close to the optimal. Winning numbers after two months of play were between 162 and 3590.  

How do people get collectively better at games line LIMBO? This question was tested on data from a lab experiment, where smaller numbers of people played a similar game. Erik and his co-workers found that the explanation that best fit the data was a form of imitative learning, where the players would look at previous winners' numbers, and increase their probability of choosing a number the same or near to the winners.  Through this learning they eventually arrive at the equilibrium shown above, both in the model and in the data. Imitative learning is quick way of finding out how to play a game well.

The fact that imitative learning works so well for game playing is an important insight for basic economic theory. Economist often argue about if and when the equilibrium of a game is useful for predicting the behavior of real people. In this case it seems to be very useful. The equilibrium is quickly reached through a simple process of imitation. 

But…….. The Swedish gambling agency closed LIMBO about 3 months after it started because they believed people were using syndicates to cheat. It isn't hard to see why. The winning numbers were usually in an interval 1000 to 3500. So an investment of 25,000 kronor by a consortium was almost guaranteed to win the 100,000 kronor first prize. If there was more than one consortium then this would drive the winning numbers up and maybe the consortiums would start to lose. But it is clear that the game becomes unfair for honest, single players. If you can read Swedish, it is quite amusing to read the press releases from Svenska Spel as they first introduce the game as the result of 5 years research, then provide some tips on how to pick your numbers, then finally admit that the game was against gaming laws all along.   

I think this real-life outcome raises just as many interesting economic questions as the original game. As soon as the game was introduced, independent gamblers built a syndicate to make sure they took home a profit. This is where the collective behavior comes in. Groups of independent actors quickly self-organizing to manipulate the market. Understanding how groups form and manipulate these games is a much harder problem to study scientifically. But if related to the behavior of economic agents such as banks and other financial institutions over the last few years, it is certainly a no less important a question to answer. 

Tuesday, April 22, 2014

Ants are just as clever (and stupid) as people.

Last week I found out that Takao Sasaki was one of the winners of this year's Glushko prize for cognitive science. The prize is awarded by the Cognitive Science Society, whose overall aim is to further understanding of the human mind. Given this, it was very gracious of them to give the prize to Takao. His PhD thesis wasn't really about the human mind. Instead, it was dedicated to showing that rock ants are just as smart as humans. Or, when working as a colony, possibly even smarter.

One ant carries another to her new home
Takao started with rationality. Over the last decade economists have been gradually discovering, what any bloke in the pub could have told them for free, that humans are not rational. For example, one thing retailers often do to fool us irrational mortals is place out a number of unattractive decoy products which make the product they want you to buy seem like a better deal. Takao did the same with his ants. He found that individual ants changed their preferences for the nest they would like to live in when offered an additional option. Ants are just as malleable as we are. But it turned out that the ant colony as a whole was not swayed by irrelevant options. A bit like when you come home from a shopping trip and your family asks you "why the hell did you buy that?", the colony is a whole is more sensible than any of the individuals in it.

Individual ants can choose between a good and a bad nest
site, but have difficulty with eight. Colonies have no
problems with either set up. 
One explanation for irrationality in individual ants may lie in differences in cognitive capacity between groups and individuals. In his next experiment, Takao tested how individuals and colonies performed when offered large numbers of potential homes, some good and some bad. The colonies seldom chose a bad nest, but the individuals did so nearly 50% of the time. When compared to groups, individuals are not only irrational but downright bad decision-makers.

So groups are better than individuals? The crowd is always wise? Well, not always. Next Takao looked at how decision-making difficulty affects the ability of colonies to choose the best of two nests. He showed that, as in his earlier work, the colony was better than the individual at choosing when a difficult decision had to be made. But when the decision was straightforward, and one of the potential homes was a lot better than the other, the colonies got it wrong more often than the individuals.

Takao's latest paper is on learning. When ants repeatedly experience, for example, very light nests (which they like), then they put a premium on very dark nests. On the other hand, if they experience, nests with large entrances (again something they don't line), then they put a premium on narrow entrances. Again the ants are a bit like us.

Takao's PhD supervisor and co-author on the above work is Stephen Pratt, who I have known and worked with for many years. Stephen and my work together focussed more on the mechanisms these ants use to make good group decisions. Takao's thesis really takes a whole new direction by testing ideas from cognitive science on ants, and I think the award is very fitting. Well done!

And don't worry if you happen to be human. One day we will prove that we are smarter than ants, but we are still a long way off.

Thursday, April 10, 2014

What is a complex system?

This week I started teaching the course 'Modelling Complex Systems'. I decided this year to make video lectures for the course. In the first one, I define complex systems. This is not an easy thing to do. There is no real recognized definition, and the wikipedia page is pretty confusing. Complex systems are systems that are, er, well, complicated (although even this obvious statement is often argued against)

My answer is simple, I just show a lot of systems which make complex looking patterns and say "complex" a lot. A similar (but more eloquent) answer is also given by Melanie Mitchell in her excellent complexity explorer course.

I do have one little twist, and that is that a complex system is one in which you can use mathematical modeling to better understand it. This leads me nicely to my second lecture: what is mathematical modeling? This question I have thought about a lot, and I think here I give a reasonably useful and general explanation of why we use mathematical models. Models are used for one of four reasons:

1, Explain data as simply as possible.
2, Link together levels of explanation.
3, To provide detailed descriptions.
4, To predict future outcomes.

Complex systems are most associated with number 2. Have a look at the video and see what you think.

I will hopefully be putting all my lectures up on a webpage in the future. One request I have now is that if anyone can suggest good articles on which the students can base mini-projects please tell me. The students on this course tend to be exceptionally good at modeling and mathematics, and highly motivated. So any 'complex systems' models that can be implemented and tested in 4 weeks would be much appreciated.

Wednesday, April 9, 2014

Why care for your kids when someone else will do it for you?

Its been a while since I wrote a blog post, and this mainly because I have been lost in my own thoughts during my 'sabbatical' in Sydney. But I managed to raise myself from self-indulgence and go to a really nice seminar on Friday by Ros Gloag. Ros is doing a Postdoc in Madeleine and Ben's social insect group in Sydney, after finishing her PhD together with Alex Kacelnik in Oxford.

Ros spent her PhD studying shiny cowbirds and chalk-browed mockingbirds in South America. These cowbirds pose something of an evolutionary puzzle, because they are such blatant parasites. What the cowbirds do is hop in to the mockingbirds nest, lay an egg and then fly away. The mockingbirds don't like this. If they catch the cowbirds (which they often do) they attack them pretty fiercely (see a bird get beaten up but still lay her egg in a video below). This doesn't seem to stop the cowbirds laying an egg, although it does stop the cowbirds damaging any of the mockingbirds own eggs.

A mockingbird nest with three of
 its own turquoise eggs and four parasitic
cowbird eggs. 
But the strange thing is that the egg left by the cowbird looks very different from the mockingbird's own eggs. Why doesn't the mockingbird just destroy it and throw it out? Ros showed that mockingbird eggs in nests containing cowbird eggs were less likely to be damaged or destroyed. This is because when other cowbirds come along and attack the nests, they end up damaging the cowbird eggs which are already there rather than the mockingbird's own eggs.

Once the all the eggs hatch, host birds continue to look after both the cowbird and their own chicks. One clue to why the hosts do this can be found in the vocal recordings of the cowbird chicks. The cowbird appears to mimic the calling of groups of hungry chicks, producing a general enough sound to fool a range of different host species. This causes the parents to collect even more food than they usually would, which the cowbird laps up.

Ros' thesis is a beautiful example of how the behavioral ecology approach helps us understand the evolution of host and parasite interactions. She has nicely combined the cycle of experiment, thinking about what the experiment implies, building a theory, and then testing it with a new experiment.

There is a danger in the behavioral ecology approach that experiments are done until one of them identifies an advantage for the host, at which point we stop and congratulate natural selection on its amazing power of finding a balance. This can make me a bit suspicious.  In Ros' case there are still a few open ends, but I think this is to her credit. Instead of finding a full answer, her research documents the subtleties of hosts and parasite relationships.