  The mirror game has been recently proposed as a simple, yet powerful paradigm
for studying interpersonal interactions. It has been suggested that a virtual
partner able to play the game with human subjects can be an effective tool to
affect the underlying neural processes needed to establish the necessary
connections between the players, and also to provide new clinical interventions
for the rehabilitation of patients suffering from social disorders. Inspired by
the motor processes of the central nervous system (CNS) and the musculoskeletal
system in the human body, in this paper we develop a novel interactive
cognitive architecture based on nonlinear control theory to drive a virtual
player (VP) to play the mirror game with a human player (HP) in different
configurations. Specifically, we consider two cases: the former where the VP
acts as leader and the latter where it acts as follower. The crucial problem is
to design a feedback control architecture capable of imitating and following or
leading a human player (HP) in a joint action task. Movement of the
end-effector of the VP is modeled by means of a feedback controlled
Haken-Kelso-Bunz (HKB) oscillator, which is coupled with the observed motion of
the HP measured in real time. To this aim, two types of control algorithms
(adaptive control and optimal control) are used and implemented on the HKB
model so that the VP can generate human-like motion while satisfying certain
kinematic constraints. A proof of convergence of the control algorithms is
presented in the paper together with an extensive numerical and experimental
validation of their effectiveness. A comparison with other existing designs is
also discussed, showing the flexibility and the advantages of our control-based
approach.
