Computer-assisted cognitive training may help patients affected by several illnesses alleviate their cognitive deficits, or healthy people improve their mental performance. The talk presents a web-accessible system, called MS-rehab, developed specifically for the cognitive rehabilitation of patients suffering from multiple sclerosis, but usable also in other contexts. MS-rehab embeds an AI-based mechanism that adapts the difficulty of cognitive training exercises to the trainee’s performance. The AI-based mechanisms proved to be superior to a mechanism designed by medical experts in a live experiment.