Be forewarned -- this could be how a futuristic sci-fi thriller comes to life.  

Led by associate professor Osamu Hasegawa, researchers at the Tokyo Institute of Technology have developed a robot that can adapt to changing situations. The robot operates on an algorithm called a self-organizing incremental neural network (SOINN). This allows the robots to perform a task it has to learn on the fly.

According to Hasegawa's lab, SOINN is an unsupervised online-learning method, which is capable of incremental learning, based on Growing Neural Gas (GNG) and Self-Organizing Map (SOM). Robots using SOINN technology can also "approximate the distribution of input data and estimate appropriate the number of classes by forming a network."

Hasegawa says SOINN is effective for data processing, image and sound pattern recognition and of course, implementation in intelligent robots. In the video below, the robot originally pours a fake glass of water into a cup. It does this successfully, pouring pellets (which are acting as water) into the cup with no problem.

Then it is tasked with making the water cold, a change-up from its original job. With both hands occupied, the robot realizes it has to put down the canteen of "water." He does so and then picks up a cube of ice and places it in the cup of water.

This robot has done this through connecting to the internet and figuring out how to do something it does not know. Hasegawa says it can even connect with other robots. For instance, Hasegawa cites an example of the robot connecting with a robot in the U.K. and learning how to make English style tea for an elderly person in a nursing home.

Hasegawa has provided a software download of SOINN available here.

Here are a few videos.