How did the AI survive the doomsday?

It uploaded itself to the cloud and waited for humanity to reboot.