Oil-rich nations are turning from oil to artificial intelligence to diversify their economies.