A new framework for self-adaptive artificial intelligence to personalize assistance for patients using robotic exoskeletons and prostheses