For decades, authors and filmmakers have contemplated the challenges and opportunities presented when machines take on humanlike capabilities. In…