Learning high-level manipulative tasks through imitation