  Physical learning is an emerging paradigm in science and engineering whereby
(meta)materials acquire desired macroscopic behaviors by exposure to examples.
So far, it has been applied to static properties such as elastic moduli and
self-assembled structures encoded in minima of an energy landscape. Here, we
extend this paradigm to dynamic functionalities, such as motion and shape
change, that are instead encoded in limit cycles or pathways of a dynamical
system. We identify the two ingredients needed to learn time-dependent
behaviors irrespective of experimental platforms: (i) learning rules with time
delays and (ii) exposure to examples that break time-reversal symmetry during
training. After providing a hands-on demonstration of these requirements using
programmable LEGO toys, we turn to realistic particle-based simulations where
the training rules are not programmed on a computer. Instead, we elucidate how
they emerge from physico-chemical processes involving the causal propagation of
fields, like in recent experiments on moving oil droplets with chemotactic
signalling. Our trainable particles can self-assemble into structures that move
or change shape on demand, either by retrieving the dynamic behavior previously
seen during training, or by learning on the fly. This rich phenomenology is
captured by a modified Hopfield spin model amenable to analytical treatment.
The principles illustrated here provide a step towards von Neumann's dream of
engineering synthetic living systems that adapt to the environment.
