  Social learning is widely observed in many species. Less experienced agents
copy successful behaviors, exhibited by more experienced individuals.
Nevertheless, the dynamical mechanisms behind this process remain largely
unknown. Here we assume that a complex behavior can be decomposed into a
sequence of $n$ motor motifs. Then a neural network capable of activating motor
motifs in a given sequence can drive an agent. To account for $(n-1)!$ possible
sequences of motifs in a neural network, we employ the winner-less competition
approach. We then consider a teacher-learner situation: one agent exhibits a
complex movement, while another one aims at mimicking the teacher's behavior.
Despite the huge variety of possible motif sequences we show that the learner,
equipped with the provided learning model, can rewire ``on the fly'' its
synaptic couplings in no more than $(n-1)$ learning cycles and converge
exponentially to the durations of the teacher's motifs. We validate the
learning model on mobile robots. Experimental results show that indeed the
learner is capable of copying the teacher's behavior composed of six motor
motifs in a few learning cycles. The reported mechanism of learning is general
and can be used for replicating different functions, including, for example,
sound patterns or speech.
