Mobiligence: social adaptive functions in animals and multi-agent systems