Stocks in South Korea — a poster child for artificial intelligence and one of the world’s best-performing markets this year — recovered after plummeting 5.3% on Monday.