Stanley Kubrick had originally envisioned a robot playing the lead role in A.I., but the part went to a human star Haley Joel Osment because Kubrick couldn't create a lovable enough machine.

Initially, "he didn't want to use a real boy because it took so long to make his movies, he felt the youngster would outgrow the role," said A.I. executive producer Jan Harlan. 

"Instead, he poured a lot of money into building a robot boy. But he failed miserably to come up with anything that he felt audiences would actually believe was capable of loving and being loved." 

When Kubrick began developing A.I., two decades ago, the concept of a machine endowed with artificial intelligence was still largely a twinkle in the eye of science fiction writers. 

Ten years later, Kubrick decided the character could instead be created through digital effects, Harlan said. 

"We did a lot of tests and he wasn't pleased with them," Harlan said. 

In the meantime, Kubrick became convinced Steven Spielberg should direct his script and invited the director to his home in England, where he showed him hundreds of production drawings. 

Spielberg finally agreed to take over after Kubrick's death "and decided effects wouldn't have been as good as using a real boy," Harlan said. 

"I think Stanley would agree if he could see the final result."

For more news, entertainment and sports coverage, click here for NYPost.com.