Learning deferred imitation of long spatial sequences