Warning: don’t read too much about the future of jobs in an era of Artificial Intelligence if you are—psychologically speaking—in a dark place. If you’re a lover of the arts and humanities, for example, you should probably go full hermit in the basement of a university library with plenty of provisions (but no WiFi). If you greet all technological advances with gee-whiz enthusiasm, you’d best avoid long conversations with people who make a living driving trucks or reading X-rays. If you’re an antiglobalization protectionist, get ready to look with longing on a time when the biggest threats to jobs were NAFTA and an ascendant China. And even if you believe in the long-term benefits of what economist Joseph Schumpeter called creative destruction—as I do—prepare to have your convictions tested.

People have feared artificial intelligence since Mary Shelley introduced the world to Dr. Frankenstein’s hideous creature. The Luddites, who battled against the automated loom in the early nineteenth century, are now regarded as so wrongheaded that they have an economic error named after them. The Luddite fallacy refers to the fact that in the long run, disruptive technologies create more jobs—not to mention reduce drudgery, save lives, expand leisure, and enrich us all. Optimists argue that AI, too, will bring material and social progress. Things will cost less; people will live longer. They’ll have more time to enjoy their hobbies and interests. The work-life balance problem? Solved—once robots do the laundry, drive the kids to soccer, and take over the less interesting but time-consuming tasks at the office. Albert Wenger, a venture capitalist at Union Square Ventures, is not alone in seeing AI as “a development that will free us to do lots of incredible things that are more aligned with what it means to be human.”

So let’s stipulate: no one knows for sure what’s about to happen to the labor market. Most observers agree, however, on at least two things. First, the pace of AI discoveries and implementation is accelerating. Robots are now doing things that seemed like science fiction just a short time ago. Was anyone talking about a retail-sector meltdown, driven in good measure by AI-facilitated e-commerce, last year? Second, fasten your seatbelts. Whether you call it “the second machine age”—as MIT professors Erik Brynjolfsson and Andrew McAfee do, in a 2014 book by that name—or the fourth industrial revolution, this will be big. Most Silicon Valley honchos, scientists, and economists think that this time is different. Exactly how many jobs will be lost, which kinds of jobs and when, and what to do to prepare for these losses may be matters of dispute. No longer questioned is that a massive disruption in the way we earn a living is coming and that it will transform communities, education—and perhaps even our notion of an America defined by industriousness and upward mobility.

This is not to say that AI optimists don’t have plenty of evidence on their side. AI, defined as “fully autonomous machines that don’t need a human operator and can be reprogrammed to perform several manual tasks,” is already helping save workers’ lives and limbs. Much of this is happening not because machines are replacing humans but because they are helping them do their jobs more efficiently and safely. Military drones are an obvious example. Drones don’t reduce the need for soldiers—humans still need to operate and service the machines—but they do lessen the need for soldiers and military-intelligence officers on treacherous battlefields or in jets at risk of antiaircraft attacks. Similarly, firefighters use drones to get a live-video look at a forest fire or to search for victims before sending men into danger. In March, the New York City Fire Department used a drone to help place firefighters on a damaged roof during a dangerous fire in the Bronx.

For decades, robots have been assisting physicians in the operating room. A robotic system called Da Vinci has “arms” equipped with cameras and precision tools to perform everything from knee replacements to hair transplants to tumor removal. Da Vinci can operate in hard-to-reach crevices of the body with tiny tools in ways that far exceed the physical capacities of human doctors. By the latest count, 3,803 Da Vinci units are in use worldwide—2,501 in the United States. Studies have found that Da Vinci can mean smaller incisions, less blood loss, and shorter recovery periods than conventional surgery. And because surgeons use magnified, high-definition, 3-D computer-screen images of a kidney or knee, for example, to guide the robot, they don’t need to be in the same room or, for that matter, the same continent as their patient. “Telesurgery” lets a doctor in New York operate on a patient in Ghana and still be home for dinner. The potential benefits for the billions living in remote or medically underserved areas are incalculable.

More recently, robots have also been “collaborating” with doctors as they make diagnosis and treatment decisions. IBM’s cutely named robot Watson became a celebrity when he defeated Ken Jennings, famous for winning 74 consecutive Jeopardy games. Now, Watson is in training to become an Olympian medical expert. In fact, without robotic technology, we probably wouldn’t be anticipating personalized medicine. Robots like Watson are tireless info-vores; they don’t suffer overload or need naps or caffeine breaks; they can digest more medical journals, reports, patient records, websites, records, and diagnostic materials in an hour than a doctor could in a lifetime. A Watson designed to analyze genomics consumes something like 10,000 scientific articles and 100 new clinical trials that become available every month. Tell Watson the genomic makeup of a tumor, and it will sift through all the research in order to customize treatment.

