Integrating the Cognitive with the Physical: Musical Path Planning for an Improvising Robot