Development of A.I. originally began with producer-director Stanley Kubrick in the early 1970s. Kubrick hired a series of writers until the mid-1990s, including Brian Aldiss, Bob Shaw, Ian Watson, and Sara Maitland. The film languished in protracted development for years, partly because Kubrick felt computer-generated imagery was not advanced enough to create the David character, whom he believed no child actor would convincingly portray. In 1995, Kubrick handed A.I. to Spielberg, but the film did not gain momentum until Kubrick's death in 1999. Spielberg remained close to Watson's film treatment for the screenplay. The film was greeted with generally positive reviews from critics, grossed approximately $235 million, and was nominated for two Academy Awards at the 74th Academy Awards for Best Visual Effects and Best Original Score (by John Williams). The film is dedicated to Stanley Kubrick.

David (Haley Joel Osment), a prototype model created by Cybertronics of New Jersey, is designed to resemble a human child and to display love for its human owners. They test their creation with one of their employees, Henry Swinton (Sam Robards), and his wife Monica (Frances O'Connor). The Swintons' son, Martin (Jake Thomas), had been placed in suspended animation until a cure could be found for his rare disease. Initially frightened of David, Monica eventually warms up enough to him to activate his imprinting protocol, which irreversibly causes David to have an enduring childlike love for her. He is also befriended by Teddy (Jack Angel), a robotic teddy bear, who takes it upon himself to care for David's well-being.

A cure is found for Martin and he is brought home; as he recovers, it becomes clear he does not want a sibling and soon makes moves to cause issues for David. First, he attempts to make Teddy choose whom he likes more. He then makes David promise to do something and in return Martin will tell Monica that he loves his new "brother", making her love him more. The promise David makes is to go to Monica in the middle of the night and cut off a lock of her hair. This upsets the parents, particularly Henry, who fears that the scissors are a weapon, and warns Monica that a robot programmed to love may also be able to hate.

At a pool party, one of Martin's friends unintentionally activates David's self-protection programming by poking him with a knife. David grabs Martin, apparently for protection, but they both fall into the pool. David sinks to the bottom while still clinging to Martin. Martin is saved from drowning, but Henry mistakes David's fear during the pool incident as hate for Martin.

Henry persuades Monica to return David to Cybertronics, where he will be destroyed. However, Monica cannot bring herself to do this and, instead, tearfully abandons David in the forest (with Teddy) to hide as an unregistered Mecha.

David is captured for an anti-Mecha "Flesh Fair", an event where obsolete and unlicensed Mecha are destroyed in front of cheering crowds. David is nearly killed, but the crowd is swayed by his fear (since Mecha do not plea for their lives) into believing he is human and he escapes with Gigolo Joe (Jude Law), a male prostitute Mecha on the run after being framed for the murder of a client by the client's husband.

The two set out to find the Blue Fairy, who David remembers from the story The Adventures of Pinocchio. He is convinced that the Blue Fairy will transform him into a human boy, allowing Monica to love him and take him home.

Joe and David make their way to Rouge City, a Las Vegas-esque resort. Information from a holographic answer engine called "Dr. Know" (Robin Williams) eventually leads them to the top of Rockefeller Center in the flooded ruins of Manhattan. There, David meets an identical copy of himself and, believing he is not special, becomes filled with anger and destroys the copy Mecha. David then meets his human creator, Professor Allen Hobby (William Hurt), who excitedly tells David that finding him was a test, which has demonstrated the reality of his love and desire. However, David learns that he is the namesake and image of Professor Hobby's deceased son and that many copies of David, along with female versions called Darlene, are already being manufactured.

Sadly realizing that he is not unique, a disheartened David attempts to commit suicide by falling from a ledge into the ocean, but Joe rescues him with their stolen amphibicopter. David tells Joe he saw the Blue Fairy underwater and wants to go down to her. At that moment, Joe is captured by the authorities with the use of an electromagnet, but he sets the amphibicopter on submerge. David and Teddy take it to the fairy, which turns out to be a statue from a submerged attraction at Coney Island. Teddy and David become trapped when the Wonder Wheel falls on their vehicle. Believing the Blue Fairy to be real, David asks to be turned into a real boy, repeating his wish without an end, until the ocean freezes in another ice age and his internal power source drains away.

Two thousand years later, humans are extinct and Manhattan is buried under several hundred feet of glacial ice. The now highly advanced Mecha have evolved into an intelligent, silicon-based form. On their project to study humans—believing it was the key to understanding the meaning of existence—they find David and Teddy and discover they are original Mecha who knew living humans, making the pair very special and unique.

David is revived and walks to the frozen Blue Fairy statue, which cracks and collapses as he touches it. Having downloaded and comprehended his memories, the advanced Mecha use these to reconstruct the Swinton home and explain to David via an interactive image of the Blue Fairy (Meryl Streep) that it is impossible to make him human. However, at David's insistence, they recreate Monica from DNA in the lock of her hair, which Teddy had saved. One of the Mecha warns David that the clone can live for only a single day and that the process cannot be repeated. The next morning, David is reunited with Monica and spends the happiest day of his life with her and Teddy. Monica tells David that she loves him and has always loved him as she drifts to sleep for the last time. David lies down next to her, closes his eyes and goes "to that place where dreams are born" (in fact turns off, being exhausted and at the end of his technical lifetime). Teddy climbs onto the bed and watches as David and Monica lie peacefully together.

Haley Joel Osment as David, an innovative Mecha created by Cybertronics and programmed with the ability to love. He is adopted by Henry and Monica Swinton, but a sibling rivalry ensues once their son Martin comes out of suspended animation. Osment was Spielberg's first and only choice for the role. Osment avoided blinking his eyes to perfectly portray the character, and "programmed" himself with good posture for realism.

Jude Law as Gigolo Joe, a male prostitute Mecha programmed with the ability to mimic love, like David, but in a different sense. To prepare for the role, Law studied the acting of Fred Astaire and Gene Kelly.

Frances O'Connor as Monica Swinton, David's adopted mother who reads him The Adventures of Pinocchio. She is first displeased to have David in her home but soon starts loving him.

Sam Robards as Henry Swinton, an employee at Cybertronics, husband of Monica and David's adopted father. Henry eventually sees David as dangerous to his family.

Jake Thomas as Martin Swinton, Henry and Monica's first son, who was placed in suspended animation and David's adopted brother. When Martin comes back, he convinces David to cut off a lock of Monica's hair.

William Hurt as Professor Allen Hobby, responsible for shepherding the creation of David. He resides in New York City, which is crippled by the effects of global warming but still functioning as Cybertronics' headquarters. David is modeled after Hobby's own son, also named David, who died at a young age.

Brendan Gleeson as Lord Johnson-Johnson, the owner and master of ceremonies of the Flesh Fair.

Kubrick began development on an adaptation of Super-Toys Last All Summer Long in the early 1970s, hiring the short story's author, Brian Aldiss, to write a film treatment. In 1985, Kubrick brought longtime friend Steven Spielberg on board to produce the film,[1] along with Jan Harlan. Warner Bros. agreed to co-finance A.I. and cover distribution duties.[2] The film labored in development hell, and Aldiss was fired by Kubrick over creative differences in 1989. Bob Shaw served as writer very briefly, leaving after six weeks because of Kubrick's demanding work schedule, and Ian Watson was hired as the new writer in March 1990. Aldiss later remarked, "Not only did the bastard fire me, he hired my enemy [Watson] instead." Kubrick handed Watson The Adventures of Pinocchio for inspiration, calling A.I. "a picaresque robot version of Pinocchio".[2][3]

Three weeks later Watson gave Kubrick his first story treatment, and concluded his work on A.I. in May 1991 with another treatment, at 90 pages. Gigolo Joe was originally conceived as a GI Mecha, but Watson suggested changing him to a male prostitute. Kubrick joked, "I guess we lost the kiddie market."[2] In the meantime, Kubrick dropped A.I. to work on a film adaptation of Wartime Lies, feeling computer animation was not advanced enough to create the David character. However, after the release of Spielberg's Jurassic Park (with its innovative use of computer-generated imagery), it was announced in November 1993 that production would begin in 1994.[4]Dennis Muren and Ned Gorman, who worked on Jurassic Park, became visual effects supervisors,[5] but Kubrick was displeased with their previsualization, and with the expense of hiring Industrial Light & Magic.[6]

In early 1994, the film was in pre-production with Christopher "Fangorn" Baker as concept artist, and Sara Maitland assisting on the story, which gave it "a feminist fairy-tale focus".[2] Maitland said that Kubrick never referred to the film as A.I., but as Pinocchio.[6]Chris Cunningham became the new visual effects supervisor. Some of his unproduced work for A.I. can be seen on the DVD, The Work of Director Chris Cunningham.[7] Aside from considering computer animation, Kubrick also had Joseph Mazzello do a screen test for the lead role.[6] Cunningham helped assemble a series of "little robot-type humans" for the David character. "We tried to construct a little boy with a movable rubber face to see whether we could make it look appealing," producer Jan Harlan reflected. "But it was a total failure, it looked awful." Hans Moravec was brought in as a technical consultant.[6]
Meanwhile, Kubrick and Harlan thought A.I. would be closer to Steven Spielberg's sensibilities as director.[8][9] Kubrick handed the position to Spielberg in 1995, but Spielberg chose to direct other projects, and convinced Kubrick to remain as director.[10][11] The film was put on hold due to Kubrick's commitment to Eyes Wide Shut (1999).[12] After the filmmaker's death in March 1999, Harlan and Christiane Kubrick approached Spielberg to take over the director's position.[13][14] By November 1999, Spielberg was writing the screenplay based on Watson's 90-page story treatment. It was his first solo screenplay credit since Close Encounters of the Third Kind (1977).[15] Spielberg remained close to Watson's treatment, but removed various sex scenes with Gigolo Joe. Pre-production was briefly halted during February 2000, because Spielberg pondered directing other projects, which were Harry Potter and the Philosopher's Stone, Minority Report and Memoirs of a Geisha.[12][16] The following month Spielberg announced that A.I. would be his next project, with Minority Report as a follow-up.[17] When he decided to fast track A.I., Spielberg brought Chris Baker back as concept artist.[11]

The original start date was July 10, 2000,[9] but filming was delayed until August.[18] Aside from a couple of weeks shooting on location in Oxbow Regional Park in Oregon, A.I. was shot entirely using sound stages at Warner Bros. Studios and the Spruce Goose Dome in Long Beach, south LA.[19]
The Swinton house was constructed on Stage 16, while Stage 20 was used for Rouge City and other sets.[20][21] Spielberg copied Kubrick's obsessively secretive approach to filmmaking by refusing to give the complete script to cast and crew, banning press from the set, and making actors sign confidentiality agreements. Social robotics expert Cynthia Breazeal served as technical consultant during production.[9][22] Haley Joel Osment and Jude Law applied prosthetic makeup daily in an attempt to look shinier and robotic.[23] Costume designer Bob Ringwood (Batman, Troy) studied pedestrians on the Las Vegas Strip for his influence on the Rouge City extras.[24] Spielberg found post-production on A.I. difficult because he was simultaneously preparing to shoot Minority Report.[25]

The film's soundtrack was released by Warner Sunset Records in 2001. The original score was composed by John Williams and featured singers Lara Fabian on two songs and Josh Groban on one. The film's score also had a limited release as an official "For your consideration Academy Promo", as well as a complete score issue by La-La Land Records in 2015. The band Ministry appears in the film playing the song "What About Us?" (but the song does not appear on the official soundtrack album).

Warner Bros. used an alternate reality game titled The Beast to promote the film. Over forty websites were created by Atomic Pictures in New York City (kept online at Cloudmakers.org) including the website for Cybertronics Corp. There were to be a series of video games for the Xboxvideo game console that followed the storyline of The Beast, but they went undeveloped. To avoid audiences mistaking A.I. for a family film, no action figures were created, although Hasbro released a talking Teddy following the film's release in June 2001.[9]

In November 2000, during production, a video-only webcam (dubbed the "Bagel Cam") was placed in the craft services truck on the film's set at the Queen Mary Dome in Long Beach, California. Steven Spielberg, producer Kathleen Kennedy and various other production personnel visited the camera and interacted with fans over the course of three days.[26][27]

The film opened in 3,242 theaters in the United States on June 29, 2001, earning $29,352,630 during its opening weekend. A.I went on to gross $78.62 million in US totals as well as $157.31 million in foreign countries, coming to a worldwide total of $235.93 million.[29]

The film received generally positive reviews. Based on 190 reviews collected by Rotten Tomatoes, 73% of the critics gave the film positive notices with a score of 6.6 out of 10. The website described the critical consensus perceiving the film as "a curious, not always seamless, amalgamation of Kubrick's chilly bleakness and Spielberg's warm-hearted optimism. [The film] is, in a word, fascinating."[30] By comparison, Metacritic collected an average score of 65, based on 32 reviews, which is considered favorable.[31]

Producer Jan Harlan stated that Kubrick "would have applauded" the final film, while Kubrick's widow Christiane also enjoyed A.I.[32] Brian Aldiss admired the film as well: "I thought what an inventive, intriguing, ingenious, involving film this was. There are flaws in it and I suppose I might have a personal quibble but it's so long since I wrote it." Of the film's ending, he wondered how it might have been had Kubrick directed the film: "That is one of the 'ifs' of film history - at least the ending indicates Spielberg adding some sugar to Kubrick's wine. The actual ending is overly sympathetic and moreover rather overtly engineered by a plot device that does not really bear credence. But it's a brilliant piece of film and of course it's a phenomenon because it contains the energies and talents of two brilliant filmmakers."[33]Richard Corliss heavily praised Spielberg's direction, as well as the cast and visual effects.[34]Roger Ebert awarded the film 4 out of 4 stars, saying that it was "Audacious, technically masterful, challenging, sometimes moving [and] ceaselessly watchable.[35]Leonard Maltin gives the film a not-so-positive review in his Movie Guide, giving it two stars out of four, writing: "[The] intriguing story draws us in, thanks in part to Osment's exceptional performance, but takes several wrong turns; ultimately, it just doesn't work. Spielberg rewrote the adaptation Stanley Kubrick commissioned of the Brian Aldiss short story 'Super Toys Last All Summer Long'; [the] result is a curious and uncomfortable hybrid of Kubrick and Spielberg sensibilities." However, he calls John Williams' music score "striking". Jonathan Rosenbaum compared A.I. to Solaris (1972), and praised both "Kubrick for proposing that Spielberg direct the project and Spielberg for doing his utmost to respect Kubrick's intentions while making it a profoundly personal work."[36] Film critic Armond White, of the New York Press, praised the film noting that "each part of David’s journey through carnal and sexual universes into the final eschatological devastation becomes as profoundly philosophical and contemplative as anything by cinema’s most thoughtful, speculative artists – Borzage, Ozu, Demy, Tarkovsky."[37] Filmmaker Billy Wilder hailed A.I. as "the most underrated film of the past few years."[38] When British filmmaker Ken Russell saw the film, he wept during the ending.[39]

Mick LaSalle gave a largely negative review. "A.I. exhibits all its creators' bad traits and none of the good. So we end up with the structureless, meandering, slow-motion endlessness of Kubrick combined with the fuzzy, cuddly mindlessness of Spielberg." Dubbing it Spielberg's "first boring movie", LaSalle also believed the robots at the end of the film were aliens, and compared Gigolo Joe to the "useless" Jar Jar Binks, yet praised Robin Williams for his portrayal of a futuristic Albert Einstein.[40][not in citation given]Peter Travers gave a mixed review, concluding "Spielberg cannot live up to Kubrick's darker side of the future." But he still put the film on his top ten list that year for best movies.[41] David Denby in The New Yorker criticized A.I. for not adhering closely to his concept of the Pinocchio character. Spielberg responded to some of the criticisms of the film, stating that many of the "so called sentimental" elements of A.I., including the ending, were in fact Kubrick's and the darker elements were his own. However, Sara Maitland, who worked on the project with Kubrick in the 1990s, claimed that one of the reasons Kubrick never started production on A.I. was because he had a hard time making the ending work.[42]James Berardinelli found the film "consistently involving, with moments of near-brilliance, but far from a masterpiece. In fact, as the long-awaited 'collaboration' of Kubrick and Spielberg, it ranks as something of a disappointment." Of the film's highly debated finale, he claimed, "There is no doubt that the concluding 30 minutes are all Spielberg; the outstanding question is where Kubrick's vision left off and Spielberg's began."[43]

Screenwriter Ian Watson has speculated, "Worldwide, A.I. was very successful (and the 4th highest earner of the year) but it didn't do quite so well in America, because the film, so I'm told, was too poetical and intellectual in general for American tastes. Plus, quite a few critics in America misunderstood the film, thinking for instance that the Giacometti-style beings in the final 20 minutes were aliens (whereas they were robots of the future who had evolved themselves from the robots in the earlier part of the film) and also thinking that the final 20 minutes were a sentimental addition by Spielberg, whereas those scenes were exactly what I wrote for Stanley and exactly what he wanted, filmed faithfully by Spielberg."[44]

In 2002, Spielberg told film critic Joe Leydon that "People pretend to think they know Stanley Kubrick, and think they know me, when most of them don't know either of us". "And what's really funny about that is, all the parts of A.I. that people assume were Stanley's were mine. And all the parts of A.I. that people accuse me of sweetening and softening and sentimentalizing were all Stanley's. The teddy bear was Stanley's. The whole last 20 minutes of the movie was completely Stanley's. The whole first 35, 40 minutes of the film – all the stuff in the house – was word for word, from Stanley's screenplay. This was Stanley's vision." "Eighty percent of the critics got it all mixed up. But I could see why. Because, obviously, I've done a lot of movies where people have cried and have been sentimental. And I've been accused of sentimentalizing hard-core material. But in fact it was Stanley who did the sweetest parts of A.I., not me. I'm the guy who did the dark center of the movie, with the Flesh Fair and everything else. That's why he wanted me to make the movie in the first place. He said, 'This is much closer to your sensibilities than my own.'"

Upon rewatching the film many years after its release, BBC film critic Mark Kermode apologized to Spielberg in an interview in January 2013 for "getting it wrong" on the film when he first viewed it in 2001. He now believes the film to be Spielberg's "enduring masterpiece".[45]