In 2015, the first guests arrived at the Henn na Hotel — an inn outside Nagasaki in southern Japan. They were not served by receptionists, concierges and bellboys but by an 82-strong staff of robots.

As the customers flooded in, the hotel’s robot army swelled. By 2017 it had 285 machines performing 27 different jobs that would normally be done by humans. In its eccentric way, the Henn na Hotel seemed to offer Japan a glimpse of a perfect future: the problems of the world’s fastest ageing and most rapidly shrinking developed country answered by an even faster series of advances in robotics and artificial intelligence.

But by late 2018, reality hit Henn na. The robots were not actually up to scratch. Once the novelty wore off, voice-controlled AI was an irritating substitute for a person, so guests called in human help. As they hit their third year of operation, the robots needed complicated maintenance and expert retuning. The robots were, said the manager of the hotel as he rapidly reduced their numbers, too reliant on human resources.

By many accounts, we are now in the midst of a fourth industrial revolution, powered by AI and robotics, that will transform our economies and societies. In many parts of the world, the rapid pace of progress evokes fear and concern.

Japan might be the exception. There, automation simply is not advancing quickly enough to compensate for a rapidly declining workforce, which is forecast to shrink by 13m to 52.5m in the next 20 years. A significant relaxation of immigration rules remains politically off-limits in the culturally homogenous country and in any case is just a short-term fix.

Dinosaur check-in robots were not up to scratch in the end © AFP

Such concerns may seem out of place in a country that had the highest “robot density” in the world until 2009, when it was overtaken by South Korea, according to the IMF. Japanese manufacturers pioneered the use of industrial robots, automating many lower-skilled jobs as wages rose alongside economic growth. Why, then, has Japan failed to take robots beyond factories and put them to work as nurses, cleaners and cooks?

The difference lies in the unpredictability of the environments that robots have to navigate. A factory floor or a warehouse can be carefully designed to be conducive to automated work. Robots excel at such tasks.

Elsewhere is different. Jobs that involve physical labour, but take place in unpredictable environments, rely on human ingenuity and our ability to learn and adapt without being trained for every possible scenario. Conventional wisdom says such tasks are more susceptible to automation than highly skilled, knowledge-based work.

Recent research suggests otherwise. According to the McKinsey Global Institute, current technology can automate only 25 per cent of tasks in such unpredictable physical jobs as nursing and construction, compared with around two-thirds for work involving predictable environments. Henn na Hotel is a case in point: robots could fulfil only some of the many demands that guests placed on them and required substantial human effort to correct their errors and maintain them.

Michael Chui, one of the authors of the MGI report, explains: “Machine learning should really be called machine training, and the real world has so many possible characteristics that it remains incredibly difficult to train robots on all those outcomes.” He points to the intensive efforts of self-driving carmakers as an example of the immense research input required to automate skills that come naturally to humans.

Creating algorithms that can rapidly make sense of real-world situations involves semi-supervised, or unsupervised “deep learning”, where AI systems train themselves. Such algorithms are getting better, but are still far less adaptable than human workers. Progress is also needed on the hardware: fully replacing a human nurse with a robot, for instance, would require a major improvement in the machines’ mobility, dexterity, and battery efficiency.

Asked about Japan’s predicament, Mr Chui says that the country celebrates technology and AI but has fallen behind in many ways. He emphasises the need for appropriate policies and financing to make the business case for automation more favourable.

Japan’s government appears to grasp the gravity of the challenge, setting out its vision in Society 5.0, a policy that aims to create a new social and economic model by harnessing technologies such as AI and the internet of things. It stresses the vital role of robotics in elderly care and customer service.

However, developing and deploying robots will be a formidable task for Japan’s greying society. Overcoming longstanding fears and preferences that lead people to prize the human touch may be the greatest challenge of all.