Reportedly, Spielberg's "A.I." screenplay was based on a lengthy treatment concocted by Kubrick and Ian Watson. According to Kubrick right-hand man (and brother-in-law) Jan Harlan, Spielberg did soften some aspects such as the character of Gigolo Joe (originally conceived as a much darker, sexual character), but the general story arc is mostly Kubrick's. There was the published account (prior to the film even being made) of Kubrick and Watson arguing over the inclusion of the "Blue Fairy" with Kubrick insisting on it even though Watson felt it was overly sentimental. The art design is mostly what Kubrick had developed for the film and, apparently, even the choice of using Ministry as the futuristic rock band was Kubrick's. Personally, I think Spielberg did a commendable job with his adaptation and would disagree that he forced a "happy ending" on the film (the fact that the human race is extinct by film's end kind of puts a damper on the supposed "feel good" denouement).