Gates published a nearly 6,000-word essay warning that the world is entering a "turbulent" period of AI.