In several direct references to events that run parallel to the Pinnochio narrative, the 2001 film, A.I. Artificial Intelligence by Stephen Spielberg tells the story of a robot who wants to become a real boy and be loved by his mother. The events in the film stretch over a 2000 year span and highlights a state of emotion in robots that would otherwise - by today's standard of computer machinery - be considered irrational. Even with artificial 'intelligence' the robot-child is unable to understand his design purpose and the emotional 'need' - in fact part of the programming that has been unlocked by code - would be described as singularly obsessive. Ultimately there are clear limits to this version of artificial intelligence if the robot cannot self-realise. See this for a further commentary on the film.
The film is based on the Brian Aldiss short story entitled Super-Toys Last All Summer Long. Both the film and the short story take an interesting look at the subject, and highlight the ethical aspect around how desirable it is to try to build complex 'emotional' responses into machinery, and whether this is always likely to be fraught with shortcomings. Click here to read the story.