The tech giant boss believes in the promise of artificial intelligence to lift human welfare, while also warning of the dangers of the powerful new tools.