Forget Adam Smith, the all holy algorithm has become the new “invisible hand” that guides us. But what are these calculations, and how did they become so powerful?