Ensuring the Safety of Artificial Intelligence