Darwin wrote that altruism would give one tribe an advantage over another, even though individual members of that tribe might be at a personal disadvantage.
So, between group behaviour would override within group behaviour. This depends crucially on group selection. This approach was largely discredited by the 1960s and other theories were developed, such as kin selection; evolutionary game theory; and selfish gene (extended phenotype) theory. These are all theories that seek to explain apparent altruism through individualistic behaviour. The idea that there was such a thing as society as an organism was comprehensively rejected.
This concept has been recently challenged and what is called multilevel selection is gaining ground. It helps to explain not just tribal behaviour but animal behaviour, multi-species ecosystems, the nature of religion and rise and fall of empires, among other things. The revision has been made possible by the massive increase in computing power that has enabled complex models to be studied.
Experiments with microbes have shown that between-group evolution is very powerful. Observations in the field with lions and other creatures bear this out. Earlier theories trying to explain altruism through individual advantage had failed because they did not prove what they set out to do. Hamilton (kinship theory) and Dawkins (extended phenotype theory) have since admitted this.
Multilevel selection suggests that groups behave like organisms, which are a collection of co-operative cells. Hamilton’s original claim that this was to do with kinship has been shown to be wrong.
There are many examples in the article on how multilevel selection applies to humans. For instance, we enforce a certain level of egalitarianism on the group so that one individual cannot exclusively dominate all. This allowed teamwork to develop and helped facilitate between group activity; and it is this ability that has led to our world-wide dominance.
The article also says that within group selection has not been eliminated only suppressed, which explains the tensions existing between selfishness and altruism. It ends with a quote adapting Rabbi Hillel, ‘Selfishness beats altruism within groups. Altruistic groups beat selfish groups. Everything else is commentary.’
