Mathematician John E. McCarthy, the Spencer T. Olin Professor in Arts & Sciences, writes about how artificial intelligence can help to predict — and hopefully help humans prevent — worst-case scenarios, such as the failure of the internet or electrical grid.