A.I is based on a short story by Brian Aldiss called Supertoys Las All Summer Long. I found a transcript of the story in an old issue of Wired. There’s also an article about the movie and some of Kubrick’s plans. I probably came accross this stuff a couple years ago when I was doing a project on Kubrick, I remember reading about A.I. back then.