In my two previous posts (here and here) about imitation and social cognition I wrote about experiments which showed that
1) young children tend to imitate both the necessary as well as the unnecessary actions when shown how to get at a reward, whereas wild chimpanzees only imitate the necessary actions.
And that
2) both 14-month old human infants as well as enculturated, human raised-chimpanzees tend to ‘imitate rationally.’ That is, they tend to be able to differentiate whether an agent chose a specific way of performing an action intentionally, or whether the agent was forced to performing the action in this specific manner by some constraint.

The fact that human-raised chimpanzees also show this sensitivity suggests that enculturation plays an important part in this process.
In a very interesting study, Range et al. (2007) used an experimental setup similar to that of Gergely et al. (2002) (which i described in my second post, here) to test whether other ‘enculturated’ and domesticated animals show the same kind of sensitivity: dogs.