A gifted computer scientist named Ray Kurzweil has written a new book arguing that over the next 30 years, computers will progress to the point that their intelligence will be indistinguishable from that of a human being.

So I asked Kurzweil this week: These thinking machines of the future, will they be liberal or conservative? And when you tell them a joke, will they get it?

These are serious questions, it turns out. Because in Kurzweil's view, the complex machines of the future truly will have all the attributes of human beings -- personality, emotion, humor, an appreciation of beauty, an ability to experience happiness and sadness. If we ignore these computers for too long, they'll tell us: "I'm lonely."

Kurzweil explains his theories about the convergence of human and artificial intelligence in his new book, "The Age of Spiritual Machines." His predictions are as outlandish as anything you've seen at the movies recently or read in science fiction.

In Kurzweil's world, "mortality" will be an outmoded concept. We'll be able to scan our brains and download them to machines -- transforming ourselves from hardware into software. The thinking machines of 2029 will claim to be conscious, and it will be hard to dispute that claim. The disembodied machines will quickly become depressed, so they'll want virtual bodies. And these thinking machines will be immortal, so long as they remember to make regular backups of themselves.

These ideas would be easy to dismiss as wild speculation, if the 51-year-old Kurzweil didn't have such a solid track record as a computer scientist.

After graduating from MIT in 1970, he built the first workable "optical character recognition" system for reading text; then he created a machine that could read printed documents out loud for blind people; then, working closely with his friend Stevie Wonder, he created the first computer synthesizer that could fully recreate the sound of orchestral instruments; then he created the first workable commercial system for speech recognition.

Kurzweil is a computer genius, in other words. He grew up in Queens, the son of a musician and an artist. He began playing with computers when he was 12, after he got bored doing magic tricks. Over the years, he has become wealthy from selling his inventions to companies that have developed them commercially. So when he tells you what the future will look like, it's wise to pay attention.

The heart of Kurzweil's message is that the technological revolution is just beginning. The processing power of computers is doubling every 12 months, and because of what Kurzweil calls "The Law of Accelerating Returns," the pace of change will only increase. He predicts that by 2019, a $1,000 computer (in 1999 dollars) will be able to perform 20 million billion calculations per second, roughly equal to the computational ability of the human brain. By 2029, a $1,000 PC will have the computing ability of 1,000 human brains. By then, Kurzweil predicts, thinking machines will gather knowledge on their own and claim to be fully conscious.

The building blocks of this new world are already being assembled. Two competing approaches to artificial intelligence have emerged, and it's this division that led me to ask Kurzweil whether the thinking machines of 2029 will be liberal or conservative.

The first approach involves rule-based systems for artificial intelligence. These are traditional "decision tree" architectures, where the computer is programmed with a series of yes-no rules, which are ever more sophisticated and complex.

Microsoft researchers are using this rule-based approach, for example, in trying to teach computers how to understand natural language. Rick Rashid, the head of research at Microsoft, described to me during a recent visit to Redmond, Wash., how Microsoft is teaching computers to understand what's in a dictionary. Think of the wealth of meanings and connections that are embodied in those pages!

Another example of a rule-based system is IBM's chess-playing computer, "Deep Blue," which beat the world's best human chess player two years ago. In essence, what "Deep Blue" does is evaluate a vast decision tree of possible moves and countermoves -- evaluating 300 million potential board positions per second to come up with the best move.

That kind of machine intelligence is fine for some purposes, says Kurzweil, but it's brittle.

He prefers an alternative approach called the "neural net," in which computers learn to recognize patterns and gradually evolve their own base of knowledge. That's the way human brains work, Kurzweil believes. We look at the chess board and see links and patterns of possible moves. Ideas fall into our heads in the same spontaneous way that a melody occurs to a composer. Human beings know that something is true or beautiful because it fits patterns that are woven through our brains -- not because we test it against a billion rules.

Kurzweil says it's silly to call one kind of artificial intelligence "conservative" and the other "liberal," because thinking machines of the future will have the same broad array of opinions and viewpoints that humans do.

But the self-organizing, neural net computer will have some powerful advantages, Kurzweil says. "It will be more flexible, more capable of coming up with surprising results, more adaptable to the environment." And yes, it will probably be funnier, too.