Robots handling swords and other weapons is nothing new. Teaching them how to use them like a human is not as straightforward as it might seem. As it turns out, researchers have shown a robot how to flip nunchucks thanks to a motion-capture glove.
The teacher explains each step of the trick and create data the robot can use to complete each step. It evaluates its own performance to improve over time. Such an approach can be used to teach robots complex motor skills to robots. Science Mag has more info about this project here.