The optimists can also rightfully claim to have history in their corner. In the 1930s, John Maynard Keynes fretted about “technological unemployment” but assumed that it would be temporary. In that respect, at least, Keynesianism has been vindicated. Machinery has obliterated some jobs while boosting productivity and consumer wealth, which, in turn, has created new, often higher-paying, jobs. No one could have predicted that automated looms’ cheaper clothes would change the calculus of consumer demand, leading to more jobs for weavers, as ultimately happened. Henry Ford’s Model T devastated blacksmiths, saddle and harness artisans, stable boys, and carriage makers, among others. But the automobile was a creative destructor, swelling the ranks of steel, glass, rubber, textile, and oil and gas workers and, for better or worse, giving birth to the motel and fast-food industries.

More recent examples abound of technology’s counterintuitive influence on the labor market. James Bessen, an economist at Boston University School of Law and what you might call a lukewarm optimist, has studied the ATM’s impact on bank jobs. On first thought, it seems obvious: ATMs would mean fewer jobs for bank tellers, right? No, Bessen says. The number of bank tellers rose in the three decades after the ATM was introduced. The reason: along with deregulation, the ATM helped banks open more branches. Tellers were “up-skilled” to do more customer service and sales. Similarly, while Kodak and other photo companies were decimated by smartphones, tech executive Marc Andreessen observes that smartphone firms and the satellite industries they spawned employ far more people than Kodak and its like ever did.

A more surprising example of creative destruction comes from the manufacturing sector. The U.S. actually added 261,000 jobs in automobile manufacturing between 2010 and 2016 (though early 2017 numbers don’t look as good), perhaps because cars themselves have become more complex. That’s a 6 percent rise (though robots did increase their numbers by more, gaining 9 percent). The trends are similar in European automobile factories.

“[P]redictions about technological job displacement,” writes The Atlantic’s Derek Thompson, might be “the latest chapter in a long story called The Boys Who Cried Robot—one in which the robot, unlike the wolf, never arrives in the end.”

“The World Bank estimates that 57 percent of jobs in OECD countries could be automated over the next two decades.”

There are two reasons, though, to think that AI, or cognitive technology, as IBM prefers to call it, is the wolf and a mega job-disruptor beyond all others. First is the growth of what is known as “machine learning.” Computers can easily mine data for patterns; that’s what my laptop’s search function has been doing hundreds of times while I write this article. In machine learning, the artificial intelligence integrates those patterns into further actions: analyzing, drawing conclusions, making predictions, without being explicitly programmed to do so. Combined with faster processors, better sensors, and larger data sets, machine capabilities are growing exponentially. The data we now collect from everything from traffic sensors to Facebook visits to the Internet of things are essentially robot protein; more data, more powerful robots. You might even say that machines are becoming self-driving.

Second, AI is set to invade just about every sector of the economy. In a widely cited 2013 study, Carl Benedikt Frey and Michael Osborne of Oxford examined 702 occupations to figure out which were most likely to be automated. They concluded that 47 percent of American workers were at high risk of being replaced by machines. The World Bank had an even higher estimate: on average, 57 percent of jobs in OECD countries could be automated over the next two decades.

People who think a lot about the impact of robotics and automation—labor economists, tech experts, and the like—have a general rule for the future: the higher the creative, communication, and leadership skills required, the less chance a job will fall into the hands of a robot. CEOs and managers are relatively safe. (Though in 2014, a Japanese venture-capital firm appointed a robot to its board of directors because of its superior ability to predict market trends; it will “vote” on future investments.) The outlook for designers and artists, customer-relations reps, and teachers looks rosy enough. Robotics engineers, of course, are in an especially happy place.

So let’s begin with those vulnerable lower-skilled jobs. The AI job-killer perhaps best known to the public is the self-driving vehicle. Autonomous transport runs the risk of putting most truck, delivery van, cab, bus, train, and subway drivers out of work—permanently. The process is under way. Barcelona, London, Vancouver, Honolulu, and New York (the AirTrain JFK) all have driverless trains; many other autonomous projects are being planned or built.

