Friendship and natural selection