The 2024 Nobel prize for physics has been awarded to two scientists who laid "the foundation" for artificial intelligence - although one of them recently warned the technology could be the end of humanity.