A group of robotics students at Stanford University have married Microsoft's Kinect peripheral to a dextrous mechanical arm to create a surprisingly adept sword-swinging robot.
The robot arm itself isn't terribly impressive. Robot arms have been around for decades. The inventive bit, is what the students have done with the arm, a Kinect and custom-written software.
... the robot arm is pre-programmed with a bunch of "attack moves" and it defends by using the Kinect to track the green lightsaber. To attack, JediBot performs a random attack move, and if it meets resistance -- another lightsaber, a skull, some ribs -- it recoils and performs another, seemingly random, attack. It can attack once every two to three seconds -- so it isn't exactly punishing, but presumably it would only require a little knob-tweaking to make it a truly killer robot.
To defend, the JediBot uses the Kinect sensor to pick the green lightsaber out of the background (that's why it isn't blue), and performs depth analysis to work out where it is in comparison to the robot's lightsaber.
In short, the arm mimics an actual human swordfighter with unpredictable attack patterns, and an ability to perceive and react to its opponent's movements. Sure, it's blind if you come after it with anything other than a bright green foam weapon, but that's still a rather impressive feat of engineering.
The JediBot was created as part of Stanford's Experimental Robotics course. Essentially, this is a class that offers students the robotic arm, and tasks them with giving it a new set of skills. Previous years have spawned arms that can play ping-pong, play golf and grill hamburgers.
The potential for this kind of technology is nearly infinite. In the most basic sense, the students have given a machine the ability to perceive the world around it in the much the same way humans do, and thoughtfully interact with its surroundings in whatever way it may see fit.
Also, they gave it a weapon. Yay science!