Don’t bother asking if jobs are being lost to computers. Of course they are, and the current wave of populist political revolts in Western countries is what Luddism looks like in an era of industrialized democracies. The right question to ask is: what kinds of jobs are being lost? Moravec’s Paradox predicted the answer almost 30 years ago.

Right now, it’s the jobs in the middle that are at risk of disappearing. Not high-level professional and managerial jobs that require sophisticated social and intellectual skills and pay very well. Not poorly-paid jobs in delivery or the fast-food industry either, although automation will eventually take jobs in the service industries too.

But the middle-income, semi-skilled jobs, mostly in manufacturing or transportation, that used to sustain a broad and prosperous middle class are dwindling fast. Western societies are being hollowed out by automation, just as Moravec’s Paradox predicts.

Often the newly unemployed find other work, but it is generally in the low-income service sector. These disinherited lower-middle-class and upper-working-class people are the foot-soldiers of the populist revolutions.

Back in the 1980s Hans Moravec, a pioneer researcher in artificial intelligence (AI), made the key observation that “it is comparatively easy to make computers exhibit adult level performance on intelligence tests or playing checkers, and difficult or impossible to give them the skills of a one-year-old when it comes to perception and mobility.”

The paradox is that activities like high-level reasoning that are challenging for human beings are easy for robots endowed with AI. Simple sensory and motor skills that are easy for the average one-year-old child are far beyond the current reach of the robots.

So the jobs that robots can most easily take are mid-level management jobs and semi-skilled, highly repetitive manual jobs — and there goes the middle-class meat in the sandwich.

What’s left is a small group of rich people (who own the robots), an impoverished mass of people who provide them with services of every kind or have no jobs at all — and a level of resentment in the latter that is rocket fuel for a populist revolution.

This dystopian vision is commonplace nowadays, pushed to the top of the agenda by Brexit in the U.K., the election of Donald Trump in the U.S., and neo-fascist election successes (though not yet victories) in the Netherlands, France and Germany. The phenomenon may well play a big part in Italy’s election next month.

And the robots are soon going to be able to take out the rest of the jobs too. Moravec and his colleagues were working with the computers of 30 years ago, which were really simple-minded and single-minded.

Today’s and tomorrow’s AI is running on computers that are orders of magnitude more powerful, and that allows them to do different things — like “deep learning,” for example.

The operating instructions don’t only come from human beings anymore. More often, the AI is told what the result should be, and works out how to get there for itself by deep learning, a trial-and-error process that only becomes feasible when you have a number-crunching capability magnitudes greater than in the 1980s.

Then the path opens to artificial intelligence that has human-level sensory and motor skills. Not right away, of course, but in due course.

There go the rest of the jobs, you might think, and certainly a lot will go. There goes the need for human beings altogether, the more pessimistic will think, and maybe that’s true too. But the latter outcome is still a choice, not an inevitability.

A significant number of AI specialists are now working on what they call artificial general intelligence: AGI. Rather than teach a machine to use symbolic logic to answer specific kinds of questions, they are building artificial neural networks and machine-learning modules loosely modelled on the human brain.

Horoshi Yamakawa, a Japan-based leader in AGI, sees two advantages to this approach. “The first is that since we are creating AI that resembles the human brain, we can develop AGI with an affinity for humans. Simply put, I think it will be easier to create an AI with the same behaviour and sense of values as humans this way.”

“Even if superintelligence exceeds human intelligence in the near future, it will be comparatively easy to communicate with AI designed to think like a human, and this will be useful as machines and humans continue to live and interact with each other. . . .”

Feeling reassured now? Thought not. There’s never much reassurance to be had when thinking about the future.

Most of the jobs are going to go sooner or later, including the skilled manual jobs and the high-level management jobs that presently seem safe.

We’ll have to get used to that, just like our recent ancestors had to get used to working in cities and not on farms.

But maybe the robots will grow up to be our colleagues, not our overlords or our successors. If we take the trouble to design them that way, starting now.

Gwynne Dyer is an independent journalist whose articles are published in 145 newspapers.