Every middle school graduate remembers turning a potato into a clock. But only Marek Baczynski would turn a potato into a self-driving car.

In a short and exceedingly dark video, the Swedish engineer took what appears to be a Yukon Gold and transformed it into an electrified companion named Pontus. While the video, seen by over 250,000 people, is humorous, the tech behind Baczynski’s work, which he explained in an accompanying Reddit post, is pretty legit.

As you already know, potatoes give off a tiny electrical current that can be used to set off an alarm clock or run its wheels for a few seconds. But, as Baczynski explains, other people’s paltry potato vehicles have only gone in a straight line. This tuber, by contrast, was autonomous.

To make this happen, Baczynski took two key steps. First, he used a microchip to harness energy and added a tiny capacitor to store the energy. Then he added a control board, programmed to give the potato a four-point compass, which it can stop at any point. Once the potato decided on a direction for itself, off its little wheels went.

autonomous car robot potato self driving design
In order to make the potato mobile, he had to do some serious calculations of the tuber's raw energy, the ability of the capacitor, and the needs of the motor.

As you’d expect from a DIY plantmobile, its choices were pretty random, sending it skirting around the far reaches of Baczynski’s home. Real autonomous cars, by contrast, rely on GPS, special lasers, and other real-time sensory input to make safe, strategic choices.

Over time, though, Pontus’s erratic behavior brought the potato and his creator closer together. Unfortunately, that didn’t stop Baczynski from eating Pontus, much to the horror of YouTubers and redditors.

“I tried to play God,” Baczynski says in the clip, “but I ended up baking my best friend.”

Photos via Marek Baczynski (1, 2)