Artificial intelligence algorithm can learn the laws of quantum mechanics