More than half of the human race could be unemployed in 30 years time as job vacancies are filled by machines, a scientist has predicted.
A life of leisure could be the norm for a majority of people in decades to come, according to computer expert Moshe Vardi - but he warns that it may not be a bed of roses.
Speaking at a major conference in the US, he considered the social implications of a global economy with greater than 50% unemployment.
Professor Vardi, from Rice University in Houston, Texas, told the annual meeting of the American Association for the Advancement of Science (AAAS): "We are approaching a time when machines will be able to outperform humans at almost any task.
"I believe that society needs to confront this question before it is upon us: if machines are capable of doing almost any work humans can do, what will humans do?
"A typical answer is that if machines will do all our work, we will be free to pursue leisure activities.
"I do not find this a promising future, as I do not find the prospect of leisure-only life appealing. I believe that work is essential to human well-being."
He added: "Humanity is about to face perhaps its greatest challenge ever, which is finding meaning in life after the end of 'in the sweat of thy face shalt thou eat bread'. We need to rise to the occasion and meet this challenge."
His presentation was entitled Smart Robots And Their Impact On Society.
Prof Vardi argued that the pace of progress in artificial intelligence was increasing, even as the same technology was eliminating growing numbers of middle-class "white collar" jobs and driving up income inequality.
In November last year the Bank of England's chief economist warned that up to 15 million jobs in the UK are at risk of being lost to robots.
Andy Haldane said automation posed a risk to almost half of British employees and warned that a "third machine age" was set to widen the gap between rich and poor.
Administrative, clerical and production tasks were most at threat, according to a Bank of England study.
Addressing the Trades Union Congress (TUC) he said: "Technology appears to be resulting in faster, wider and deeper degrees of hollowing-out than in the past.
"Why? Because 20th-century machines have substituted not just for manual human tasks, but cognitive ones too. The set of human skills machines could reproduce, at lower cost, has both widened and deepened."
Low-paid jobs were most at risk, but mid-range skills would increasingly be affected as well, he claimed.