Autonomous Methods for Learning and Pruning Motion Primitives for Navigation and Adversarial Tasks