  As interactions with autonomous agents-ranging from robots in physical
settings to avatars in virtual and augmented realities-become more prevalent,
developing advanced cognitive architectures is critical for enhancing the
dynamics of human-avatar groups. This paper presents a
reinforcement-learning-based cognitive architecture, trained via a sim-to-real
approach, designed to improve synchronization in periodic motor tasks, crucial
for applications in group rehabilitation and sports training. Extensive
numerical validation consistently demonstrates improvements in synchronization.
Theoretical derivations and numerical investigations are complemented by
preliminary experiments with real participants, showing that our avatars can
integrate seamlessly into human groups, often being indistinguishable from
humans.
