Containing a spread through sequential learning: to exploit or to explore?