We are doomed. Our best efforts to reproduce, to conserve, protect and survive will, in the end, come to nought. We could sort out climate change, dispose of our nuclear arsenals, ban research into killer AIs, and still the end would come, as surely as night follows day.

The problem is physics itself. Our home – our planet, our Solar System and indeed our entire Universe – has a finite lifespan. All that is will be destroyed, either in fire or, as observations suggest now seems more likely, in a lingering, depressing ‘heat death’. The stars will all go out, and the expanding cosmos will be no more than a colossal, black and freezing void in which nothing of interest ever happens again. The laws of nature insist upon it.

Or do they? Human ingenuity has carried us a long way before now. What’s more, any final cosmic calamity is likely to be a very long way into the future. We have time to prepare.

It strikes me, then, that a Save the Universe Project might not be such a fanciful idea. Just as, in the end, the only sustainable solution to climate change might well require us to venture great engineering projects on a planetary scale, the task of engineering a viable home of thought that will last an eternity will fall to our distant descendants – or to other intelligent beings that might share our universe. The cosmic threats to intelligence are too vast and remote for us to tackle now – but we can start scouting the territory, and seeing the shape of possible solutions.

To understand how the Universe could be engineered to remain life-friendly for eternity, we need to understand what the fate of the cosmos would be if no one tried to interfere. Let’s start with home.

Earth is about 4,600 million years old, roughly the same age as our Sun and the rest of the Solar System. Our planet has been home to life for 3 billion years and to humans for 200,000. Right now, the Sun, the source of almost all our heat and light, is about halfway through its life. This might seem to suggest that the story of life on Earth has more than 4 billion years to run. But this is not so.

As the Sun consumes its hydrogen fuel, it will get hotter. Eventually this natural stellar warming will sterilise our planet. Earth currently lies in our System’s ‘Goldilocks Zone’, a narrow band in which temperatures are just right: high enough for water not to freeze (for the most part) and low enough for it not to boil. In a billion years, we will find ourselves near the inner edge of the zone. Temperatures will climb a few degrees per millennium. This process will be accelerated by the natural feedback loop of global warming, as the oceans start to evaporate and gigatonnes of water vapour, a potent greenhouse gas, enter the atmosphere.

The senile Sun will bloat and expand, searing our planet’s surface until even the rock glows red. Earth’s story is over

A few hundred million years hence, large parts of the Earth will be uninhabitable. The Equatorial seas will be a sterile bath nudging 80°C/176°F. What this means is that, rather disappointingly, life’s journey on Earth is already three-quarters done. This fact was only recently appreciated. You might want to sit with it for a moment.

Right to the last, life will adapt magnificently. But in the end, the final great extinction event will get the better of it. In a billion years, our planet will be a hot, humid hell, riven by searing hurricanes, its continents mostly desert. From space, it will no longer be a pretty blue-green ball but a yellowish orb, a glint of bare rock around the equator, the skies full of dust. By 1,200,000,000AD, in a strange symmetry, the ancient Earth will start to resemble its own earliest self. No animals, no plants: just a few hardy bacteria eking out a precarious existence in superheated saline pools. Eventually the remaining seas will boil. The senile Sun will bloat and expand, engulfing Mercury and Venus and searing our planet’s surface until even the rock glows red. The Earth’s story is over.

But that needn’t be the end of life in the Universe.

Let us assume that our planet is not unique; that intelligent life is fairly common. Our Sun will not be the last star to die. Recent findings from NASA’s Kepler Space Telescope suggest that there might be as many as a billion Earth-like planets in the Milky Way alone. There is time left for countless civilisations to rise and fall, long after the death of old Earth.

No refuge is permanent, of course. In time, the stars – all septillion of them (in the observable universe) – will stop shining. Big, hot stars such as our Sun consume hydrogen fuel in periods ranging from a few tens of millions of years to a few billion. New generations of such stars will be born long after ours runs amok. But eventually, the Universe’s supply of accessible free hydrogen will run out. The last survivors will be the red dwarfs, the commonest of stars. The remarkable thing about red dwarfs is their longevity. Some will last 20 trillion years – 4,000 times longer than our Sun. Any planets orbiting red dwarfs (and we know there are plenty of them) will, potentially, have heat and light to allow life of some kind to exist for that long.

But even red dwarfs are mortal. In 100 trillion years, the very last generation of hydrogen-burning astral bodies will have been born from the few remaining gas clouds. By 200 trillion AD the last stars will go out. From now on, the Universe is almost black and impossibly cold. Life, if any survives, will have fallen on hard times indeed.

