Recording the activity of animals as they migrate or forage has proven hugely advantageous to understanding how animals use their environment. Where animals cannot be directly observed, the problem remains of how to identify distinct behaviours that represent an animal's decision-making process. An excellent example of this problem is that of foraging penguins, which travel to sea to find prey to provision their young. Without direct sampling of the prey field, we cannot calibrate patterns of movement with prey capture, and therefore we cannot determine how different activities link to decision-making. To overcome this, we use a hidden markov model (HMM), which is a machine-learning technique that seeks to identify the underlying states of a system from observable outputs. We apply HMM to determine classes of behaviour from repetitive dives. We take dive data from 103 breeding macaroni penguins at Bird Island, South Georgia, for which we have measures of weight gain over a trip. We identify two classes of behaviour; those of short-shallow and long-deep dives. Using these two behaviours, we calculate the transition probabilities between these states and analyse these data to determine what predicts variation in the transition probabilities. We found that the stage of reproduction during a season, the sex and year of an individual influenced the probability of transition between long-deep and short-shallow sequential dives. We also found differences in the hourly transition rates between the four reproductive stages (incubation, broodguard, crèche and premoult) over a daily cycle. We conclude that this application of HMMs for behavioural switching is potentially useful for other species and other types of recorded behaviour.