The film, based on a screenplay Kubrick was developing before his death, stars Law in the role of Gigolo Joe opposite another, even younger actor: Haley Joel Osment, the boy who saw dead people in The Sixth Sense. It is set in a future where the ice-caps have melted and humans rely on the artificial intelligence (the AI of the title) of robots to manage what remains of the earth.