Learning to improvise, improvising to learn: a process of responding to complex environments