It's hard to know where to start with Ray Kurzweil.
With the fact that he takes 150 pills a day and is intravenously injected on a weekly basis with a dizzying list of vitamins, dietary supplements, and substances that sound about as scientifically effective as face cream: coenzyme Q10, phosphatidycholine, glutathione?
With the fact that he believes that he has a good chance of living for ever? He just has to stay alive "long enough" to be around for when the great life-extending technologies kick in (he's 66 and he believes that "some of the baby-boomers will make it through"). Or with the fact that he's predicted that in 15 years' time, computers are going to trump people. That they will be smarter than we are. Not just better at doing sums than us and knowing what the best route is to Basildon. They already do that. But that they will be able to understand what we say, learn from experience, crack jokes, tell stories, flirt. Ray Kurzweil believes that, by 2029, computers will be able to do all the things that humans do. Only better.
But then everyone's allowed their theories. It's just that Kurzweil's theories have a habit of coming true. And, while he's been a successful technologist and entrepreneur and invented devices that have changed our world – the first flatbed scanner, the first computer program that could recognise a typeface, the first text-to-speech synthesizer and dozens more – and has been an important and influential advocate of artificial intelligence and what it will mean, he has also always been a lone voice in, if not quite a wilderness, then in something other than the mainstream.
And now? Now, he works at Google. Ray Kurzweil who believes that we can live for ever and that computers will gain what looks like a lot like consciousness in a little over a decade is now Google's director of engineering. The announcement of this, last year, was extraordinary enough. To people who work with tech or who are interested in tech and who are familiar with the idea that Kurzweil has popularised of "the singularity" – the moment in the future when men and machines will supposedly converge – and know him as either a brilliant maverick and visionary futurist, or a narcissistic crackpot obsessed with longevity, this was headline news in itself.
But it's what came next that puts this into context. It's since been revealed that Google has gone on an unprecedented shopping spree and is in the throes of assembling what looks like the greatest artificial intelligence laboratory on Earth; a laboratory designed to feast upon a resource of a kind that the world has never seen before: truly massive data. Our data. From the minutiae of our lives.
Google has bought almost every machine-learning and robotics company it can find, or at least, rates. It made headlines two months ago, when it bought Boston Dynamics, the firm that produces spectacular, terrifyingly life-like military robots, for an "undisclosed" but undoubtedly massive sum. It spent $3.2bn (£1.9bn) on smart thermostat maker Nest Labs. And this month, it bought the secretive and cutting-edge British artificial intelligence startup DeepMind for £242m.
And those are just the big deals. It also bought Bot & Dolly, Meka Robotics, Holomni, Redwood Robotics and Schaft, and another AI startup, DNNresearch. It hired Geoff Hinton, a British computer scientist who's probably the world's leading expert on neural networks. And it has embarked upon what one DeepMind investor told the technology publication Re/code two weeks ago was "a Manhattan project of AI". If artificial intelligence was really possible, and if anybody could do it, he said, "this will be the team". The future, in ways we can't even begin to imagine, will be Google's.
There are no "ifs" in Ray Kurzweil's vocabulary, however, when I meet him in his new home – a high-rise luxury apartment block in downtown San Francisco that's become an emblem for the city in this, its latest incarnation, the Age of Google. Kurzweil does not do ifs, or doubt, and he most especially doesn't do self-doubt. Though he's bemused about the fact that "for the first time in my life I have a job" and has moved from the east coast where his wife, Sonya, still lives, to take it.
Bill Gates calls him "the best person I know at predicting the future of artificial intelligence". He's received 19 honorary doctorates, and he's been widely recognised as a genius. But he's the sort of genius, it turns out, who's not very good at boiling a kettle. He offers me a cup of coffee and when I accept he heads into the kitchen to make it, filling a kettle with water, putting a teaspoon of instant coffee into a cup, and then moments later, pouring the unboiled water on top of it. He stirs the undissolving lumps and I wonder whether to say anything but instead let him add almond milk – not eating diary is just one of his multiple dietary rules – and politely say thank you as he hands it to me. It is, by quite some way, the worst cup of coffee I have ever tasted.
But then, he has other things on his mind. The future, for starters. And what it will look like. He's been making predictions about the future for years, ever since he realised that one of the key things about inventing successful new products was inventing them at the right moment, and "so, as an engineer, I collected a lot of data". In 1990, he predicted that a computer would defeat a world chess champion by 1998. In 1997, IBM's Deep Blue defeated Garry Kasparov. He predicted the explosion of the world wide web at a time it was only being used by a few academics and he predicted dozens and dozens of other things that have largely come true, or that will soon, such as that by the year 2000, robotic leg prostheses would allow paraplegics to walk (the US military is currently trialling an "Iron Man" suit) and "cybernetic chauffeurs" would be able to drive cars (which Google has more or less cracked).
His critics point out that not all his predictions have exactly panned out (no US company has reached a market capitalisation of more than $1 trillion; "bioengineered treatments" have yet to cure cancer). But in any case, the predictions aren't the meat of his work, just a byproduct. They're based on his belief that technology progresses exponentially (as is also the case in Moore's law, which sees computers' performance doubling every two years). But then you just have to dig out an old mobile phone to understand that. The problem, he says, is that humans don't think about the future that way. "Our intuition is linear."
When Kurzweil first started talking about the "singularity", a conceit he borrowed from the science-fiction writer Vernor Vinge, he was dismissed as a fantasist. He has been saying for years that he believes that the Turing test – the moment at which a computer will exhibit intelligent behaviour equivalent to, or indistinguishable from, that of a human – will be passed in 2029. The difference is that when he began saying it, the fax machine hadn't been invented. But now, well… it's another story.
"My book The Age of Spiritual Machines came out in 1999 and that we had a conference of AI experts at Stanford and we took a poll by hand about when you think the Turing test would be passed. The consensus was hundreds of years. And a pretty good contingent thought that it would never be done.
"And today, I'm pretty much at the median of what AI experts think and the public is kind of with them. Because the public has seen things like Siri [the iPhone's voice-recognition technology] where you talk to a computer, they've seen the Google self-driving cars. My views are not radical any more. I've actually stayed consistent. It's the rest of the world that's changing its view."
And yet, we still haven't quite managed to get to grips with what that means. The Spike Jonze film, Her, which is set in the near future and has Joaquin Phoenix falling in love with a computer operating system, is not so much fantasy, according to Kurzweil, as a slightly underambitious rendering of the brave new world we are about to enter. "A lot of the dramatic tension is provided by the fact that Theodore's love interest does not have a body," Kurzweil writes in a recent review of it. "But this is an unrealistic notion. It would be technically trivial in the future to provide her with a virtual visual presence to match her virtual auditory presence."
But then he predicts that by 2045 computers will be a billion times more powerful than all of the human brains on Earth. And the characters' creation of an avatar of a dead person based on their writings, in Jonze's film, is an idea that he's been banging on about for years. He's gathered all of his father's writings and ephemera in an archive and believes it will be possible to retro-engineer him at some point in the future.
So far, so sci-fi. Except that Kurzweil's new home isn't some futuristic MegaCorp intent on world domination. It's not Skynet. Or, maybe it is, but we largely still think of it as that helpful search engine with the cool design. Kurzweil has worked with Google's co-founder Larry Page on special projects over several years. "And I'd been having ongoing conversations with him about artificial intelligence and what Google is doing and what I was trying to do. And basically he said, 'Do it here. We'll give you the independence you've had with your own company, but you'll have these Google-scale resources.'"
And it's the Google-scale resources that are beyond anything the world has seen before. Such as the huge data sets that result from 1 billion people using Google ever single day. And the Google knowledge graph, which consists of 800m concepts and the billions of relationships between them. This is already a neural network, a massive, distributed global "brain". Can it learn? Can it think? It's what some of the smartest people on the planet are working on next.
Peter Norvig, Google's research director, said recently that the company employs "less than 50% but certainly more than 5%" of the world's leading experts on machine learning. And that was before it bought DeepMind which, it should be noted, agreed to the deal with the proviso that Google set up an ethics board to look at the question of what machine learning will actually mean when it's in the hands of what has become the most powerful company on the planet. Of what machine learning might look like when the machines have learned to make their own decisions. Or gained, what we humans call, "consciousness".
I first saw Boston Dynamics' robots in action at a presentation at the Singularity University, the university that Ray Kurzweil co-founded and that Google helped fund and which is devoted to exploring exponential technologies. And it was the Singularity University's own robotics faculty member Dan Barry who sounded a note of alarm about what the technology might mean: "I don't see any end point here," he said when talking about the use of military robots. "At some point humans aren't going to be fast enough. So what you do is that you make them autonomous. And where does that end? Terminator?"
And the woman who headed the Defence Advanced Research Projects Agency (Darpa), the secretive US military agency that funded the development of BigDog? Regina Dugan. Guess where she works now?
Kurzweil's job description consists of a one-line brief. "I don't have a 20-page packet of instructions," he says. "I have a one-sentence spec. Which is to help bring natural language understanding to Google. And how they do that is up to me."
Language, he believes, is the key to everything. "And my project is ultimately to base search on really understanding what the language means. When you write an article you're not creating an interesting collection of words. You have something to say and Google is devoted to intelligently organising and processing the world's information. The message in your article is information, and the computers are not picking up on that. So we would like to actually have the computers read. We want them to read everything on the web and every page of every book, then be able to engage an intelligent dialogue with the user to be able to answer their questions."
Google will know the answer to your question before you have asked it, he says. It will have read every email you've ever written, every document, every idle thought you've ever tapped into a search-engine box. It will know you better than your intimate partner does. Better, perhaps, than even yourself.
The most successful example of natural-language processing so far is IBM's computer Watson, which in 2011 went on the US quiz show Jeopardy and won. "And Jeopardy is a pretty broad task. It involves similes and jokes and riddles. For example, it was given "a long tiresome speech delivered by a frothy pie topping" in the rhyme category and quickly responded: "A meringue harangue." Which is pretty clever: the humans didn't get it. And what's not generally appreciated is that Watson's knowledge was not hand-coded by engineers. Watson got it by reading. Wikipedia – all of it.
Kurzweil says: "Computers are on the threshold of reading and understanding the semantic content of a language, but not quite at human levels. But since they can read a million times more material than humans they can make up for that with quantity. So IBM's Watson is a pretty weak reader on each page, but it read the 200m pages of Wikipedia. And basically what I'm doing at Google is to try to go beyond what Watson could do. To do it at Google scale. Which is to say to have the computer read tens of billions of pages. Watson doesn't understand the implications of what it's reading. It's doing a sort of pattern matching. It doesn't understand that if John sold his red Volvo to Mary that involves a transaction or possession and ownership being transferred. It doesn't understand that kind of information and so we are going to actually encode that, really try to teach it to understand the meaning of what these documents are saying."
And once the computers can read their own instructions, well… gaining domination over the rest of the universe will surely be easy pickings. Though Kurzweil, being a techno-optimist, doesn't worry about the prospect of being enslaved by a master race of newly liberated iPhones with ideas above their station. He believes technology will augment us. Make us better, smarter, fitter. That just as we've already outsourced our ability to remember telephone numbers to their electronic embrace, so we will welcome nanotechnologies that thin our blood and boost our brain cells. His mind-reading search engine will be a "cybernetic friend". He is unimpressed by Google Glass because he doesn't want any technological filter between us and reality. He just wants reality to be that much better.
"I thought about if I had all the money in the world, what would I want to do?" he says. "And I would want to do this. This project. This is not a new interest for me. This idea goes back 50 years. I've been thinking about artificial intelligence and how the brain works for 50 years."
The evidence of those 50 years is dotted all around the apartment. He shows me a cartoon he came up with in the 60s which shows a brain in a vat. And there's a still from a TV quiz show that he entered aged 17 with his first invention: he'd programmed a computer to compose original music. On his walls are paintings that were produced by a computer programmed to create its own original artworks. And scrapbooks that detail the histories of various relatives, the aunts and uncles who escaped from Nazi Germany on the Kindertransport, his great grandmother who set up what he says was Europe's first school to provide higher education for girls.
His home is nothing if not eclectic. It's a shiny apartment in a shiny apartment block with big glass windows and modern furnishings but it's imbued with the sort of meaning and memories and resonances that, as yet, no machine can understand. His relatives escaped the Holocaust "because they used their minds. That's actually the philosophy of my family. The power of human ideas. I remember my grandfather coming back from his first return visit to Europe. I was seven and he told me he'd been given the opportunity to handle – with his own hands – original documents by Leonardo da Vinci. He talked about it in very reverential terms, like these were sacred documents. But they weren't handed down to us by God. They were created by a guy, a person. A single human had been very influential and had changed the world. The message was that human ideas changed the world. And that is the only thing that could change the world."
On his fingers are two rings, one from the Massachusetts Institute of Technology, where he studied, and another that was created by a 3D printer, and on his wrist is a 30-year-old Mickey Mouse watch. "It's very important to hold on to our whimsy," he says when I ask him about it. Why? "I think it's the highest level of our neocortex. Whimsy, humour…"
Even more engagingly, tapping away on a computer in the study next door I find Amy, his daughter. She's a writer and a teacher and warm and open, and while Kurzweil goes off to have his photo taken, she tells me that her childhood was like "growing up in the future".
Is that what it felt like? "I do feel little bit like the ideas I grew up hearing about are now ubiquitous… Everything is changing so quickly and it's not something that people realise. When we were kids people used to talk about what they going to do when they were older, and they didn't necessarily consider how many changes would happen, and how the world would be different, but that was at the back of my head."
And what about her father's idea of living for ever? What did she make of that? "What I think is interesting is that all kids think they are going to live for ever so actually it wasn't that much of a disconnect for me. I think it made perfect sense. Now it makes less sense."
Well, yes. But there's not a scintilla of doubt in Kurzweil's mind about this. My arguments slide off what looks like his carefully moisturised skin. "My health regime is a wake-up call to my baby-boomer peers," he says. "Most of whom are accepting the normal cycle of life and accepting they are getting to the end of their productive years. That's not my view. Now that health and medicine is in information technology it is going to expand exponentially. We will see very dramatic changes ahead. According to my model it's only 10-15 years away from where we'll be adding more than a year every year to life expectancy because of progress. It's kind of a tipping point in longevity."
He does, at moments like these, have something of a mad glint in his eye. Or at least the profound certitude of a fundamentalist cleric. Newsweek, a few years back, quoted an anonymous colleague claiming that, "Ray is going through the single most public midlife crisis that any male has ever gone through." His evangelism (and commercial endorsement) of a whole lot of dietary supplements has more than a touch of the "Dr Gillian McKeith (PhD)" to it. And it's hard not to ascribe a psychological aspect to this. He lost his adored father, a brilliant man, he says, a composer who had been largely unsuccessful and unrecognised in his lifetime, at the age of 22 to a massive heart attack. And a diagnosis of diabetes at the age of 35 led him to overhaul his diet.
But isn't he simply refusing to accept, on an emotional level, that everyone gets older, everybody dies?
"I think that's a great rationalisation because our immediate reaction to hearing someone has died is that it's not a good thing. We're sad. We consider it a tragedy. So for thousands of years, we did the next best thing which is to rationalise. 'Oh that tragic thing? That's really a good thing.' One of the major goals of religion is to come up with some story that says death is really a good thing. It's not. It's a tragedy. And people think we're talking about a 95-year-old living for hundreds of years. But that's not what we're talking about. We're talking radical life extension, radical life enhancement.
"We are talking about making ourselves millions of times more intelligent and being able to have virtually reality environments which are as fantastic as our imagination."
Although possibly this is what Kurzweil's critics, such as the biologist PZ Myers, mean when they say that the problem with Kurzweil's theories is that "it's a very bizarre mixture of ideas that are solid and good with ideas that are crazy. It's as if you took a lot of very good food and some dog excrement and blended it all up so that you can't possibly figure out what's good or bad." Or Jaron Lanier, who calls him "a genius" but "a product of a narcissistic age".
But then, it's Kurzweil's single-mindedness that's been the foundation of his success, that made him his first fortune when he was still a teenager, and that shows no sign of letting up. Do you think he'll live for ever, I ask Amy. "I hope so," she says, which seems like a reasonable thing for an affectionate daughter to wish for. Still, I hope he does too. Because the future is almost here. And it looks like it's going to be quite a ride.
guardian.co.uk © Guardian News and Media Limited 2010
image: © Ewen Roberts