Interactions with conspecific outsiders as drivers of cognitive evolution