Google said on Monday that it had agreed to buy British artificial intelligence start-up company DeepMind for an undisclosed amount.