Learning Skills with Motor Primitives