Tracks make self-driving trains and subways a relatively easy proposition; driving on city streets is a different matter. Self-operating vehicles must negotiate an almost infinite number of driving conditions and obstacles, not to mention unpredictable human behavior. Human-driven cars and trucks will probably predominate on American roads, especially urban ones, for several decades at least. The sons and daughters of the 3.4 million people now making a living driving a truck, however, won’t be carrying on the family business.

That AI, like earlier forms of automation, hits lower-skilled workers first and hardest should be clear to anyone visiting the local supermarket, CVS, Mobil station, or airport check-in hall. Human cashiers are already giving way to mechanized checkout systems and gas pumps. Experts have viewed food service and preparation as much harder to robotize than the price-adding and change-making done by cashiers; many of the tasks required to prepare food turn out to be surprisingly complex and multi-varied for programming a robot. But that’s changing. Name almost any job associated with contemporary food service, and you can find a company inventing ways to bypass messy, complaining, fatigued, sick, and lateness-prone humans.

Consider Eatsa, a restaurant with outlets in L.A., San Francisco, Washington, and New York. Eatsa is more like “a vending machine that spits out freshly-prepared quinoa bowls,” in the words of Business Insider, than a traditional restaurant. Customers use a touch screen to place their order; they then pick up the made-to-order food from a translucent Horn and Hardart–style cubby. Aside from a “concierge” to guide customers unfamiliar with Eatsa’s protocol, no human workers are in view. In the back kitchen, people do prepare the food and clean up, but it’s a good bet that their tenure will be on the short side; robots are now learning how to cook. “Flippy” the robot mans the grill at Caliburger in Pasadena, California. Robots dole the sauce onto pizza dough at Zume Pizza in Silicon Valley. Zume’s cofounders envision automating most of the pizza-making tasks and delivery systems. “Just imagine Domino’s without the labor component,” one of the cofounders told a Bloomberg reporter excitedly. Meanwhile, Starship delivery robots are being tested in 56 cities around the world. The miniature van-like robots are not speedy—they move at only 4 m.p.h. and need a human babysitter—but with improved street-map data and advanced sensors, food delivery’s human “labor component” will eventually be scabbed by machines. Supervised remotely, the robot will arrive at your home with your Thai food—and you won’t have to tip.

The most gifted of the food-related robots is undoubtedly Moley, from Moley Robotics. (Company motto: “The Future Is Served.”) By filming a chef wearing “cyber” gloves in 3-D motion capture, the engineers taught Moley to prepare 100 recipes. The Moley kitchenette has the added advantage of being equipped with automatic power washers to handle cleanup. There’s a catch: the robot will need a food processor for all the chopping. The company worries that the sight of disembodied robot arms waving around a knife will put off customers.

Retail salespeople are the latest group to earn headlines as AI service-industry victims. Machine learning gives firms the capacity to generate personalized recommendations for consumers based on previous purchases and to alert them automatically to price reductions on the sweaters or televisions they’ve been eyeing online. Likewise, huge advances in voice recognition are improving chatbots that you “talk” with on company telephones or websites. (The technology-research firm Gartner predicts that in many companies, the large majority of customer interactions will be with nonhumans.) More recently, intelligent and chatty vending machines are being turned into “mini-stores”—self-operating, of course. According to the New York Times, 89,000 workers in general-merchandise stores have lost their jobs in the past five months alone—more jobs than in the entire coal industry.

You could argue that, since a growing e-commerce sector opens up more positions for warehouse workers, the retail meltdown is actually a good example of creative destruction. Bloomberg columnist Virginia Postrel makes that case: she notes that the number of warehouse employees filling out e-commerce orders has been rising, even as salespeople at Macy’s and Sears cash unemployment checks. Up until fairly recently, it seemed as if, aside from moving boxes around the floor, warehouse work was not a good bet for automation. Robots didn’t have the manual dexterity to pick up a product or to recognize it if it was not precisely where they had been programmed to find it. And they’re not good at distinguishing between the thousands of different items you’d find at, say, a Walmart warehouse. Good news for low-skilled workers, right?

Probably not for long. The many companies specializing in warehouse robots are already making ones that can lift cases off shelves. The machines need less space to get around than humans, so warehouses will no longer need to be stadium-size. The robots move faster than humans, too, and they can work 24/7. In 2012, Amazon purchased Kiva, a Boston-based robotics firm, for $775 million. Last December, the Seattle Times reported that Amazon had expanded its army of robots to 45,000—a 50 percent increase from the year before. The writing is on the warehouse wall.

