James Lovelock’s parting words last time we met were: “Enjoy life while you can. Because if you’re lucky, it’s going to be 20 years before it hits the fan.” It was early 2008, and the distinguished scientist was predicting imminent and irreversible global warming, which would soon make large parts of the planet uninhabitably hot or put them underwater. The fashionable hope that windfarms or recycling could prevent global famine and mass migration was, he assured me, a fantasy; it was too late for ethical consumption to save us. Before the end of this century, 80% of the world’s population would be wiped out.

His predictions were not easy to forget or dismiss. Sometimes described as a futurist, Lovelock has been Britain’s leading independent scientist for more than 50 years. His Gaia hypothesis, which contends that the earth is a single, self-regulating organism, is now accepted as the founding principle of most climate science, and his invention of a device to detect CFCs helped identify the hole in the ozone layer. A defiant generalist in an era of increasingly specialised study, and a mischievous provocateur, Lovelock is regarded by many as a scientific genius.

Eight years after our previous encounter, he appears to have aged not one bit. At 97, he’s conceived a beautifully illustrated book of essays described as a “tool kit for the future”, The Earth and I, and written the introduction and conclusion; he goes walking every day, his hearing is perfect, his focus forensic and his memory unimpaired. “Yes, why not? I’m writing a fiction book at the moment. It’s tremendous fun, you know.” He applies his holistic philosophy of science to his own health. “I’m a firm believer that if you don’t use it, you lose it – and if you do a lot of walking, and if you use your muscles quite a bit, your brain seems to work as well. You’ve got to look at the whole system, not just bits of it.”

What has changed dramatically, however, is his position on climate change. He now says: “Anyone who tries to predict more than five to 10 years is a bit of an idiot, because so many things can change unexpectedly.” But isn’t that exactly what he did last time we met? “I know,” he grins teasingly. “But I’ve grown up a bit since then.”

Lovelock now believes that “CO2 is going up, but nowhere near as fast as they thought it would. The computer models just weren’t reliable. In fact,” he goes on breezily, “I’m not sure the whole thing isn’t crazy, this climate change. You’ve only got to look at Singapore. It’s two-and-a-half times higher than the worst-case scenario for climate change, and it’s one of the most desirable cities in the world to live in.”

There are various possible explanations for his change of heart. One is that Lovelock is right, and the models on which his former predictions were based were fatally flawed. Another is that his iconoclastic sensibility made revision irresistible. An incorrigible subversive, Lovelock was warning the world about climate change for decades before it began to pay attention, and just when the scientific consensus began to call for intervention to prevent it, he decided we were already too late. But there is a third explanation for why he has shifted his position again, and nowadays feels “laid back about climate change”. All things being equal – “and it’s only got to take one sizable volcano to erupt and all the models, everything else, is right off the board” – he expects that before the consequences of global warming can impact on us significantly, something else will have made our world unrecognisable, and threaten the human race.

Lovelock in 1991, with one of his books on Gaia theory. Photograph: Richard Gardner/Rex

Lovelock maintains that, unlike most environmentalists, he is a rigorous empiricist, but it is manifestly clear that he enjoys maddening the green movement. “Well, it’s a religion, really, you see. It’s totally unscientific.” He was once invited to Buckingham Palace, where he told Princess Anne: “Your brother nearly killed me.” Having read that Prince Charles had installed grass-burning boilers at Highgrove, Lovelock had tried one in his house. “It’s supposed to smoulder and keep the place warm; but it doesn’t, because it goes out, and clouds and clouds of smoke come out.” He giggles. “Princess Anne thought this was hilariously funny.”

Lovelock had been trying to heat his old mill in Devon, where he lived for more than 35 years, inventing contraptions in a workshop that resembled a Doctor Who set. He and his wife recently packed up his life’s work and downsized to a remote cottage on Chesil Beach in Dorset, after the bill to heat the mill for just six months hit £6,000. “I remember George Monbiot took me up on it and wrote that it was impossible, that I had to be lying. But I wasn’t lying, I’ve got the figures.” Monbiot doesn’t quite accuse him of lying, in fairness; just of “talking rubbish” and “making wild statements”. In any case, he says that in the US he found he could heat a house for six months, in temperatures of -20C (-4F), for just £60. As a result, he has withering contempt for environmentalists’ opposition to fracking. “You see, gas in America is incredibly cheap, because of fracking,” he says. But what about the risk of triggering earthquakes? He rolls his eyes.

“Sure enough, that’s true, there will be an increase. But they’re tiny little tremors, they would be imperceptible. The only trouble is that you can detect them. The curse of my life has been that I’ve spent a lot of time inventing devices that are exceedingly sensitive. And the moment somebody can detect something, they’re going to attach a number to it, and then they make a fuss about it.” He chuckles, then pauses. “I’m not anti-green in the sense that I’m in favour of polluting the world with every damn thing we make. I think we’ve got to be careful. But I’m afraid, human nature being what it is, the thing gets exaggerated out of all proportion, and the greens have behaved deplorably instead of being reasonably sensible.”

Even more heretical than his enthusiasm for fracking is Lovelock’s passionate support for nuclear power. But, like fracking, he says, it offers only “a stopgap” solution. “Because in the long term, they’ll use up all the uranium.” How long would that take? He pauses to do some quick mental arithmetic, as casually as I might tot up how many pints of milk to grab from Sainsburys.

