A dynamic difficulty adjustment framework for serious games applications in neurorehabilitation