What about the kinds of jobs that President Trump has promised to bring back—high-paying blue-collar jobs in factories, mines, and mills, of the sort that provided millions of (mostly) men “a good day’s work,” as well as comfortable lives for themselves and their families?

The prospect for those jobs isn’t great, but not because American companies will be moving their factories to Changzhou. Engineers have been programming machines to do the repetitive motions required for product assembly and packaging for decades, and the manufacturing employment numbers have plummeted accordingly; despite the rosy news from carmakers, the U.S. has lost 5 million manufacturing jobs since 2000 alone. Offshoring did play a role. An important paper by MIT economist David Autor estimates that about half of those 5 million positions went to China and other low-wage countries.

But a new synergy between automation and offshoring is shifting the manufacturing sector’s geography. By lowering labor costs in the U.S., automation is making Chinese factories less appealing to manufacturers. Some are even “reshoring” their companies in the United States. (See “No Shore Thing,” Winter 2015.) At the same time, the Chinese are going all in on robotics. FoxConn, the Chinese behemoth best known for making iPhones, recently replaced 60,000 workers with robots; by 2020, the company plans to have 1 million machines working. FoxConn is now negotiating to build a flat-screen TV plant in Pennsylvania. As factories like this return to the U.S., Trump may be able to claim credit for bringing back at least some blue-collar jobs, but robots will have a lot more to celebrate.

Coal miners, steel, oil and gas, and construction workers are also looking at a tenuous future. The Canada-based International Institute for Sustainable Development predicts that autonomous long-distance-haul trains, automated drilling and tunnel-boring systems, and other technological job-slayers will reach their peak rates of deployment in the next ten to 15 years and replace 40–80 percent of mine workers. In the steel industry, 75 percent of jobs have melted away since the 1960s. With machine learning, that trend and the need for more highly trained employees is threatening even more jobs. On construction sites, SAMs (semi-automated masons) can work at superhuman speed. Set one human bricklayer to work alongside one SAM, and you equal the productivity of at least four masons.

AI is making the oil and gas industry far safer and more productive—but with a significant cost in roughneck jobs. Pennsylvania-based Schramm, Inc. has designed an automated rig that can load pipes in one well and then “walk” to the next well, where it reassembles itself to dig the next in line. Since the rig operates by remote control, Schramm doesn’t need workers to install the pipes, one of the most dangerous jobs in the business. (Schramm also built the drilling rig that rescued 33 Chilean copper miners in 2010.) The catch? The new rigs use about 40 percent fewer workers.

White-collar employees should not presume that they’re in the clear. Some will also find themselves in the path of the robot cyclone. These include accountants, insurance-claims adjusters, travel agents, bookkeepers, translators—Google Translate now rivals the accuracy of human translators—pharmacists, and even radiologists, journalists, lawyers, and Wall Street traders.

These more prestigious occupations are by no means about to disappear. AI will, however, nibble around the edges of their workforces. Start with journalism. Robots are already doing certain kinds of rote reporting. The AP has published earnings reports needing no human byline and is broadening its coverage of college sports not by hiring rookie reporters but by developing AI algorithms. No one is predicting a day when robots will write feature or opinion pieces, though a cynic might wonder whether many of those articles are already automated.

Higher-end lawyers have nothing to fear from AI, but paralegals and J.D.s at the bottom of the food chain are another matter. (See “Machines v. Lawyers,” Spring 2014.) Reading and analyzing documents for discovery is a perfect fit for artificial intelligence, especially as e-mails, instant messages, and the like are expanding the field of discoverable documents. You can already write your will, prepare your taxes, fill out divorce forms, and sign routine contracts online through services like Rocket Lawyer and LegalZoom. Boston University’s Bessen argues that making the process cheaper and easier has expanded the demand for discovery so much that the number of legal jobs hasn’t budged. But Dana Remus of the University of North Carolina School of Law and Frank S. Levy, an MIT labor economist, predict that 13 percent of all legal work will fall victim to AI in the foreseeable future.

Finance is probably the status industry most susceptible to AI disruption. Hedge funds and money managers are turning to “quantitative strategies,” that is, AI stock-picking and trading, in the face of competition from index-traded funds and other highly automated systems. Online robo-advisors like Wealthfront and Betterment are adding to the pressure. Sales and trading jobs have already declined up to 30 percent, according to one industry analyst. True, flip-flop-, T-shirt-sporting “Flash Boys” are finding plenty of finance jobs, even if suit-and-tie MBAs are in a sweat. But the new quant positions won’t come near to compensating for the losses. By 2025, artificial intelligence is expected to replace 230,000 human workers across the financial industry. The new generation of Masters of the Universe won’t look anything like Sherman McCoy.