“Let’s see … I think uranium that is affordable to extract would last about 50 years, something in that range. It might be 100. When you’ve used all that up, you go to thorium, and that would last you three times as long as uranium – so, shall we say, about 200 years?” The most sensible energy solution would be to cover 100 sq miles of the Sahara in solar panels. “It would supply the whole of Europe with all the energy they needed,” but it won’t happen “because it would be so easy for terrorists to go and bugger it up”. So for now, nuclear energy is the only viable option.

But all this, he clarifies cheerfully, is more or less academic. “Because quite soon – before we’ve reached the end of this century, even – I think that what people call robots will have taken over.” Robots will rule the world? “Well, yes. They’ll be in charge.” In charge of us? “Yes, if we’re still here. Whether they’ll have taken over peacefully or otherwise, I have no idea.”

For robots, time happens a million times faster than it does for us. That’s rather wonderful in a way, isn’t it?

He isn’t alone in this view: the influential philosopher Nick Bostrom has persuaded many people that artificial intelligence poses a real threat to the future of humanity; Elon Musk and Stephen Hawking, among others, have called for urgent research to mitigate the risks. Still, when Lovelock outlines this vision, his tone is so matter-of-fact that for a moment I wonder if he’s joking. He isn’t. “We’re already happily letting computers design themselves. This has been going on for some time now, particularly with chips, and it’s not going to be long before that’s out of our hands, and we’ll be standing aside and saying, ‘Oh well, it’s doing a good job designing itself, let’s encourage it.’” Computers will develop independent volition and intuition (“To some extent, they already have”) and become capable of reproducing themselves, and of evolving. “Oh yes, that’s crucial. We’ll have a world where Darwin’s working.” Darwinism doesn’t work now? “Oh no, we’ve temporarily turned Darwinism backwards. I mean, we preserve the ones that would not have survived.”

Lovelock at the University of Houston in Texas in 1962. Photograph: Donald Uhrbrock/Time & Life/Getty

He pauses, and adds quickly: “Don’t let’s get dangerous on this one. I don’t want this appearing in the Guardian that he just wants all the dumb and the lowlifes wiped out.”

Lovelock doesn’t sound the least bit troubled by the prospect of robots taking over, though, despite the possibility that they will destroy us. “Once they become at all established anywhere, that’s the end, because to robots time happens one million times faster – that’s a fairly exact figure – than it does to us. That’s rather wonderful in a way, isn’t it?”

I ask him to explain. “Well, for a neuron to travel a foot takes a microsecond – which is fairly fast. But for electrons to go down a foot of wire takes a nanosecond. It’s a million times faster, as simple as that. So to a robot, once fully established in that new world, a second is a million seconds. Everything is happening so fast that they have on earth a million times longer to live, to grow up, to evolve, than we do.”

It is possible, he goes on, that human beings may fuse with robots to become a blend of robotic and human tissue (“That’s one route”), but the likelier scenario will be pure robots. Why does he think we’ll go for all-out robots? He shoots me an amused look. “I don’t think we will. I think that they will – that’s the key thing here.”

The implications for climate change are obvious. “The world that they’re going to be comfortable in is wildly different from the one that we feel comfortable in. So once they really get established, they will – with regret – start losing organic life.” Will they care about rising temperatures? “They won’t give a fourpenny fuck about the temperature, because to them the change will be slow, and they can stand quite a big change without any fuss. They could accommodate infinitely greater change through climate change than we can, before things get tricky for them. It’s what the world can stand that is the important thing. They’re going to have a safe platform to live in, so they don’t want Gaia messed about too much.”

Notwithstanding his caveats about the dangers of predictions, his confidence in the robotic future he describes is “fairly high. Yes, all sorts of things can happen, but that’s the intuitive feeling I have”. As for our interaction with robots: “Well, it’s going to be very peculiar.” In the classic Frankenstein tradition, will humanity not understand what it has created until it’s too late? “Well, too late is the wrong word. Let’s say, until it has happened.” The phrase “too late”, he explains, implies regret – but whereas the robots might see no use for our continued existence, “maybe we’ve got some special property that they will appreciate. But then, don’t forget, their timescale is a million times different from ours. They’d have a lot of trouble talking to us.” In the same sense that we have trouble talking to ants? “Oh no, it’s much worse than that. It’s really more like us talking to a giant redwood tree. And you never know, they may feel about us the same way as we feel about trees.” They might even, I suggest, want to hug us? Lovelock’s face lights up in delight. “Yes, exactly! Exactly. That’s a good one.”

Lovelock was no less bafflingly cheerful when he believed climate change was about to wipe out 80% of the world’s population. How can he now feel just as sanguine about a global takeover by robots? “One may say: ‘Well, of course, he’s so old he’s stopped having any feelings.’ Not true, I’ll say!” He would have been, he insists, just the same 50 years ago. “And I would hate to think it was an affectation.” He would rather not be called a maverick, because it makes him sound like someone who “makes gadgets in his garage”.

“But everything in life to me is just: ‘Oh, isn’t that interesting?’”

• The Earth and I by James Lovelock et al (Taschen, £24.99) is out now. Buy it for £20.49 at bookshop.theguardian.com or call 0330 333 6846. Free UK p&p on online orders over £10. A £1.99 charge applies to telephone orders.