One role of artificial intelligence is to predict future events after learning from many previous observations. In materials science, various phenomena (such as crack nucleation) are difficult to predict because they have been insufficiently observed. Furthermore, observation is difficult, precisely because their location cannot be predicted, leading to a chicken and egg conundrum. This paper applies machine learning to the search for twin nucleation sites in a magnesium alloy, in an attempt to guide the observation of twin nucleation events in a microscope based on previous observations. As more data is obtained, the accuracy of the location prediction will increase. In the current case, the machine-learning tool achieved 85% accuracy for predicting the location of twin interactions with grain boundaries after several thousand observations. The resultant framework provides the first step towards an intelligent microscopy for efficient observation of stochastic events during in situ microscopy campaigns.