Scientists have invented an autonomous flock of drones that think collectively