Ecommerce group’s advances in artificial intelligence have boosted its shares more than 40% this year