In a warning laced with ironies, former warmongering US Secretary of State Henry Kissinger - who presided over many of the atrocities of the Vietnam war in the 1960s and 1970s - warned in an article in Russia Today in July that: "We are in the midst of a sweeping technical revolution whose consequences we have failed to fully reckon and whose culmination may be a world relying on machines powered by data and algorithms and ungoverned by ethical or philosophical norms".
The development of Artificial Intelligence (AI), machines that do not just carry out pre-programmed instructions but learn more new programmes and instruction by experience and by new situations, does pose fundamental questions for capitalists and the workers' movement, with some AI advocates arguing that algorithms will soon surpass the intelligence of humans. They call this the 'singularity' moment.
Yet for socialists, there is nothing intrinsically revolutionary about these new technologies while they remain restrained by the capitalist mode of production that needs human labour power to generate profit.
Indeed, in every previous historical epoch there have been new technologies, but their ownership has lain just as firmly in the economic grip of the ruling class of the day.
Robots and more highly developed forms of AI do not change the exploitation of humans by other humans and cannot solve the fundamental contradictions of capitalism.
The productive forces long ago burst asunder the boundaries of the nation state, but this process cannot be completed by capitalism.
Many AIs exist principally as digital entities, but in other applications the intelligence is embodied in a robot that augments human work.
In manufacturing, robots are evolving from potentially dangerous and 'dumb' industrial machines into context-aware 'cobots'.
The technology is already used widely, to provide speech and face recognition, language translation, and personal recommendations on music, film and shopping sites.
Calculating and predicting more quickly and accurately than has ever been possible what the likelihood is of a particular outcome, is the fundamental advance which AI brings.
In the future, it is claimed that AI could deliver driverless cars, smart personal assistants, and intelligent energy grids. Yet in austerity-ridden capitalist society, even the filling of potholes is a task beyond this system.
As long as capitalism is in the driving seat, a planned and coordinated rolling out of AI is impossible in a manner that creates well-paid jobs and new opportunities for workers displaced by machines.
The economist Robert Gordon predicts 47% of jobs in the US, most of them semi-skilled, will disappear in the next few years, while an in-depth study by Citi and Oxford University predicts that 77% of all jobs in China are at risk of automation and 57% of all jobs across the OECD (a grouping of advanced capitalist countries).
The responsibility for combatting this dystopian view of the future lies with the workers' organisations and left parties.
But the leaderships have not put forward clear ideas for the organised working class to see its role in changing society.
Instead of simply bowing to the 'inevitable', the trade unions must formulate a programme for jobs that includes the demand for an immediate struggle for a shorter working week without loss of pay, sharing out the work without loss of pay and a real living minimum wage.
These demands must be linked to public ownership of major industries under workers' control and management, in order to facilitate democratic socialist planning.
The capitalists themselves at their annual hideaways in Davos, Switzerland, have begun to ponder this question of how to deal with displaced workers and the social risks that will be triggered by large-scale surges in unemployment.
Traditional 'middle class' jobs will be threatened too and as Karl Marx warned 170 years ago, the continuation of capitalism leads inevitably to the growing pauperisation of the mass of the population.
Therefore it is incumbent on socialists not to settle for the idea of a 'universal basic income' as advanced by many on the utopian liberal left, but instead to fight for the full socialist transformation of society, which alone can take full advantage of the dazzling potential latent in AI.
On the basis of a socialist revolution and common ownership, the distribution of the output produced by the robots can be controlled and distributed to each, according to their needs.
If society operates through maintaining the private ownership of the robots, then the class struggle for the control of the surplus must continue.
The use of robots has grown exponentially since the 1950s. An industrial robot costs about £4 an hour to operate, compared to average total EU labour costs of about £40 an hour or £9 an hour in China.
Pepper Robots which engage in basic interactions and monitoring with elderly people are used in thousands of care homes in Japan.
They communicate through speech and with gestures, moving independently and picking up signs that someone is unwell.
With 25% of Japan's population now aged 65 or over, on present trends, there will be a shortfall of 380,000 care workers by 2025.
The UK will need up to 700,000 more care-working roles by 2030. Pepper robots are being trialled here too and recently one performed before a parliamentary select committee. What impact will this have on the quality of social care?
China is now the world's biggest operator of industrial robots, according to the International Federation of Robotics.
One company, which exports 1,500 kitchen sinks a day, has spent over $3 million on nine robots that do jobs formerly done by 140 workers.
The boss comments: "These machines are cheaper, more precise and more reliable than people. I've never had a whole batch ruined by robots. I look forward to replacing more humans in future."
Robots are employed in abattoirs and butchery and can cut fat off meat much more efficiently than humans, because of the use of cheaper and more responsive sensors.
Another boss boasts: "It's becoming economically feasible to use machines to do this because you save another 3 or 4% of the meat - and that's worth a lot on a production line, where you can move quickly."
The payback period for a welding robot in the Chinese automotive industry dropped from 5.3 years to 1.3 years between 2010 and 2017, according to analysts at Citi.
China's rising labour costs may be an indirect silver lining because they are driving technological advancement, but simultaneously, immense social problems are being stored up, where massive and constant displacements of workers is leading to a rash of bitter industrial strikes, a questioning of the regime and tomorrow, even revolutionary movements.
Technology is never a neutral factor in production in a class society. The internet is a valuable means of communication for the workers' movement, but can also be used to undermine democratic debate and spread misinformation. In extremis, right-wing governments have shut it down!
Prior to the financial crash of 2007 which triggered the 'great recession', the gurus of high finance boasted that their wizardry with algorithms had assured them there was almost no risk to the 'skyscraper on chicken's legs' that was the volatile, speculative and largely fictitious derivatives market.
They were soon to learn that financial algorithms are not infallible. Others continue to be hypnotised by the get-rich-quick crypto-currency market, powered by algorithms and destined once again to end in tears for the parasitic 'coupon clippers' (wealthy holders of interest-bearing bonds).
At best the applications of AI can be rolled out only unevenly by the private sector. Historically the much-derided state has taken the risk in advancing science and AI, with the algorithm that led to Google's success coming from a grant from the US National Science Foundation.
The iPhone would not exist if not for previously developed public technologies - the internet, GPS, lithium-ion batteries, microprocessors, multi-touch screen, SIRI, click-wheel, liquid crystal display, and so on.
A major technological innovation is unfolding around nanotechnology - the manipulation of matter on an atomic, molecular and supra-molecular scale.
This requires cooperation and coordination among a variety of disciplines, including physics, chemistry, materials science, engineering and computer simulation. So far, it has been governments that have been primarily financing this research.
Today has parallels with the 1930s rather than with the post-war boom years, meaning AI is curtailed by capitalism, just as new technologies were stymied in the inter-war years.
The capitalist economist JM Keynes argued that the application of these technologies in the 1930s could even then reduce the working week to 19 hours. Yet investment and production seized up as economic depression spread like virus.
Marx and Engels explained through the law of historical materialism that the motor force of progress is the development of the means of production - industry, science, technology and technique.
The development of the productive forces is a process of humankind's mastery over nature, of harnessing the forces bequeathed to us by our surroundings.
Those forms of AI that are presently conceived as most important include transformative developments like gene-sequencing technology, broad reach forms like the internet, economically lucrative breakthroughs like advanced robotics and potential game-changers such as energy storage technologies. 3D computers, once just a Star Trek fantasy, have opened up limitless possibilities.
In healthcare, AI can multi-scan cancer patients, allowing for adaptive radiotherapy where scanning, image mark-up and beam planning are done before every treatment session.
That way, the radiotherapy beams are sculpted to the tumour's size and shape on the day, not when it was first imaged.
AI enthusiasts dream that the economic impact of these technologies - from falls in price and diffusion and improved efficiency, could be between $14 and $33 trillion a year in 2025.
AI technologies cannot, however, be harmoniously rolled out, due to the contradictions of capitalism. Capitalism can never give finished expression to the economic trends within it.
In Marxist terms, the fight for our future is not dystopia or utopia, but one of capitalism or socialism.
The real 'third revolution' will be the socialist one which, linked to the internet of things can connect everything with everyone in an integrated planned global network.
People, machines, natural resources, production lines, logistic networks, consumption habits, recycling flows, and virtually every other aspect of economic and social life will be linked via sensors and software.
Realm of freedom
This is the outline for a socialist world, in which humankind will be transformed. Engels once said "the invading revolution" is before us.
All capitalist institutions proceed from the belief that the capitalist system is permanent, yet the epidemic of chaos and crisis that is their system, creates social explosions out of which we can build the forces to change society completely.
The very future of the planet, from the struggle to eradicate disease and poverty to the protection of Earth from the horrors of climate change is a question that will be settled by the living struggle between class forces.
In the memorable words of revolutionary socialist Leon Trotsky: "For the first time mankind will regard itself as raw material, or at best as a physical and psychic semi-finished product.
"Socialism will mean a leap from the realm of necessity into the realm of freedom in this sense also, that the human of today, with all their contradictions and lack of harmony, will open the road for a new and happier race" (In Defence of the October Revolution, 1932).