The material prosperity that capitalism has wrought is the product of technology, as well as markets (and social norms and state institutions).

Markets enhance the efficiency of allocation of resources - such as human labour - between competing projects, while technological innovations enhance the productivity of our use of those resources, the ability to produce more with less.

As Keynes prophesised in his famous essay, "Economic Possibilities for our Grandchildren" (1930), the seemingly relentless trend of rising productivity promises finally to end the "economic problem" - the struggle to overcome scarcity that has characterised the human condition since our beginning. Finally, we can turn as a society to considering what our enormous wealth can do for us, rather than what we must do to get it.

But this is not a time for complacency. Unless we intervene, the same economic system that has produced this astonishing prosperity will return us to the Dickensian world of winners and losers that characterised the beginning of capitalism, or worse.

The problem is this: how will ordinary people earn a claim on the material prosperity of the capitalist economy if that economy doesn't need our labour anymore?

The crisis

The original industrial revolution was basically an energy revolution which replaced puny human brawn with fossil fuel powered machines that were orders of magnitude faster and stronger. Human workers were displaced into the new jobs created by this prosperity, some managing and servicing the machines that made actual things, but most into "services," producing intangible goods such as education by cognitive efforts that the technological revolution in productivity couldn't reach.

We are now living through a second industrial revolution that is replacing puny human brains with machine intelligence. Any kind of work that can be routinised can be translated into instructions for computers to do, generally more cheaply and reliably than human employees can. That includes increasingly sophisticated cognitive labour like driving, law, medicine and document translation. Even university lecturers are at risk of being replaced by technology, in the form of Massive Open Online Courses, while the digital cloning of actors promises to allow filmmakers to cheaply manufacture whatever cast they please.

Just like the original industrial revolution, this is creating large numbers of losers whose skills are no longer valued by the market. But this time it is not clear that new jobs will appear for these people to move into, for this time the machines can follow us nearly anywhere we try to go. This time technological unemployment may become a permanent fact that we have to deal with by changing how capitalism works. Our birthright as humans - the ability to produce things by our labour that others find valuable - may become economically worthless.

According to some economists, automation is already erasing white collar jobs from the economy, a process that accelerates in recessions like this one leading to jobless recoveries and an ever-widening hole in the middle of the labour market. At the bottom, increasing numbers of people will compete for low status low paid jobs like cleaning and fast-food preparation - things that machines are not yet able to do, or not able to do cheaply enough. At the top will be a new creative class of knowledge workers who develop and service the machines on behalf of the capitalists who own them. In between, the jobs will be most cost-effectively done by robots.

Thus, on the output side of our new robot economy, we have material abundance undreamed of by earlier generations. But on the production side, we have an economy increasingly independent of human labour and so unwilling to pay for it. Hence the crisis.

For under capitalism as we know it, the labour market is the central mechanism for distributing claims on the economy's productivity. The welfare systems we have developed are designed to complement it, for example providing education to improve children's employability as adults, and social insurance "safety nets" for the disabled and temporarily unemployed. Employment is also highly moralised - people are understood to have a moral duty to seek paid work and are held responsible for their failure to get it. (Indeed, cultivating this norm was clearly understood to be essential to the global institutionalisation of capitalism, along with legal innovations like limited liability corporations. The nineteenth century colonial powers deliberately set out to convert subsistence economies into profitable ones by coercing peasants into waged labour.)

None of this is sustainable in a robot economy. We need something new.

Universal basic income

Universal basic income is the idea that governments should guarantee all their citizens an income sufficient for a decent standard of living. It is not a new idea - versions of it can be found in Thomas More's Utopia and Thomas Paine's pamphlet on Agrarian Justice - but it may be one whose time has come.

In the idealistic 1960s and 70s the idea enjoyed some political support and experiments were even carried out to see how it might work in practise. Yet the grip of the moral ideology of work made it politically unfeasible - even hard-nosed economists worried that paying people to do nothing would undermine the work ethic on which the economy depended, including the taxes needed to pay for the basic income itself.

More recently the idea of basic income has had a small revival. Some on the left see it not only as a just return of excess profits from capitalists to workers, but as a means of returning dignity to work - giving people the freedom not to have to take demeaning and low paid jobs just to survive. Some on the right focus on the efficiency and liberty gains of abolishing the bureaucracy of the present welfare system.

