ASAHIKAWA (Japan) • Removing the tiny eyes that pockmark potatoes is dull, repetitive and time-consuming work - perfect, it would seem, for robots in a country where the population is declining and workers are increasingly in short supply.
But it is not so simple.
When a food processing plant that makes potato salad and stews in Hokkaido, Japan's northernmost island, tried out a robot prototype that was designed to remove the potatoes' eyes, the machine was not up to the task.
The robot's camera sensors were not sensitive enough to identify every eye.
While human hands can roll a potato in every direction, the robot could rotate the vegetables on only one axis, and so failed to dig out many of the blemishes that are toxic to humans. Other perfectly good pieces were carved away.
"Fundamentally, it could not do the work to the standard of humans," said Mr Akihito Shibayama, a factory manager at Yamazaki Group, which operates the plant in Asahikawa, a city in the middle of Hokkaido.
At the plant, 30 workers process about 15 tonnes of potatoes a day.
Japan, the world's third-largest economy, hopes that robots and other types of automation will help solve its demographic problems and impending labour shortage.
That priority is reflected in a government blueprint, dubbed Society 5.0 and repeatedly emphasised by Prime Minister Shinzo Abe.
But businesses are struggling as some jobs that seem ripe for a robotic takeover prove remarkably difficult to outsource to a machine.
Robots can "perform simple tasks but not tasks that require judgment or the ability to evaluate a change in a situation", said Mr Toshiya Okuma, associate director of global strategy in the robot business division of Kawasaki Heavy Industries, a leading Japanese developer of robotics that has long helped to automate car-factory assembly lines.
Looking to robots allows Japan to avoid hard choices about immigration, a delicate topic in a country reluctant to let in many outsiders. But it is also a good cultural fit.
Japan was an early adopter of robots, installing them in car factories, starting in the 1970s.
And some of the most beloved Japanese touchstones are robots.
Doraemon, a cuddly blue robot cat, stars in a comic book series and one of the country's longest-running television shows.
Astro Boy - or Tetsuwan Atomu in Japan - is a superhero in comics, television shows and movies, a kind of android equivalent of Pinocchio who fights for peace between robots and humans.
Still, however hospitable Japanese businesses have been to robots, they have learnt that robots able to perform somewhat sophisticated tasks cost much more than human workers.
So at the factory in Asahikawa, where about 60 per cent of the work is automated, many tasks still require the human touch.
Workers peel pumpkins, for example, because some skin enhances the flavour of stew. A robot cannot determine just how much skin to shuck off.
Other efforts to use robots or automation have hit snags, in programmes ranging from self-driving buses to package-delivering drones to robots that comfort nursing-home residents.
A hotel staffed by androids in southern Japan ended up laying off some of its robots after customers complained that they were not as good at hospitality as people.
During a trial of self-driving buses in Oita City, also in southern Japan, one bus crashed into a kerb, and officials realised that autonomous vehicles were not quite ready to cope with situations like traffic jams, jaywalkers or cars running red lights.
For decades, Japan has been a leader in the use of robots. It is the world's largest maker of industrial robots, and once led the globe in the number of robots to each employee, said Ms Gee Hee Hong, an economist specialising in Japan at the International Monetary Fund.
More recently, according to the International Federation of Robotics, Singapore, South Korea and Germany have overtaken Japan in the number of robots to each worker.
Helping to drive the interest in robots are concerns about the declining population in Japan, where births are at their lowest level since 1874. Already, industries like manufacturing, caregiving, construction and agriculture are starting to run low on workers.
In Japan, said Mr Todd Sneider, deputy division chief for the Japan division of the International Monetary Fund, "instead of displacing workers, you are simply replacing workers".