Seven years ago, Pieter Abbeel set out on a quest: to teach a robot how to fold laundry. This proved to be a remarkably difficult task — and the difficulty of the task illuminates some key things about the limits of machines.

Abbeel, a professor at the University of California, Berkeley, named his robot BRETT — short for the "Berkeley Robot for the Elimination of Tedious Tasks."

For a robot, it's remarkably hard to figure out what's going on in a pile of laundry — to see, say, where the underwear stops and where the towel begins. Every pile of laundry is different, and remarkably complex.

Abbeel's team spent months staring at laundry baskets, holding towels up in the air, and taking pictures of laundry.

The solution was super complicated. "Can you use multiple images to build a 3-D model of the current shape?" Abbeel says. "Because once you can do that, then you can analyze that 3-D shape [and] find where the corners are."

Abbeel and his colleagues solved the problem, sort of. After years of work they taught BRETT to fold a towel in 20 minutes — eventually he learned to do it in a minute and a half. But he can still get stumped by things like a bundled-up sock or an inside-out onesie.

In other words, years of work from dedicated, smart researchers have produced a towel-folding robot that can't keep up with an average 8-year-old. This problem, Abbeel says, is not limited to towels.

"Once you start working in robotics," he says, "you realize that things that kids learn to do up to age 10 ... are actually the hardest things to get a robot to do."

Copyright 2016 NPR. To see more, visit http://www.npr.org/.