In the context of an imitation game, 12- and 18-month-old infants saw an adult do such things as make a toy mouse hop across a mat (with sound effects). In one condition (House), the adult ended by placing the mouse in a toy house, whereas in another condition (No House) there was no house present at the final location. Infants at both ages usually simply put the mouse in the house (ignoring the hopping motion and sound effects) in the House condition, presumably because they interpreted the adult's action in terms of this final goal and so ignored the behavioral means. In contrast, infants copied the adult's action (both the hopping motion and the sound effects) when no house was present, presumably because here infants saw the action itself as the adult's only goal. From very early, infants’ social learning is flexible: infants focus on and copy either the end or the means of an adult action as required by the context.