Now we move into more uncharted waters. It is worth saying here that we are still not entirely sure what the ultimate fate of the cosmos might be. It used to be thought that there was enough matter (including dark matter) and energy in the Universe for its combined gravitational pull to slow down the cosmic expansion, bring it to a halt and eventually bring all the stars back together again in a reverse-rerun of the Big Bang – the so-called Big Crunch. In fact, there doesn’t seem to be quite enough stuff for this to happen. But there are other, disastrous, possibilities.

In 1999, Robert Caldwell, a physicist at Dartmouth College in New Hampshire, pointed out that dark energy, which propels the Universe’s expansion, might one day be much stronger. According to some calculations, a stronger version of dark energy, called phantom energy, could literally tear apart the entire Universe, atom by atom – a disaster called the Big Rip. This could happen as ‘soon’ as 20 billion years from now.

But let us for the sake of argument assume that there are no crunches or rips in our future. The downside of this relatively gentle scenario is that the future will be an impossibly gloomy and boring place. As Professor Martin Rees, the Astronomer Royal put it to me: ‘If the cosmic acceleration continues … the observable universe gets emptier and more lonely. Distant galaxies will not only move further away, but recede faster and faster until they disappear.’

The Universe will end, not with a bang, but with a whimper, 10 googol years from now

As the galaxies vanish over each other’s horizons, and after the last red dwarfs die, the cosmos will be ruled by strange, even dimmer entities – ‘brown dwarfs’, lone, Jupiter-sized planets that never got hot enough to turn into stars. The heat of their interiors could keep a civilisation going for a billion billion years. Then there are the white-dwarf remnants of old dead stars, and ‘degenerate’ monsters – the black holes and neutron stars. Across swathes of space bigger than our Milky Way, the brightest objects will glow with the same energy as a 40-watt electric light bulb.

By the time the Universe is a quadrillion quadrillion years old, the only power sources will be the remnants of stars and planets. Their very protons, the core building blocks of matter, will start to decay, releasing tiny puffs of energy. But even these last outposts on Eternity Road will, in the end, crumble. Entropy will win. The Universe will end, not with a bang, but with a whimper, maybe 10 googol years from now (a googol is a one with 100 noughts after it).

That is, if no one tries to do anything about it.

So, what can be done? Should life surrender to its sad, entropic fate, or should we (for ‘we’ are the only entities we know of who might be able to make a difference) at least begin to think about postponing – perhaps indefinitely – the death of the only home we have? It sounds ridiculous, and out of keeping with the current philosophy to ‘leave nature be’. But the truth is, we face eternal annihilation if we do nothing.

We can certainly delay our demise in our Solar System. As the Sun warms, we could move outwards – to the conveniently placed Mars, or to the moons of Jupiter or Saturn. A billion years’ hence, a balmy Mars will be as warm as Earth is today. Three billion years on, and Titan, Saturn’s icy companion, might be a mild, watery paradise with a thick atmosphere and none of the deadly radiation that afflicts Jupiter’s inner moons.

If we find that we are terribly attached to dear old Earth we could simply move it into a new orbit. Propelling asteroids or comets at near-miss distance would allow us to use their gravitational pull to act as a celestial tugboat, dragging the Earth out of the fiery clutches of our Sun.

But that just buys us time – 3 or 4 billion years. Note that no one is assuming that anything resembling humans will be alive then. I am talking about our successors – either a replacement species, or possibly sentient machine intelligences that have taken over from thinking meat. Either way, we, or they, will need to find a new home.

By then our descendants might have found common cause with extrasolar alien intelligences, assuming they exist. Far-seeing minds will know, as we do, that not even the red and brown dwarfs will last forever. From now on, the battle will not be against the heat of dying suns, but against cold. With no stars, any lifeforms or machines will have to find new ways of powering themselves and their civilisations.

Lack of resources will be a huge issue – on the cosmic scale just as it is here on Earth today. Even with no phantom energy, the rate at which the Universe is expanding will keep accelerating. That’s bad news, according to Fred Adams, an astrophysicist at the University of Michigan who has written extensively about the long-term fate of the Universe: in time, the vast bulk of matter and energy that we can theoretically access will simply disappear over our event horizon. The riches of the cosmos will be causally disconnected from ‘our’ backwater forever. ‘This isolation imposes important restrictions on resources,’ Adams told me. ‘All you get [in the very distant future] is what is currently in the local group of galaxies. This constraint limits the amount of gas to make new stars, for example. As a result, life will have a harder time surviving to extremely long times.’

