## 1 Introduction
It must be noted that, even though the current version of PEL is simple enough to understand how to specify exergames, its direct use on behalf of therapists is not currently recommended without the support of developers. Nevertheless, PEL has been designed to be integrated with high-level authoring tools that facilitate the generation of personalized exergames. These tools will integrate a software module to generate the PEL sentences that represent the graphic definition of the exergame made by the therapist. This work also addresses the initial design of a high-level graphical tool to provide this support for therapists. The research work carried out in this article is focused on the benefits that the definition of a language to personalize exergames, which can be automatically generated, may have in the physical rehabilitation process of stroke patients. Particularly, the generated exergames must engage and motivate them. At the same time, these exergames must be useful, easy to use, and increase the intention of use of the developed rehabilitation system. From the therapist's point of view, a benefit should be also achieved thanks to the customization and monitoring capabilities that are offered by PEL. To validate the proposal, and with the aim of evaluating the current capabilities of PEL as a basis for the generation of personalized exergames, a study has been conducted with 17 patients and six therapists. Thus, the main contributions of this article are as follows:  
* Firstly, a methodology is proposed for the design and generation of customized exergames. This methodology addresses the therapeutic goals of the rehabilitation process, the enabled interaction schemes for the patients to interact with the exergames, the feedback and motivation mechanisms to engage patients by means of gamification techniques, and the definition of metrics to keep track of the patients' progress. * Secondly, a language, named PEL, is designed and developed for the creation of personalized exergames, whose sentences can be processed to automatically generate exergames. The lexical, syntactical, and semantic aspects of PEL are presented. * Thirdly, the foundations for building computing systems that are able to process PEL sentences are established. This base can be used not only to automate the generation of exergames, but also to facilitate the automatic adjustments of rehabilitation exercises that are defined by means of PEL. A design proposal of a graphical tool to support the definition of exergames by therapists is also addressed. The rest of the paper is structured, as follows. Section 2 provides a description of relevant related work within the scope of the proposal. Subsequently, Section 3 introduces the proposed methodology and describes in depth PEL, the devised language for personalizing exergames. Section 4 deals with a case study in which PEL is used to define a number exergames for stroke patients. These exergames are evaluated by stroke patients and therapists from one hospital and two community centers. Section 5 validates the proposal and discusses the major conclusions that were obtained after evaluating the use of PEL as a core component to define exergames and the rehabilitation system that runs the generated exergames. Finally, Section 6 presents the final conclusions and outlines future research lines.