quarta-feira, 27 de março de 2013

Animals

This short post intends only to divulge the new videoclip for Muse's song, Animals. The video was made by two Portuguese, Inês Freitas and Miguel Mendes, and you can check it here. Once again, it is sad that achievements by Portuguese are so easily overlooked by our own media.

You can see my extended interpretation of the song ( along with other things ), in the previous post "Alpha Species", published in October 2012.


Filipe Baptista de Morais

sábado, 23 de março de 2013

The Greater Good

Let me start this post with the famous Prisoner's Dilemma. It has many different formulations, so I'll stick with the first formal one I've seen, in a Game Theory course at the Technical University of Prague ( March 2012 ).

"It is 1930's. In the Soviet Union at that time a conductor travels by train to Moscow, to the symphony orchestra concert. He studies the score and concentrates on the demanding performance. Two KGB agents are watching him, who - in their ignorance - think that the score is a secret code. All conductor's efforts to explain that it is yet Tchajkovskij are absolutely hopeless. He is arrested and imprisoned. The second day our couple of agents visit him with the words "You have better speak. We have found your comrade Tchajkovskij and he is already speaking...
Two innocent people, one because he studied a score and the second because his name was coincidentally Tchajkovskij, find themselves in prison, faced the following problem: if both of them bravely keep denying, despite physical and psychical torture, they will be sent to Gulag for three years, then they will be released. If one of them confesses the fictive espionage crime of them both, and the second one keeps denying, then the first one will get only one year in Gulag, while the second one 25. If both of them confess, they will be sent to Gulag for 10 years."

Although at first glance the solution might seem simple ( both of them should deny ) that is in fact not true. Keep in mind that they cannot struck a deal, and thus must decide independently. Moreover, notice the fact, no matter what one decides, it is always more profitable for the other to confess. In order to fully realise this, consider you are the conductor. If Tchajkovskij stands strong and denies, you'll get 3 years if you deny as well. But, were you to confess in the same situation, you'd only get 1 year! Poor Tchajkovskij would spend 25 years at the Gulag, but that's hardly your problem. If, on the other hand, Tchajkovskij confesses, denying would mean 25 years for you, while confessing would mean you'd both get 10 years. Again, confessing is the smartest option for you! Of course the same reasoning applies to Tchajkovskij's situation, since they're exactly the same. Indeed, confess is the dominating strategy for both players and (confess , confess) is the only equilibrium point in the game. Non-technically it means that, if both Tchajkovskij and the conductor act rationally (eg: they act in order to get the best possible outcome for themselves and feel no pity or remorse for the other) they will both confess and thus be sent to the Gulag for 10 years, when they could get a much better outcome if they both denied.

The prisoner's dilemma can be generalised to any  2-players game where they both can choose to cooperate and defect and
  • if they both cooperate (deny) they'll both get a reward (only 3 years in Gulag, as opposed to the 10 given by the rational solution);
  • if they both defect (confess) they'll both be punished (10 years in Gulag);
  • If only one of them defects and the other cooperates, that one will get a bonus even better than the one he'd get if both cooperated (only 1 year in Gulag), while the other gets a really bad outcome (25 years in Gulag). In this situation the first is said to have given in to tempation while the second is called the sucker.

Interesting as it is as a theoretical conception, one must wonder if the prisoner's dilemma actually ever occurs in practice. And it does. A lot. Consider for instance the issue of tax paying (in Sweden) and imagine there's some kind of magical way to evade taxes without getting caught. If you pay taxes, you get lots of benefits (education, health, public transports, etc... ) but you lose the money. If you don't pay the taxes, you get the same benefits without the nuisance of losing any money. This seems like the right thing to do then. Thing is, if no one pays paxes, then everyone will lose the benefits. This simple and somewhat ridiculous example intends only to show how an instance of the dilemma might look in practice. Other examples could be a typical duopolist situation, payment of fares on public transports, soldier on a battle's first line and the storage/abdication of nuclear armament.

The thing with this kind of problems is that they require communication and co-operation in order to reach the overall best solution. If each individual acts so as to maximise its own proffit, everyone will end up in a nasty situation. Still, it seems like the rational thing to do. And most of Economics is based on the assumption that people will act rationally, as the so called Econs. Even worst, we all know that people really hate to end up being the sucker, so in fact their irrationality will bias them even more towards the defecting solution. So, are we doomed to this worst possible outcome?