If any country has wholeheartedly embraced robots, it’s Japan. It now has the second-highest number of robots per capita (only recently surpassed by South Korea). The government sees robots as a crucial answer to the country’s abysmally low birthrate and aging population. Ordinary citizens seem to share the official enthusiasm; “companion robots” are now a thing. Toyota has just introduced the Kirobo mini, a tiny, baby-like robot designed to simulate infant-like sounds and movements to, in the company’s words, “fill any void [that childless] people might be missing.” The government subsidizes companies for purchasing robots—i.e., taking jobs. Yet the nation’s unemployment rate is under 3 percent.

With lots of robots and full employment, Japan is conforming to the optimists’ story. But that’s where the reality diverges from predictions. As robots have moved in, the country continues to lag in productivity, wage growth, and household spending. In addition, the unemployment numbers hide high long-term unemployment rates among prime working-age men. It’s still too early to draw firm conclusions, but that’s not the way automation has worked in the past.

Thus far, the story is similar in the United States. We’re also facing a future of declining fertility and an aging population, especially if immigration rates fall. Our unemployment rate is not as low as Japan’s; but at a respectable 4.4 percent, it also disguises some ominous trends. For one thing, disrupted factory and mine workers are frequently forced into lower-wage jobs. At least they have jobs: a growing number of prime-age workers, mostly men, have dropped out of the labor force entirely. (See “The War on Work—and How to End It.”) Demographer Nicholas Eberstadt, author of Men Without Work, estimates that one in six of these guys has no job, a figure that rivals the Great Depression. These men are in part rejecting the lower-wage work—only 15 percent said that they would be unable to find a job if they wanted one—available to them in an increasingly automated economy.

Moreover, most of the tech community and economists believe that income and wealth disparity will be as prominent a feature of an AI economy as it has been in a digital one. Will the prosperity they predict from the AI revolution be even more concentrated among a select few? What will be the social and political reaction to growing and seemingly intransigent inequality? Will the pressure mount for more redistribution? If, as seems likely, the answer to that last question is yes, conservative policymakers in particular will find themselves with few appealing responses.

One noncontroversial solution to these problems, education and retraining, holds some promise. (See “Vocational Ed, Reborn.”) But most new, decent-paying jobs will require some math literacy; and right now, upward of 30 percent of American students don’t pass high school algebra. Our relative PISA scores in math have been slipping; the United States now ranks 31st out of 35 advanced economies. Those numbers will have to improve.

Another proposed solution to job losses and inequality in the AI future is Universal Basic Income. UBI would provide enough of an allowance to live on—exactly how much would depend on cost of living and what federal budgets would allow. The UBI would not be just for those who have lost their jobs but, as the name suggests, everyone. It has the advantage of being a clean and simple safety net—no means-testing, less paperwork and bureaucratic oversight, low fraud potential—as opposed to our current octopus of benefit programs and government agencies, which is why it appeals to libertarians like Charles Murray. Silicon Valley seems sold on the idea. (See “The Disrupters,” Winter 2017.) In addition to (supposedly) solving the problem of paying for food and shelter, it would give people, in Ezra Klein’s words, “the freedom to turn their passions into their vocations . . . they could be an artist, or a writer, or a Reddit commenter, or a competitive video gamer.”

Maybe some people would find their bliss, but what percentage of them? We already have an unplanned experiment in Eberstadt’s “men without work.” University of Chicago economist Erik Hurst has looked into the question of how those men spend their expanded leisure time. The quick answer is that they spend three-quarters of their time playing video games. (Hurst doesn’t say whether they’re playing “competitively” or not, if that matters.) An unknown number—though surely substantial—are taking opioids. We know from other sources what they are not doing: going to school; living with, providing for, or taking care of their kids. With respect, it’s a good guess that they’re not writing novels, either. The nonworking, prime-age men we know about raise serious, even existential, concerns about what happens when a UBI replaces a paycheck. Would a UBI alter the American psyche in a way that leads to less work, less innovation, and less human motivation and creativity?

Don’t look to artificial intelligence to figure that one out.

Top Photo: No country has embraced robots more wholeheartedly than Japan, which sees technology as a crucial answer to its low birthrate and aging population. (© ALBERTO GIULIANI/LUZ/REDUX)