intelligent beings could build ‘Dyson spheres’ to harvest the trickle of energy released by black holes

Fortunately, useful energy is woven into the bedrock of creation. Over long enough periods of time – and time is one thing not in short supply – the minute amounts of energy generated by processes such as proton decay can be harvested and made to do useful work.

In 1960, Freeman Dyson, then a physicist at Princeton, proposed that any sensible civilisation would build great solar-panelled shells around its parent star, to ensure that none of its blaze of light went to waste. Even at this late stage in the life of the Universe, intelligent beings could build similar ‘Dyson spheres’ to harvest the trickle of energy released by black holes. Hawking radiation, a quantum artefact generated by the creation of virtual particles at the Event Horizon, is feeble stuff: a largish Black Hole would ‘glow’ at a temperature of only a few tens of billionths of a degree. But in the dark future, we will have to take what we can get.

Still, even the black holes are not immortal. By radiating, they lose mass, eventually exploding – the last bursts of visible light in the Universe. The cosmos now enters what Adams calls the ‘Dark Era’. There is no atomic fusion to make light, because there are no more atoms. All that remains is very long wave radiation, plus the smallest elementary particles, smeared out over impossibly large volumes of space. Today, the average density of matter in the visible Universe is a few hydrogen atoms per cubic metre; by 1 googol AD, that figure will have fallen to one miserable electron or positron in a volume far, far bigger than today’s visible Universe.

What hope for any intelligence now? Remember that, even if we or our machine descendants (or those of any alien intelligences) have constructed the sturdiest apparatus to ensure survival, nothing can outlive the evaporation of matter itself. This is where we have to think the impossible.

Paul Davies, an astrophysicist at Arizona State University, argues that the answer might be simply to decamp to a new universe when the old one is no longer fit for purpose. We, or rather ‘we’, would have to start making plans for this long before the Dark Era; but moving might be our only hope.

‘Either the origin of the Universe was a natural or a supernatural event,’ Davies explained to me. ‘Assuming, as a scientist would, that it was natural, then it must be possible for a sufficiently advanced civilisation to do it, too.’ The prevailing view among cosmologists at this time is that the Big Bang was just one of many bangs scattered throughout space and time. ‘So the conditions for producing one are generic,’ Davies said. ‘In principle, we could do it too, and make a baby universe. Get it right and this baby would expand into something like our Universe is today.’

‘It’s necessary for the beings to decamp to the baby universe through the umbilical wormhole before it pinches off’

This will not be easy. Making a new universe, or tunnelling through to another, natural, part of the multiverse, would require a colossal amount of energy: think of something like the Large Hadron Collider (LHC) at CERN in Switzerland scaled up to the size of a Solar System, harnessing the power of entire stars or tamed black holes. This would tax the resources of the most advanced civilisations foreseeable, and it would be the work of millennia – probably hundreds of millennia, using machinery scarcely imaginable in its scale and complexity. It would be the greatest engineering project in history.

Davies says: ‘It’s necessary for the beings to decamp to the baby universe through the umbilical wormhole before it pinches off. So this is the ultimate in emigration – getting out for good. Actually doing this, by concentrating huge amounts of energy, wouldn’t be easy, and it would certainly be expensive, but we have billions of years to save up for it, as this Universe will do okay for a while yet.’

There are other equally outlandish possibilities. A few years ago, as CERN was about to turn on its LHC, some anxious souls fretted that the machine could inadvertently create an Earth-eating black hole or – and this is pertinent here – trigger some sort of ‘phase change’ in the fabric of the cosmos itself that would create a sphere of destruction spreading out from Earth at the speed of light. Oops.

The LHC, mighty as it is, was far too feeble to do anything of the sort. But build something thousands of times bigger and who knows? It might be possible to unleash a field that in some way interferes with the cosmic expansion. Freeman Dyson has suggested that by saving up a large but finite amount of energy, it should be possible to power some sort of conscious thought for a subjective eternity, even as the Universe dies a heat death.

The fact that people have even considered saving – or escaping from – our dying Universe is remarkable, and a testament to the physics that can predict conditions a billion years hence better than the weather next week. The project is not really about saving the Universe, but about saving the life within it, life without which, after all, the cosmos is just gas and rocks and vacuum. It might prove that the ultimate answer to the problem of life, the universe and everything is not, as Douglas Adams joked, 42, but simply finding a way to keep the show on the road forever.