MATLAB code for learning primitive actions from human demonstrations and using these for planning complex tasks, applied to levels of the Needle Master android game.