On paper, "I, Robot" should qualify as one of those ill-conceived literary adaptations at which Hollywood excels. This bastardization of Isaac Asimov short stories nods toward the science-fiction master only in the most cursory fashion, appropriating a plot point here and a couple of characters there in the service of an otherwise formulaic action thriller.

But as unlikely as it sounds, the whole thing works, for the most part thanks to the always-appealing presence of Will Smith, but also due to the lively, imaginative but judiciously restrained direction of Alex Proyas ("The Crow," "Dark City"). Asimov purists looking for a faithful visualization of the seminal 1950s sci-fi parables should check such expectations at the multiplex door. "I, Robot" doesn't do for the eponymous book what "Blade Runner" did for Philip K. Dick's "Do Androids Dream of Electric Sheep?" But it does succeed on its own terms as an entertaining mid-season popcorn movie that gives Smith a chance to maximize his considerable talents as a leading man. "I, Robot" doesn't swing for the rafters, and therein lies its modest but undeniable strength.

The year is 2035 and Chicago police detective Del Spooner (Smith) is called to investigate the apparent suicide of robotics pioneer Alfred Lanning (James Cromwell). Loosely based on the Asimov character Elijah Bailey, Spooner is something of a Luddite. At a time when robots have taken over the most menial jobs and sartorial habits tend toward anything in black pleather, the hotshot policeman spurns the help of computerized servants and wears such vintage footwear as Converse All-Stars. (One of the film's wittiest subtexts is that most of the antiques are circa 2004.)

Spooner immediately suspects that one of Lanning's creations had a mechanized hand in his death. Soon he's on the trail of a particular robot, nicknamed Sonny, who leads Spooner on a high-tech goose chase. (In addition to Lanning, Asimov fans will recognize the three robot laws, which specify, among other things, that robots must always obey and never harm a human being.)

Perhaps because it's Chicago, many of those chases look as if they're conducted in the connector between United terminals at O'Hare airport; Proyas has done a good job of making the future look distinct without being completely unrecognizable. And at a time in cinematic history when building a new-looking robot is next to impossible, in Sonny he has succeeded in devising a creature that, although undoubtedly mechanical in its origins, still manages to exude emotions in its Kabuki mask of a face. (Sonny is the creation of both digital effects and actor Alan Tudyk, whose silky voice is reminiscent of C-3PO's in "Star Wars.")

From a terrific scene in which Spooner searches for his quarry amid rows of neatly arranged identical robots to a HAL-like supercomputer that looks like an animated Chuck Close portrait, "I, Robot" is full of visually arresting answers to the challenge of establishing memorable, sympathetic individuals in an otherwise homogeneous cast of characters.

Although events in "I, Robot" eventually call for thousands of robots to swing through Chicago's urban canyons like so many computerized Spider-Men, and although Smith is given plenty of car chases, showdowns and death-defying predicaments to show off his signature brand of offhand derring-do, the movie at its core has to do with relationships. Not only does Spooner strike up a teasingly romantic friendship with psychologist Susan Calvin (Bridget Moynahan), but he begins to examine the roots of his own antipathy toward robots. As viewers are given more insight into this side of Spooner's story, what at first seems to be a rather obvious allegory about slavery and racism takes on deeper psychological meaning. For his part, Sonny, too, has dreams, only they're not of electric sheep (or are they?).

But, as Proyas and screenwriters Jeff Vintar and Akiva Goldsman ensure, things never get too deep in "I, Robot." Indeed, things are kept just superficial enough to make sure that Smith can glide smoothly among the film's changing moods of action, drama, comedy and romance. It takes an actor of supreme skill to pull off such tonal shifts, and Smith does so with attractive nonchalance. Whether he's brooding like a neo-noir antihero or responding to certain death with an unstudied wisecrack, his confidence never lapses into self-regard. Smith makes it look easy, but underneath the physical high jinks and slick veneer of "I, Robot" lies a performance of real discipline and intelligence.

I, Robot (114 minutes, at area theaters) is rated PG-13 for intense stylized action and some brief partial nudity.

The robot Sonny provides a clue to Detective Del Spooner (Will Smith) and Susan Calvin (Bridget Moynahan) in the thriller "I, Robot."As a Chicago detective in 2035, Will Smith rides this vehicle with his usual skill and appeal.