When most people think about the robot apocalypse, they do so through the lens of Hollywood films. We are all familiar with the gray dystopian future where killer humanoid robots march through killing fields of human skulls. But the true apocalypse will be more about erasing humans from payrolls than outright extermination. The reason: Machines are getting smarter. Advanced algorithms are teaching machines how to see and interact with our world.

In short, metal and wire robots are getting a software upgrade.  And they’re coming for many jobs in the new Gilded Age to make life better for those who don’t lose their jobs – so beware.

It’s not hard to understand why this is happening. When AlphaGo, the deep-learning AI software from Alphabet soundly defeated the best Go players in the world last year, it did so by understanding all of the possible moves and likely countermoves in advance. It knew this because it had already seen those moves in millions of simulations.

Japanese life insurer Fukuko Mutual in late 2016 said it will replace 34 insurance claim workers with robots powered by IBM Watson Explorer software. These robots are not Hollywood chic.  They are not even tangible.  They’re just bits of code, 1s and 0s structured to interpret digitized data and reduce the cost of labor, in that order.  Now they are ready to be deployed in large numbers.

No job is safe, according to researchers at Stanford University. Lawyers, accountants and even surgeons will be automated away. Artificial intelligence is accelerating robots’ education.  They are already good at repetitive, judgment tasks based on data analysis and are deployed throughout large companies in customer service, quality control, fraud analysis, diagnosis and treatment systems.  Every new data point makes them better, and cheaper.

Fokuko will spend just $1.7 million to install Watson, and $128,000 per year on maintenance. That is reportedly a saving of $1.1 million per year over human claim workers.  Trading people for software will pay for itself in only two years.  After that, all of the savings go straight to the bottom line.  You can imagine how quickly financial officers are lining up for some AI robotics business magic.

And that’s the kicker.  Investing in robotics AI makes good business sense in this new age.    Research firm IDC predicts demand for cognitive systems will grow at an incredible rate: from just $8 billion in 2016 to $47 billion by 2020. Industries now most targeted for robotics include banking, securities and investments, and manufacturing. A researcher noted that in these areas are found a wealth of unstructured data, a desire to harness insights from this information, and an openness to innovative technologies.”

The bad news is that these changes are not far off in the future. They’re here right now. For much of the past 100 years, American wage growth had risen in lockstep with productivity but in 1990 the two began to diverge. There is a good reason for this. Work can be divided into four types: routine, non-routine, manual and cognitive. Routine is different than non-routine because it does not vary. Manual is different than cognitive because it involves physicality.

In 1990, the St. Louis Federal Reserve Bank found that the growth of routine manual work, like that performed by factory workers, began to slow because it was relatively easy for software engineers to write rules that robots could follow. More recently it has become easier to write rules for routine cognitive work, like that performed by millions of Americans working in offices.

We can see these changes in real time. When purchased the robotics firm Kiva in 2012, few observers expected the dramatic impact automation would have on its warehouse floors. The online retailer now has more than 30,000 robots roaming about, guided only by computer algorithms. Human workers have been cut by two-thirds, performing only non-routine tasks.

And then there is WhatsApp, the software messaging platform Facebook purchased for $19 billion in 2014. That firm serves more than a billion users and sends 34 billion messages per day with just 55 employees and 32 software engineers.

The World Economic Forum estimated that as many as 5 million jobs could be lost to automation by 2020. That estimate assumes little progress in deep learning and other forms of artificial intelligence. Andrew Ng, chief scientist at Baidu (BIDU), figures that is way too optimistic. He warns artificial intelligence advances will “create massive labor displacement.:” And he is not alone in this assessment. The question is what political leaders will do about it.

For investors in the new Gilded Age, the best way to play this trend is in the cloud.  Amazon, Alphabet and Microsoft are ramping-up their public cloud platforms and fortifying services with open source AI robotics modules. And software maker Splunk is building software to help robotics developers work with very large data sets. We will be exploring many more ideas in coming months and years.