Maybe not. Most pratical insstances of the Prisoner's Dilemma occur repeatedly; that is, you are called to make a decision only once but over and over again. While this may seem a minor detail, it makes all the diference in practice. Going back to rational agents and Game Theory, the solution to the repeat game is not to defect all the time. Without further ado, let's speak about Axelrod's Tournament. In 1981 Robert Axelrod invited prominent game theorists to a computer tournment. The idea was that each participant would develop its own computer agent (with a given strategy) to play the Prisoner's Dilemma game. They would then play with each other for 200 rounds, and in the end they would count the points (each year in prison is worth one negative point). Just for the sake clarity I'll introduce three of the strategies used
  • Tit for Tat: cooperates on the first round and then always mimics the other's last move;
  • Random: cooperates with probability 0.5;
  • Grudger: cooperates until the other has defected, then defects forever (it doesn't forgive the betrayal).
Twelve other strategies were employed, most of them more complex than these.
There are many ways to categorise these strategies; an interesting one if by dividing them into two groups: nice strategies and nasty strategies. The first are characterised by never defecting first (only in retaliation), while the latter defect first in at least some situations. You can therefore picture an agent following the first type of strategy as someone who is trustful, in opposition to someone with guile. Quite surprisingly the simple Tit for Tat strategy won the tournment*, reminding us yet again that complexity does not necessarily make something better or smarter (and believe me, people do tend to forget this a lot!) But what I really find worth mentioning is that the first eight places in the tournment were taken by the eight nice strategies present, which means that all nasty strategies scored below any nice strategy. This seems to indicate that, even in a rational sense, it could be proffitable to play nice in life. Maybe there is hope for Humanity after all...


Filipe Baptista de Morais

* The tournment was repeated with somewhat different rules some time later, yet this simple strategy won again.

quinta-feira, 21 de março de 2013

Living on the edge

I've been on physioterapy as of late, recovering from a (minor) footbal injury. The clinic is organized into 4 or 5 small private rooms, then a larger one which holds the gym and where several patients can work out at the same time. It's funny to see how long-term patients tend to get connected to each other, simply by being at the same place at the same time over and over again. Kinda like what happens with hospitalized people.

Anyway, today was my last session and I was at the gym with 3 other patients when I realized something odd: they were all injured due to accidents involving motorbikes. I found it even more curious that, despite the reason being the injury being the same, everything else was different. There was this man in his forties, with some sort of back injury, an older one (~ 60), with a shoulder injury and, finally, a young woman in his early twenties whose surgery scar was clearly visible in her knee. Both sexes, three different age groups, three different injuries, one common cause. It does make you feel like it can happen to anyone.

While they were chatting about their accidents the physioterapists also realized this coincidence and mentioned that, in other clinics directed to more serious injuries, sometimes more than 50% of the patients are there due to motorbike accidents. Everyone made some comments on how nasty motorbikes were, but just 15minutes after that the patients were already talking about the newest models, which ones were prettiers and which ones they were going to buy. Apparently they were all going to buy new ones, since their previous ones were destroyed in the respective crashes.

One can't help but wonder what leads so many people to love motorbikes so much that they'll stick with one after a life threatening accident, which in all probably wouldn't be more than an inconvenient bump if they were driving a car. Is it adrenaline of speeding with the wind on your face? The joy of going around traffic jams? Is it because they're simpler to park? Or perhaps just because their cheaper? Whatever the answer may be, a more important question still seems to linger.
Is it worth it?

sábado, 16 de março de 2013

Way Up North

I've recently been to Helsinki, in Finland. Though it was a very short trip (4 days only), or maybe because of that, I thought it would make sense to open up a precent and write an account of it for my blog. I'll organise the post through bullet points, to call attention upon particular aspects of the trip I find worth mentioning.


  • Snow is beautiful, whether in urban or rural environments. Finnish don't seem to agree on this though, and this is actually consired low touristic season. I can imagine that seeing it on a daily basis can make it somewhat less special; they also have to deal with its downsides: extreme cold. Even so I'm pretty much convinced that a higher awareness on this potential could lead to its better exploitation in terms of tourism. Then again, maybe Finnish shouldn't take financial advise from a Portuguese.
  • Suomenlina. It's a fortress island really close to Helsinki (15min by boat or so) and I would probably elect it as the trip's highlight. Beautiful beyond words, the snow covered island is definately worth a trip. Amazingly, all museums and cafés were closed since it is not touristic season! Looking at some postcards of it, in the Summer, I must say it does not look so special...  we have similar things in Portugal. So screw touristic season, go there in March!
  • I Helsinki main attraction.In the city itself there is also quite a lot to see, but you can easily look it up online or in a traveller's guide. I'd just highlight the rock church and the olympic stadium/tower. The first because it really is something interesting ( the church appears to be engraved in the rock directly somehow ) and the latter due to its higher panorama view over Helsinki. We were later told that a hotel in the center of the city had an even better view from its rooftop, but unfortunaly it was already closed by the time we arrived there. Nuuksio National Park, which I visited following a friend's advise, is also quite nice and peaceful in case you can afford the time ( ~1h from Helsinki ). The city also features a lovers' bridge, in case you're familiar with the concept and fancy it.
  • Tallinn. The capital of Estonia is only 2h away from Helsinki by boat and I'd say it's a must. The city is beautiful but also make sure not to lose the boat trip in itself, in particular the departure and arrival times. Seeing the boat cut through the freezed water was also quite interesting.
  • Food.  Food is actually not that bad around Helsinki; it is awfully expensive though. Elk and reindeer meat and salmon schnitzel is not something you're used to see in Portugal and they're quite good. I also tried this canned fish, muikku I think it was called, but I didn't really like (probably cause of the canned sauce). A Finnish friend of mine gave me this typical pastilles named Salmiak, which are somewhat salty and weird. Luckily, she had the foresight to accompany it with a Finnish chocolate bar to overrule the flavour, which I thank her for. I recommend you try the same procedure.
  • People. Finnish are often portraied with the usual Nord stereotype: cold, unsympathetic people who resemble robots in terms of efficiency and lack of interest for socializing. It couldn't be further from the truth though! Well, I guess they are efficient. But other that the stereotype is way off; Finnish are actually quite nice and don't be surprised if they start talking to you on the bus or at the bar.

All in all the trip was great and I'd definately recommend it to anyone. And please do it in late Winter/ early Spring and not in the Summer!

terça-feira, 26 de fevereiro de 2013

Private Marriage

I've just come across this very interesting idea in a book, which is to privatize marriage.More specifically, that would mean removing the terms marriage, married, husband, wife, spouses and the like from any laws or government policies. Marriages would be performed and recognised by private organisations alone, with no influence whatsoever from and on the state.

To motivate this chance, the authors first dwell into the very meaning of marriage. Curiously enough, just a few weeks ago I'd seens this TED talk on "The lost art of democratic debate" where the speaker stands behind the idea that, in order to argue about moral and justice over any activity or entity, one must first medidate on that activity or entity's essential nature, its purpose. In the particular case of marriage, we clearly have a problem of ambiguity or disparity. Marriage is a symbol of union, of affection, of love. On the other hand, it is also a civil state grating its holders special benefits, including but not limited to economical ones. This mess is the source of much of the controversy surrounding marriage nowadays. Does the state have anything to do with my love for someone? Does the catholic church have anything to do with how much taxes I pay?

Take same-sex marriage for instance. Some private entities, such as the catholic church, want to reserve the right to decide who can get married while people feel that being deprived of the possibility to marry is an unfair source of discrimination, due to the social nature of the cerimony. Privatization would solve this issue. Private entities would keep the right to choose which marriages to recognise but, since there is no public recognition of that status, no harm would from that. A tennis club could decide to only hold and recognise as valid marriages the ones involving two professional players. Whatever. For the state, one could have a different status linked only to legal privileges/duties. In fact, I believe Portugal already has something of the sort called União de Facto, although I don't think it comes with the same package of rights/responsabilities as traditional marriage.

This would solve a very silly trait of current marriages, which is to mix taxes with love or union. In fact, as the authors point out, no sane people would come up with marriages as they are, were they invented today.

Still, we can go a bit further. Let's focus on the public part of the now divided marriage, hereon named union. Should it inherit all responsabilities and rights that marriages are entitled to this days? Perhaps not.

Some of these are related  to sharing goods and responsibilities; these should probably stick. For instance, when a spouse has a dementia the other is entitled to take some decisions for him. When one of them dies the other has a share of this inheritance. These kind of properties would still make sense in the union entity.

Others, however, are directly related to economical issues. Consider, for example, some kinds of tax reductions that married couples are entitled to. Should this be kept? The state should only provide tax reductions, or other kinds of economical incentives, to behaviours that are worth encouraging, from the state's perspective. Should the state care about people being together? Well, if we consider that the state's ultimate goal is to make everyone happy and that couples are happier than single people ( are they? ) then we could argue it should. Still, I believe you'll agree with me when I say that's a long shot. What the state should, and does care about, are birth rates. Marriage was once (a long time ago, in a kingdom far, far away...) connected to having children and it thus made sense to encourage it. Nowadays, you can have marriages without children and children without marriages. You can even have both at the same time! Moreover, many countries (such as Portugal actually) allow same-sex marriages but do not allow those couples to adopt children or give birth by artificial means (in the case of women). In this situation it would not make sense, in my opinion, to give any economical incentive for unions.

Marriage will probably never be privatized in the terms proposed, since it is a very touch subject (which politicians often want to avoid). And yet, perhaps it should...


Filipe Baptista de Morais

sexta-feira, 15 de fevereiro de 2013

The Wisdom of Crowds

Some time ago I came across a book which, I dare say, revived my faith in Humanity. We all know that news tend to be pessimistic, in the sense that they depicture people's mistakes more often (and far brighter) than what they do well. Moreover, positive remarks are usually restricted to the very best in any given activity; it's no surprise that we, the John Does of this world, do not find them flattering. Adding up to the pot, I've read so much about irrationalities and biases in our thinking that made  me wonder why did we manage to survive so far. This Wisdom of Crowds, by James Surowiecki, is heart warming in the way it reveals the potential we all share. If not alone, then together.

The main idea behind the book is in fact quite simple: given a (not necessarily large) number of people, their average prediction/decision is almost alwaTys better than most of their individual ones. Most strikingly, it is also quite often better than the one picked by the smartest of them! Note that, by average, I mean aggregated in an adequate way; similarly, the term smart was also employed quite loosely but I believe you got the picture.

From guessing the number of beans in a jar, predicting sports outcomes, evaluating shares in stock markets or finding a lost submarine the author presents us with a wide and interesting variety of corroborative examples. Oddly enough, the very first example depicted in the book came from one trying to demonstrate its very opposite: the stupidity of crowds.

Obviously, there are some underlying assumptions. The wisdom of crows does not apply to every possible subject, although it appears to be remarkably robust to environment complexity and lack of information. There are conditions that must be met, such as independence of thought/action, the existence of an adequate aggregation function and coherent responses (that is, people must act in conformity with their beliefs and not try to play politics). Its application to decision making also raises other issues, such as responsibility and accountability. Still, it is clear that, if used with parcimony and awareness, the wisdom of crowds has plenty of applications.

The last chapter talks about the implications of the wisdom and its assumptions in democracy, and the reasons why it often fails. Hopefully by now I've made a compelling enough argument for you to go buy the book. If not, well, I guess I'm not as good a writer as Surowiecki is.


Filipe Baptista de Morais

sexta-feira, 8 de fevereiro de 2013

Polémica

O Público publicou há pouco tempo uma notícia em que referia que o "Instituto Superior de Contabilidade e Administração de Lisboa (ISCAL) e o Instituto Politécnico de Leiria estão a subir as médias aos estudantes que terminem os respectivos cursos dentro do tempo previsto". Esta notícia gerou intensa polémica e reacções intempestivas de parte a parte. Dada a sua Natureza  e a interessante troca de argumentos de parte a parte pareceu-me que valeria a pena comentar este assunto. Se quiserem podem ler a notícia aqui.

Em primeiro lugar gostaria de dizer que, na minha opinião, não há caso para tanto alarido e preocupação, relativamente à "injustiça na entrada do mercado de trabalho" que tantos contestam. Isto porque os empregadores não se guiam única, exclusiva e cegamente pelas médias dos seus candidatos; far from it. É até sabido que muitas empresas dão preferências a estudantes de certas instituições, às quais atribuem credibilidade, em prol de outras. Ou à instituição da qual são provenientes. Ou àquela em que o primo por acaso trabalha. Ou simplesmente àquela que se encontra mais próxima do seu local de trabalho. Tudo isto é natural e dilui essa "injustiça", a existir. É certo que há casos, nomeadamente concursos públicos a bolsas de investigação, em que a média é o único determinante. No entanto, mais uma vez, não considero que esta notícia seja caso para grande alarme nesse âmbito. Isto porque há muitos outros factores que influenciam tanto ou mais a média. Não quero com isto afirmar que há faculdades que dão melhores notas que outras (nem que não as há; quem tiver esses dados que os comente), simplesmente pretendo salientar que as notas atribuídas a um aluno são extremamente relativas. Sendo eu próprio estudante Universitário posso comentar que, em cadeiras onde há alternância de Professores, é muito frequente haver (altas) oscilações nas notas de semestre para semestre. E não estou aqui a falar de 2 décimas. Parece-me portanto que também não é por aí que o caso se torna escandaloso.

Estas medidas de "incentivo" são sim dignas críticas mas porque, a meu ver, simplesmente não fazem qualquer sentido. Em primeiro lugar as notas de um aluno são, idealmente, um reflexo do conhecimento e capacidades que ele obteve/demonstrou. Não devem por isso ser adulteradas sob o pretexto de o incentivar. Em segundo lugar defendo que, sejam de que tipo forem, os incentivos apenas devem ser atribuídos a quem se destaque pela positiva. "Incentivar" os alunos que sejam aprovados a todas as cadeiras de um semestre ou que concluam a licenciatura em três ano é equivalente a dizer que tal não seria esperado deles, que é uma espécie de achievement. Ser aprovado a cadeiras e concluir o curso no tempo esperado deveriam ser a norma, e não a excepção. Isto é mandar uma mensagem clara aos estudantes de que apenas se conta com a mediocridade. De notar que este raciocínio em nada se prende com o tipo de incentivos utilizados, nem com as taxas de aprovação das cadeiras/cursos em causa. Ainda que apenas 1% dos estudantes concluí-se o a licenciatura no tempo previsto continuaria a defender que não faria sentido incentivá-los por isso. Finalmente acho que o 3º tipo de incentivo referido ("Quando a média do estudante for superior a 14, há ainda um incremento de meio valor na classificação final") merece um comentário especial. Subir a média de um aluno por este ter uma boa média é, perdoem-me a expressão, estúpido. Não faz qualquer tipo de sentido. É descaracterizar e retirar todo o sentido à média.

De modo a clarificar a minha posição, gostaria de salientar que não sou de todo contra o uso de incentivos aos estudantes exemplares. Não concordo (de todo) é com esta noção de exemplar ou, no último caso, com o tipo de incentivo usados. Ofereçam propinas, livros, cheques FNAC ou bilhetes para o Sporting. Os Presidentes de ambos os institutos justificaram as duas decisões referindo que são um incentivo aos estudantes a terminarem os estudos no tempo previsto, reduzindo assim os custos para o Estado. Isto é, na minha opinião, uma barata e demagógica tentativa de apelar ao sentido económico das pessoas que, neste tempo de crise,  tão sensível se encontra. Não misturem alhos com bugalhos.

Finalmente gostaria ainda de aproveitar para comentar a reacção da Direcção da Associação de Estudantes do Instituto Superior de Contabilidade e Administração de Lisboa (AEISCAL) à notícia do Público. Podem consultá-la aqui. Não vou criticar a sua posição, dado que já exprimi a minha opinião quanto aos incentivos usados. Critico sim o tipo de argumentos utilizados que, apesar de serem empregues com frequência e geralmente até bem aceites, são a meu ver falaciosos. Em primeiro lugar, o eterno argumento "ah, mas já se faz assim há muito tempo" (neste caso três anos). Nem tudo o que fez foi bem feito, tal como é certo que nem tudo o que se fará o será. Mas esse tipo de raciocínio apenas leva à perpetuação de erros. Em seguida, o talvez ainda mais típico "ah mas toda a gente faz!". Não sei se é verdade se não, já que não referiram quais as Instituições do Ensino Superior que o fazem. Sei que a minha não faz. Mas ainda que acreditando nisso (não há razões para não o fazer creio) temos que concordar que é um argumento fraquíssimo e, até, algo infantil. Apenas me faz lembrar as crianças que, ao serem apanhadas a fazer algum disparate, denunciam tudo e todos na sua tentativa de se ilibar. No caso das crianças muitas vezes tiram daí algum benefício: sempre arranjam companhia para o castigo. No caso da AEISCAL não percebo realmente o que pretendiam.


Filipe Baptista de Morais