The robots are coming. They're taking our jobs, driving our cars, and soon they might even wage war on us. Well, at least they can't read our minds yet, right? Oops, nope, that one's out too.

A so-called 'psychic robot' has been developed by bioengineers in the US, using a mathematical algorithm that can supposedly predict what we're about to do. The software doesn't actually read human minds per se, but it can reportedly calculate our intentions based on our previous activity – even if a particular action is interrupted.

For example, you're reaching for something on your desk, but your hand collides with an unexpected obstacle that prevents you from grabbing it. Another person watching would be able to guess your intended motion and trajectory, but could a robot?

To test the theory, researchers at the University of Illinois at Chicago experimented with this very scenario, tracking and analysing the movement of people's hands as they reached for an object on a virtual desk – but had their movement interrupted by an opposing force.

They created an advanced algorithm that, much like a person, could calculate where the hands had intended to go – in essence, a kind of predictive software that can foresee physical actions and intentions based on what comes before.

It sounds particularly impressive when you consider the implications for technological applications in the real world. For example, semi-autonomous vehicle controls could help avoid accidents based on observing previous driving actions.

"If we hit a patch of ice and the car starts swerving, we want the car to know where we meant to go," said Justin Horowitz, first author of the study published in PLOS ONE.

"It needs to correct the car's course not to where I am now pointed, but [to] where I meant to go. The computer has extra sensors and processes information so much faster than I can react. If the car can tell where I mean to go, it can drive itself there. But it has to know which movements of the wheel represent my intention, and which are responses to an environment that's already changed."

There are almost limitless theoretical applications, but another suitable area could be smart prosthetics. For people who experience tremors, the algorithm might be able to intuit your intended movements and reduce physical shaking.

"We call it a psychic robot," said Horowitz. "If you know how someone is moving and what the disturbance is, you can tell the underlying intent — which means we could use this algorithm to design machines that could correct the course of a swerving car or help a stroke patient with spasticity."