How virtual agents can learn to synchronize: an adaptive joint decision-making model of psychotherapy