At a university lab in a Tokyo suburb, engineering students are wiring a rubbery robot face to simulate six basic expressions: anger, fear, sadness, happiness, surprise and disgust.
Hooked up to a database of words clustered by association, the robot — dubbed Kansei, or "sensibility" — responds to the word "war" by quivering in what looks like disgust and fear. It hears "love," and its pink lips smile.
"To live among people, robots need to handle complex social tasks," said project leader Junichi Takeno of Meiji University. "Robots will need to work with emotions, to understand and eventually feel them.
While robots are a long way from matching human emotional complexity, the country is perhaps the closest to a future — once the stuff of science fiction — where humans and intelligent robots routinely live side by side and interact socially.
Robots are already taken for granted in Japanese factories, so much so that they are sometimes welcomed on their first day at work with Shinto religious ceremonies. Robots make sushi. Robots plant rice and tend paddies.
There are robots serving as receptionists, vacuuming office corridors, spoon-feeding the elderly. They serve tea, greet company guests and chatter away at public technology displays. Now start-ups are marching out robotic home helpers.
They aren't all humanoid. The Paro is a furry robot seal fitted with sensors beneath its fur and whiskers, designed to comfort the lonely, opening and closing its eyes and moving its flippers.
For Japan, the robotics revolution is an imperative. With more than a fifth of the population 65 or older, the country is banking on robots to replenish the workforce and care for the elderly.
In the past several years, the government has funded a plethora of robotics-related efforts, including some $42 million for the first phase of a humanoid robotics project, and $10 million a year between 2006 and 2010 to develop key robot technologies.
The government estimates the industry could surge from about $5.2 billion in 2006 to $26 billion in 2010 and nearly $70 billion by 2025.
Besides financial and technological power, the robot wave is favored by the Japanese mind-set as well.
Robots have long been portrayed as friendly helpers in Japanese popular culture, a far cry from the often rebellious and violent machines that often inhabit Western science fiction.
This is, after all, the country that invented Tamagotchi, the handheld mechanical pets that captivated the children of the world.
Japanese are also more accepting of robots because the native Shinto religion often blurs boundaries between the animate and inanimate, experts say. To the Japanese psyche, the idea of a humanoid robot with feelings doesn't feel as creepy — or as threatening — as it might do in other cultures.
Still, Japan faces a vast challenge in making the leap — commercially and culturally — from toys, gimmicks and the experimental robots churned out by labs like Takeno's to full-blown human replacements that ordinary people can afford and use safely.
"People are still asking whether people really want robots running around their homes, and folding their clothes," said Damian Thong, senior technology analyst at Macquarie Bank in Tokyo.
"But then again, Japan's the only country in the world where everyone has an electric toilet," he said. "We could be looking at a robotics revolution."
That revolution has been going on quietly for some time.