Max Tegmark examines how society can capture the extraordinary benefits of AI while avoiding the risks that come with systems growing more powerful and autonomous.