Tokyo 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 startups 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 work force 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 hand-held 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.
Japan is already an industrial robot powerhouse. More than 370,000 robots worked at factories across Japan in 2005, about 40 percent of the global total and 32 robots for every 1,000 Japanese manufacturing employees, according to a recent report by Macquarie, which had no numbers from subsequent years.
And they won't be claiming overtime or drawing pensions when they're retired.
A single robot can replace about 10 employees, the roadmap assumes - meaning Japan's future million-robot army of workers could take the place of 10 million humans. That's about 15 percent of the current work force.
"Robots are the cornerstone of Japan's international competitiveness," Shunichi Uchiyama, the Trade Ministry's chief of manufacturing industry policy, said at a recent seminar. "We expect robotics technology to enter even more sectors going forward."
'Are you human?'
Meanwhile, localities looking to boost regional industry clusters have seized on robotics technology as a way to spur advances in other fields.
Robotic technology is used to build more complex cars, for instance, and surgical equipment.
The logical next step is robots in everyday life.
At a hospital in Aizu Wakamatsu, 190 miles north of Tokyo, a child-sized white-and-blue robot wheels across the floor, guiding patients to and from the outpatients' surgery area.
The robot, made by startup Tmsk, sports perky catlike ears, recites simple greetings, and uses sensors to detect and warn people in the way. It helpfully prints out maps of the hospital, and even checks the state of patients' arteries.
For Hiroshi Ishiguro, also at Osaka University, the key is to make robots that look like human beings. His Geminoid robot looks uncannily like himself - down to the black, wiry hair and slight tan.
"In the end, we don't want to interact with machines or computers. We want to interact with technology in a human way so it's natural and valid to try to make robots look like us," he said.
"One day, they will live among us," Ishiguro said. "Then you'd have to ask me: 'Are you human? Or a robot?"'