Fast Learning and Prediction of Event Sequences in a Robotic System