Pepper is a pretty smart robot capable of learning new skills. As this video shows, the robot can learn how to play the ball-in-a-cup game. The movement is demonstrated to the robot at the start. Even though the demonstration doesn’t land the ball in the cup, Pepper can still learn how to play the game through a trial & error process.
As SoftBank explains, the robot optimized its behavior and landed the ball in the cup repeatedly after 100 trials.