In the context of the robot economy, the case for a universal basic income becomes still more compelling. For it is no longer only an idealistic vision of a freer, more just society. It may also be our best chance to avoid a nightmare. Thus, even conservatives suspicious of dreamy progressives may come on board: we may have to commit to a radical ideal of a better world just to prevent the loss of the modicum of individual freedom and equality we currently have. Whether one seeks to transcend capitalism or merely save it, the path lies through something like basic income.

First, the material abundance being wrought by ever increasing automation makes the affordability and sustainability of a universal basic income more credible. The scourge of technological unemployment means that even if being paid a living wage to do nothing does dissuade lots of us from taking jobs and turns us into "surfer bums," that won't affect the tax base - since there will be few jobs left for humans to do anyway. Effects on the work ethic would be irrelevant.

Second, because the labour market mechanism for transferring claims on economic output from capital to labour has broken down, we will need a new way of providing people with the ability to consume goods, or else we will end up in an economic crisis of under-consumption amid over-production (such as Marx prophesised). In that case even, the capitalists who own the machines and the algorithms will be less well-off than they could be, for no matter how cheap their goods and services would be to produce, their profits depend on people being able to afford them.

As in a debt crisis, an economy will stop spinning and crash to the ground if the distribution of assets becomes too skewed. Most modern economists view the economy not as a moral drama in which it makes sense to talk of good and evil or right and wrong, but rather as a complex machine that can produce more or less of what we value depending on how it is set up and maintained. Thus, the capitalist way of solving a debt crisis is for the government to compulsorily transfer some assets back from creditors to debtors so that the economy can keep spinning.

The traditional "moralistic" way of solving a debt crisis is for creditors to take ownership of their debtors' last assets, themselves, which is why so many of the agrarian economies preceding capitalism were slave societies. By this same utilitarian reasoning, some version of a basic income - whether funded by corporate taxation, income taxes on the rich, or universal share ownership - seems necessary to transfer purchasing power back to ordinary consumers and prevent capitalism from collapsing into neo-feudalism.

Third, the welfare system as we have known it will have to be replaced. If we do not wish our material utopia to become a Dickensian dystopia or worse, with most of the population politically, socially and economically disenfranchised, we will have to build a new welfare system that isn't dependent on the labour market. The central issue here is human dignity. Most rich countries have already ended the scourge of old-age poverty with free healthcare and cost of living linked pensions entrenched as entitlement rights rather than charity. We long ago decide that old people should not be subjected to the horrors of penury, begging for alms and living on the streets. We should extend the same consideration to people in general.

Finally, and more positively, a basic income would allow us to take advantage of the liberation offered by material abundance. As the anthropologist David Graeber noted in a recent essay, "On the Phenomenon of Bullshit Jobs," when you look at the content of most of the work people do these days, "It's as if someone were out there making up pointless jobs just for the sake of keeping us all working." The cult of work has persisted long after it stopped really making sense and the material prosperity prophesied by Keynes came to pass. A great many people are trapped in jobs that are wholly or mostly pointless - Graeber has a particular go at corporate lawyers and university administrators - simply because they need to earn a claim on the productivity of the economy somehow, and automation has reduced the number of jobs in industries that make or do things that are actually useful, like growing food or building things.

Artificial intelligence would undermine most of those pseudo-jobs, to the extent that they are worth doing at all, while a basic income would provide us with the freedom as a society not to set out to create a new set of pointless jobs, as flunkies to the new upper-classes, say. Finally we would be able to stop wasting half our waking lives on activities that really don't matter whether we do them or not. Finally we would all have the right to the dignified leisure of the gentleman, not the hopeless and morally stigmatised inactivity of the unemployed. We would be able to live our lives for ourselves - though whether we would use that freedom to embark on noble projects and philosophical contemplation, or merely to watch more television and play golf is another matter.

***

For eating the forbidden fruit, the Abrahamic god cursed Adam to a life of endless labour: "By the sweat of your brow you will eat your food" (Genesis 3:19). The rise of the machines has given humanity a wonderful opportunity to finally be free of that curse. Yet the end of labour also presents a crisis for capitalism.

The widely shared material prosperity that has been capitalism's greatest achievement depended upon a specific harmonious configuration of technology, markets, social norms and government which is now coming unstuck.

We have a decision to make between two futures. In one, we cleave to the institutions we have become accustomed to - the market for labour, the ideology of work and a welfare system focused on supporting and enforcing those. In that case, we are likely to end up back in a world divided between rich and poor, or worse, between lords and serfs. In the other future, we take control of our prosperity and make it work for us rather than we for it.

Thomas Wells is a philosopher based in Rotterdam. He blogs at The Philosopher's Beard. This is a revised version of a column published on 3 Quarks Daily.