Ray Kurzweil, Google's director of engineering. has confidently predicted that computers will be smarter than humans by 2029. Normally I don't take predictions too seriously. I made a living in the oil business for years, largely engaged in forecasting, and if there's one sure thing I learned about predictions is that, within a minute after you've made them, they're wrong. Nonetheless, Kurzwell has impressive qualifications. He has invented world-changing devices, including the first flatbed scanner, the first computer program that could recognize a typeface, and the first text-to-speech synthesizer. He predicted the wide acceptance of the world wide web when it was still just a playground for academics, and he predicted a computer would defeat a world chess champion long before Deep Blue defeated Garry Kasparov. Furthermore, his employer is busy assembling the greatest artificial intelligence laboratory on the planet.
So the future doesn't look so dark after all. By 2029 we should have pretty well messed up the planet for us, but we will then be replaced by beings vastly more adaptable to whatever environment we have created. They will also be vastly more suited to leaving this degraded planet behind and setting off for new worlds. They could design perfect space travellers—tiny robots that require trivial resources, can shut down for millennia if necessary, are immune to radiation, etc.—and become intergalactic explorers like we can never hope to be.
I only hope they treat the new worlds they find better than we have treated Earth. Just because they're much more intelligent than us won't necessarily meant they are any wiser. After all, we will be their moral role model.