Solidarity and selfishness in biology