When it comes to coffee, underneath everything that appears easy is a complicated array of sciences. Roasting isn’t just cooking beans, it’s moderating heat transfer, endothermic and exothermic reactions, airflow, time, etc, where slight variations can have large impacts on the result. And brewing coffee isn’t just pouring water over coffee grounds, but managing temperature, flow rate, grind size, and navigating fluid dynamics that frankly we don’t entirely have a full grasp of.

Even carrying a cup of coffee without spilling, while seemingly easy, is actually quite complicated, and teaching machines to do it as well as humans may actually be the next great leap in robotics.

As reported by Food & Wine, walking while holding a cup of coffee—a task humans do every day, often while doing something else simultaneously—is not so simply explained by physics. It’s actually a quite complicated procedure, requiring dynamism and the ability to instantaneously react to various stimuli. In a paper recently published in the journal APS Physics, researchers from Arizona State University set out the better understand the mechanisms behind not spilling your coffee.

Holding a cup of coffee while walking is described as a complex object, “a system with internal degrees of freedom.” Put another way, it is a thing (the cup) with another thing inside it (the coffee) that moves freely and independently of the first thing. For their study, researchers examined how humans handles a “rolling ball in a cup,” which approximates how coffee moves in a cup; no need to scald human (or robot) hands in the name of science. They found that humans employ two different mechanisms for not spilling: “a low-frequency strategy in which the motions of the bowl and ball synchronized in phase and a high-frequency strategy where antiphase synchronization occurs.” Further, humans are quite adept at switching “abruptly and efficiently” between the two mechanisms as needed.

Machines, on the other hand, aren’t quite sophisticated enough to switch as dynamically (yet). Programming a robot to use one or both of the strategies humans employ isn’t necessarily complicated, but teaching them how and when to switch between the two—the process that makes not spilling coffee a relatively simple task for humans—less so.

The research from the ASU engineers is the first to attempt to quantify the subtle tactic changes, and the potential of doing so is significant. More than just coffee-carrying robots, it would allow for the automation of “processes previously thought to be impossible” and will “forever change how we engineer our world,” per Brent Wallace, the paper’s co-author. This includes the robustness of smart prosthetics as well as “applications in other fields, such as rehabilitation and brain-machine interface,” per co-author Ying-Cheng Lai.

So while advances in robotics have brought about some truly troubling things, for now, machines still can't hold a candle—or a coffee—to what humans are able to do so effortlessly. Once we teach them that, though, look out. We may get that Simulatte sooner than we were prepared for.

Zac Cadwalader is the managing editor at Sprudge Media Network and a staff writer based in Dallas. Read more Zac Cadwalader on Sprudge.