Learning by Teaching a Robot: The Case of Handwriting

Thomas (all children's names have been changed) is five and a half years old and has been diagnosed with visuoconstructive deficits. He is under the care of an occupational therapist and tries to work around his inability to draw letters in a consistent manner. Vincent is six and struggles at school with his poor handwriting and even poorer self-confidence. Whereas Thomas is lively and always quick at shifting his attention from one activity to another, Vincent is shy and poised. Two very different children, each one facing the same difficulty to write in a legible manner. Additionally, hidden beyond these impaired skills, psychosocial difficulties arise: they underperform at school. Thomas has to go for follow-up visits every week, and they both live under the label of "special care." This is a source of anxiety for the children and for their parents alike.


I. A DIFFERENT PARADIGM FOR EDUCATIVE ROBOTS
Thomas is five and half, and has been diagnosed with visuoconstructive deficits.He is under the care of an occupational therapist, and tries to work around his inability to draw letters in a consistent manner.Vincent is six and struggles at school with his poor handwriting and even poorer self-confidence. 1hile Thomas is lively and always quick at shifting his attention from one activity to another, Vincent is shy and poised.Two very different children, facing however the same difficulty to write in a legible manner.And, hidden beyond this impaired skill, psycho-social difficulties arise: they underperform at school, Thomas has to go for follow-up visits every week, they both live under the label "requires special care".This is a source of anxiety for the children and for their parents alike.
Remediations for handwriting difficulties traditionally involve long interventions (at least 10 weeks [6]), essentially consisting of handwriting training with occupational therapists, and primarily addressing the motor deficits.Improvements in self-confidence and anxiety occur (at best) as a side-effect of the child improving their handwriting skills and, consequently, improving their performance at school.
We present in this article a new take on this educative challenge: a remediation procedure that involves a "bad writer" robot that is taught by the child.By building on the learning by teaching paradigm, not only does the child practise handwriting but, as they take on the role of the teacher, they also positively reinforce their self-esteem and motivation: their social role shifts from the "underperformer" to "the one who knows and teaches".And by relying on a robot, we can tailor the exercises and the learning curve to each child's needs individually, as we will show in this article.

Learning by Teaching Handwriting
The learning by teaching paradigm, which engages the student in the act of teaching another, has been shown to produce motivational, meta-cognitive, and educational benefits in a range of disciplines [14].The application of this paradigm to handwriting intervention remains, however, unexplored.One reason for this may be due to the requirement of an appropriately unskilled peer for the child to tutor: this may indeed prove difficult if the child is the lowest performer in the class.In some cases, it may be appropriate for a peer or teacher to simulate a naïve learner for the child to teach.For handwriting however, where one's skill level is visually evident, this acting is likely to be rapidly detected.This motivates the use of an artificial teachable agent which can be configured for a variety of skill levels, and for which children do not have preconceptions about its handwriting ability.
Robots have been used as teachers or social partners to promote children's learning in a range of contexts, most commonly related to language skills [4], and less often to physical skills (such as calligraphy [12]).Looking at the converse (humans teaching robots), Werfel notes in [18] that most of the work focuses on the robot's benefits (in terms of language [15] or physical [13] skills, for example) rather than the learning experienced by the human tutor themselves.Our work concentrates on this latter aspect: by demonstrating handwriting to a robot, we aim at improving the child's performance.
A robotic learning agent which employs the learning by teaching paradigm has previously been developed by Tanaka and Matsuzoe [17].In their system, children learn vocabulary by teaching the NAO robot to act out verbs.The robot is tele-operated (Wizard-of-Oz) and mimics the actions that the children teach it, but with no long-term memory or learning algorithm in place.Our project significantly extends this line of work in two ways.First, by investigating the context of children's acquisition of a challenging physical skill (handwriting), and second by proposing a robotic partner which is fully autonomous in its learning.

Agency and Commitment
We also investigate here a particular role for a robot in the education of handwriting: not only is the robot actively performing the activity by drawing letters, but it does so in a way that engages the child in a very specific social role.The child is the teacher in this relationship and the robot is the learner: the child is to engage in a (meta-) cognitive relationship with the robot to try to understand why the robot fails and how to best help it.Here, the robot is more than just an activity facilitator or orchestrator -its physical presence and embodiment induce agency and anthropomorphizing, and cognitively engage the child into the learning activity (be it consciously or not).
The commitment of the child into the interaction builds on a psychological effect known as the "protégé effect" [2]: the teacher feels responsible for his student, commits to the student's success and possibly experiences student's failure as his own failure to teach.Teachable computer-based agents have previously been used to encourage this "protégé effect", wherein students invest more effort into learning when it is for a teachable agent than for themselves [2].We rely on this cognitive mechanism to reinforce the child's commitment into the robot-mediated handwriting activity, and we indeed show sustained child-robot engagement over extended periods of time (several hours spread over a month).
For these two reasons, our approach is to be distinguished from previous works in educational robotics.Most of these do not consider the agency induced by the robot beyond its motivational aspect (playing with an interactive, partially autonomous device induces excitement -at least, on the shortterm).In our case, the role of agency is stronger: it induces meta-cognition ("I am interacting with an agent, so I need to reflect on how to best teach him") which is beneficial for the learning process; it also induces a protégé effect ("I want my robot-agent to succeed!") which supports the commitment of the child into the interaction, also for longer periods of time.
These initial considerations can be turned into a set of research questions: how to develop a fully autonomous robotic system that produces believable handwriting, foster interaction and adequately learn from children's demonstration?Can such a system be accepted by children and practitioners alike, and eventually be integrated in existing educative and therapeutic practises?Can we build and evidence interactions that sustains children's engagement over extended periods of time?And finally, is this novel approach effective?Do we evidence actual handwriting improvements by children facing difficulties?
We attempt to provide initial insights on these questions in the remaining sections of the article.We first provide an overview of the robotic system and the interaction it induces in Section II.We present there the machine-learning techniques that allow the robot to learn from the children, as well as the actual implementation of the system on a NAO robot.
We then present and report on the field experiments that we have conducted over the last two years, including four studies at schools (Section III-A), one longer experiment with eight children in an occupational therapy clinic (Section III-B), and Fig. 2. Our experimental setup: the robot writes on a tactile tablet, the child then corrects the robot by overwriting its letters with a stylus.An adult (either a therapist or an experimenter) guides the work (prompting, turn taking, etc.).For some studies, a second tablet and an additional camera (dashed) are employed.two one-month long case studies (Sections III-C and III-D).While the focus of the school experiments was mostly the technical validation of the system and data acquisition, the three other experiments involved children with actual deficits, and gave us initial insights into the relevance and effectiveness of our approach.

II. IMPLEMENTATION OF THE INTERACTION
Figure 2 illustrates our general experimental setup: a faceto-face child-robot interaction with an autonomous Aldebran's NAO robot.A tactile tablet is used for both the robot and the child to write.During a typical round, the child requests the robot to write something (a single letter, a number or a full word), and pushes the tablet towards the robot.The robot writes on the tablet by gesturing the writing in the air, the letters being actually drawn by the tablet application itself.The child then pulls back the tablet, corrects the robot's attempt by writing herself on top of or next to the robot's writing (see Figure 6), and sends her demonstration to the robot by pressing a small button on the tablet.The robot learns from this demonstration and tries again.
Since the children are assumed to take on the role of the teachers, we had to ensure they would be able to manage by themselves the turn-taking and the overall progression of the activity (moving forwards to the next letter or word).In our design, the turn-taking relies on the robot prompting for feedback once it is done with its writing (through simple sentences like "What do you think?"), and pressing on a small robot icon on the tablet once the child has finished correcting.In our experiments, once introduced by the experimenter, both steps were easy to grasp for the children.
Implementing such a system raises several challenges: first, the acquisition, analysis and learning from hand-written demonstration, which lays at the core of the our approach, necessitates the development of several algorithms for the robot to generate initial bad writing and to respond in an adequate manner, showing visible (but not too quick) writing improvements.
Then, the actual implementation on the robot requires the coordination of several modules (from performing gestures and acquiring the user's input to the state machine implementing the high-level behavior), spread over several devices (the robot itself, one laptop and up to four tactile tablets for some of the studies that we conducted).We relied on ROS to ensure the synchronization and communication between these modules.

A. Generating and Learning Letters
Since our application is about teaching a robot to write, generating (initially bad) letters and learning from writing demonstrations is a core aspect of the project.
The main insight for both the generation and the learning of letters is to reason about the shape of letters in their eigenspace, instead of the natural cartesian space.The eigenspace of each letter is spanned by the first n eigenvectors (in our experiments, 3 < n < 6) of the covariance matrix generated from a standard dataset of adult letters (the UJI Pen Characters 2 dataset [11]).Our method, based on a Principle Component Analysis (PCA), is presented in [5].
New letters are generated by varying the weightings in linear combinations of these eigenvectors, with distortions that are actually plausible handwriting errors: they are exaggerations of variations of writing styles that naturally occur amongst adult writers.Figure 3 shows examples of deformed "g" generated with such a technique.
The same shape model can also be used to classify demonstrations, assess their quality and learn from them. Figure 4 shows for example nine allographs of "h" written by a 6 years old child, along with the reference shape.By projecting each of the demonstrations onto the eigenspace of "h" (Figure 4b), we observe that: • the different allographs can by clustered (with a k-means or mean-shift algorithm) by their visual styles, • we can compute a euclidian distance to the reference letter to assess the topological proximity of the demonstration with the expected letter, thus providing a quantitative metric of writing performance.The algorithm for machine-learning becomes then a simple matter of converging at a specific pace towards the child's demonstration in the eigenspace.Figure 8 (p.7) illustrates the process with a complete learning cycle of the number "6".

B. Robotic Implementation
Our system is embodied in an Aldebaran NAO (V4 or V5, depending on the study) humanoid robot.This choice is motivated by its approachable design [3], its size (58cm) and inherently safe structure (lightweight plastic) making it suitable for close interaction with children, its low price (making it closer to what schools may afford in the coming years) and finally its ease of deployment in the field.
Robotic handwriting requires precise closed-loop control of the arm and hand motion.Because of the limited fine motor skills possible with such an affordable robot, in addition to the absence of force feedback, we have opted for simulated handwriting: the robot draws letters in the air, and the actual writing is displayed on a synchronized tablet.
The overall architecture of the system is therefore spread over several devices: the NAO robot itself, that we address via both a ROS API and the Aldebaran-provided NaoQI API, one to four Android tablets (the main tablet is used to draw the robot's letter and to acquire the children's demonstrations; more tablets have been used in some studies, either to let the child input words to be written, or for the experimenter to qualitatively annotate the interaction in a synchronized fashion), and a central laptop running the machine learning algorithms, the robot's handwriting gesture generation (based on the NaoQI inverse kinematics library) and the high-level control of the activity (relying on PYROBOTS [10] and a custom finite state machine).
Since the system does not actually require any CPUintensive processes, the laptop can be removed and the whole logic run on the robot.Due to the relative difficulty to deploy and debug ROS nodes directly on the robot, the laptop remains however convenient during the development phase and we kept it during our experiments.
Most of the nodes are written in Python, and the whole source code of the project is available online 2 .The details of the technical implementation are available in [5].

III. FIELD STUDIES
The system has been deployed and tested in several situations: in three different schools (more than 70 children aged 5   to 8; relatively short duration interactions), in an occupational therapy clinic (8 children, each interacting several hours with the system), and during two case studies that each lasted several weeks.We report hereafter the main design choices and results for each of these studies and experiments.The interested reader can find supplementary details in [7], [5].

A. System Validation at Schools
Over the two years of the project, we conducted four studies in schools (Figure 5).These experiments were meant to technically validate the system (is it actually able to autonomously write and learn from handwriting demonstrations?) and test the interaction (is the apparatus easy to grasp and to interact with for children?).We also studied the initial acceptance of the robot in the school environment (through several formal and informal discussions with teachers) and how children engage with the robot (and maintain or not this engagement).
Critically, these studies were conducted with whole classes: we decided not to select specifically underperforming children as having more children (73 in total) was beneficial for these preliminary studies.In addition, due to ethical concerns, this would have required complex organization with the school that we wanted to avoid at the validation stage.
a) System validation: From a technical perspective, the system achieves an acceptable level of reliability and allows a technically sound autonomous interaction.For instance, during the second school study (School B), the robot withstood interactions which lasted for a total of 160 minutes.During this time the robot wrote 335 letters, 152 of which in response to demonstrations received from the 21 children.Technical intervention was only required for the three instances that the robot fell during that day.Otherwise, the technical components of the system operated autonomously and as expected with all the groups of children.
Due to the modular software architecture (mostly independent ROS nodes), the occasional crashes occurring during others studies were usually quickly resolved by re-launching the faulty node alone, and did not significantly impact the interaction.
The otherwise technical limitations were related to some letters or writing styles (most notably, the ones requiring multiple strokes per letter) not being adequately processed by the learning algorithm.Support for such letters was added as a follow-up to the validation studies.
b) Acceptance: Children's recognition that the robot is writing by itself is critical for our approach to be effective.When asked, no child indicated that they did not believe that the robot was writing by itself.There were, at times, questions about the robot's writing without a pen at the beginning of the interaction, but when advised that the robot "tells the tablet what it wants to write," this was accepted by the children.
During two focus groups organized with teachers, they welcomed the approach and recognized it as useful and promising; this was a posteriori confirmed by multiple spontaneous contacts made by parents and therapists who were looking forward to using the system with their children.c) Sustained Engagement: Factually, the children engaged into the teaching activity: in the study at school B, for instance, they demonstrated an average of 10.9 demonstration letters (SD = 4.4) for an average session duration of 11 minutes.In 9 out of the 14 sessions (64%), the robot received demonstration letters even after reaching the final stage of the interaction, suggesting an intrinsic motivation to further engage in the interaction.
We also conducted a quantitative assessment of the engagement levels of the children.Table I reports the levels of withme-ness of the children during the second study at school A. With-me-ness is a quantifiable precursor of engagement: it measures the percentage of time spent by the child focusing on the task at hand [9].We compute it by first estimating the focus of attention of the child over the course of the interaction (using real-time 6D head pose estimation); then, by matching this measured focus of attention with the expected attentional targets.For instance, when the child is supposed to write a demonstration, we expect her to look at the tablet if she is actually engaged into the task; when the robot is telling a story, we expect the engaged child to look at the robot, etc.
The average with-me-ness is well above 80%, and confirms that the children were very much engaged into these 20 minutes of interaction with the robot, paying close attention to the task.
B. Clinic Study: How Children Take on the Role of a Teacher a) Context, Study Design: This experiment was conducted to study how easily children with actual deficits take on the role of a teacher, and to what extent they adopt this role (measuring actual handwriting improvements was not a primary goal of this experiment).
The experiment took place at an occupational therapy clinic in Normandy, France.Eight children participated, selected by the occupational therapist based on their age and type of deficit (all related to handwriting).Given their age (6 to 8 years old) and school year, all of these children would be expected to know how to correctly shape cursive letters.Each child attended three times a one hour long session spread over two weeks (except for two of them who only attended one session).The experimenter's role was limited to the explanation of the task and the basic tablet usage.The children were provided with two tablets: one to choose the words (or letters) to teach to the robot, one to write.
We only provided the children with minimal explanations on the task (they would have to help the robot to improve its writing style), so as to assess if and how children would naturally take on the role of the teacher.We additionally assessed how seriously they engage into helping the robot through two additional buttons on the tablet: a green "thumbs up" and a red "thumbs down".The children were told to freely use them to evaluate the robot's improvements ("thumb up" to give positive feedback, "thumb down" to give negative feedback).Our assessment builds on the hypothesis that the more the child provides feedback to the robot, the more they assume the role of a teacher.Then, by correlating the feedback with the actual performance of the robot, we can measure to what extent the children are adopting their teacher role: if their feedback does correlate with the actual performance of the robot, the child has likely successfully adopted the teacher role.
b) Results: All children maintained their engagement during the whole sessions.They provided on average 42 demonstrations per session.All children used the feedback buttons (in total, 99 "thumbs up" and 33 "thumbs down" were recorded).This indicates that they are all able to engage into playing the role of a teacher.
To study the correlation between the children's feedback and the actual improvements of the robot, we estimate the robot's progress as the difference between an initial score (euclidian distance between the shape drawn by the robot at its first attempt and the shape of the reference letter) and the robot's score at the current round of demonstrations.We then correlate this progress to the positive or negative feedback provided by the children (details of the method, as well as the complete results, are presented in [7]).
We find that the feedback of five out of the eight children does significantly correlate with the actual performance of the robot.This indicates that these children are effectively taking on the teacher's role and are seriously providing feedback to the robot.The observation of the three remaining children reveal a variety of behaviors (for instance, one was actually rating how "nice" the robot is, and another one had rather "artistic" writing style preferences that were independent of the actual legibility of the robot), but none of these children adopted a playful-only behavior toward the robot.
To summarize, this experiment shows that children with actual handwriting impairments do accept well the robot, can commit themselves into long interactions, and do adopt the role of the teacher (as evidenced by both the number of writing demonstrations they provided and their self-inclination to give adequate feedback to the robot).

C. Case Study 1: Vincent
For the first case study, we invited and followed Vincent, a six year old child, once per week over a period of a month.Our primary aim was to address the question of whether we can sustain Vincent's engagement and commitment to the writing activity over such a period.
The study took place at our laboratory (Figure 6), and we chose to design the activity around a storyline meant to be attractive for a 6 year old boy: one of our NAOs was away for a mysterious scientific mission, and it needed the support of another one -which would remain at the lab -to interpret curious pictures that were sent every week.Vincent had to help the second robot understanding the pictures, and since the two robots had somehow beforehand agreed to communicate with "letters written like humans" (i.e.handwritten), Vincent also had to help the robot to write good-looking letters (because, well, this robot was terrible at writing!).The experimental setup was similar to Figure 2, except that Vincent had to tell the robot what to write with small plastic letters (visible behind the robot on Figure 6).Empty boxes are drawn on the screen to serve as a template for the child and to make letter segmentation more robust.
To supplement the intrinsic motivation of helping a robot to communicate with another one, we gradually increased the complexity of Vincent's task to keep it challenging and interesting (the first week: demonstration of single letters; the second week: short words; the third week: a full letter -Figure 7).
The last session was set as a test: the "explorer" robot had come back from its mission and it actually challenged the other robot in front of Vincent: "I don't believe you wrote yourself these nice letters that I received!Prove it to me by writing something in front of me!"This situation was meant to evidence the Protégé effect: by judging the other robot's handwriting, the "explorer" robot would implicitly judge Vincent's skills as teacher, and in turn, Vincent's handwriting.
a) Results: Over the whole duration of the study, Vincent provided 154 demonstrations to the robot, and he remained actively engaged over the four weeks.The story was well accepted by the child and he seriously engaged into the game.After the first week, he showed good confidence to play with  the robot and by the end of the study he had built affective bonds with the robot, as evidenced by several letters he did send to the robot after the end of the study (one of them four months later) to get news.This represents an initial validation of our hypothesis: our system can effectively keep a child engaged with the robot for a relatively long period of time (about 5 hours spread over a month), and we can build a tutor/protégé relationship.
No hard conclusion can be drawn in terms of actual handwriting remediation as we did not design this study to formally assess possible improvements.However, as visible on Figure 7, Vincent was able to significantly improve the robot's skill, and (top row) and corresponding shapes generated by the robot.The plot beneath shows the distance to the reference shape (in the eigenspace of the shape) to Thomas' demonstrations, and to the robot's attempts.
After eight demonstrations, Thomas decided that the robot's "6" was good enough, and switched to another character.In that respect, he was the one leading the learning process of the robot.
he acknowledged that he was the one helping the robot during post-hoc interviews.In that respect, Vincent realized that he was "good enough" at writing to help someone else.The fact that Vincent adopted the role of a teacher is further supported by feedback sent by Vincent's parents a week after the end of the experiment: "Vincent's handwriting has changed over the last weeks, going from a mix of standalone and cursive letters to full words in cursive.This requires a lot of effort and concentration from him, but he did succeed during the sessions with the robot as he knew he had to show a consistent style of writing to the robot".

D. Case Study 2: Thomas
The second long-term study was designed in collaboration with an occupational therapist in Geneva, and aimed at deploying the system on the longer-term with a real therapeutic case.
Thomas is a 5.5 year old child.He has been diagnosed with visuo-constructive deficits, which translate into difficulties for him to consistently draw letters.In addition, focusing on a task is difficult for Thomas, who tends to rapidly shift his attention to other things.Since the robot's learning algorithm requires repeated demonstrations of similarly shaped letters to converge, the occupational therapist was especially interested in observing if the robot would induce a strong enough motivation for Thomas to focus on producing many regular, consistent letters, thus overcoming his deficit.
The experiment took place at the therapist's clinic (four sessions spread over 5 weeks).Contrary to Vincent's experiment, we chose not to introduce any backstory beyond a simple prompt ("the robot wants to participate in a robotic handwriting contest, will you help him prepare?")only provided during the first session.Hence, we also tested during this case-study if the robot (and the Protégé effect) would induce by itself a strong enough intrinsic motivation to keep the child engaged over the five weeks.
The occupational therapist had recently carried out activities with Thomas on writing numbers, so we decided with her to focus on these as well: Thomas would use a secondary tablet to tell the robot what number to write, and would then correct the robot's attempts like in the other experiments.Figure 8 shows the attempts/corrections cycles that occurred during one of the session, on the number "6".
Since Thomas would frequently draw mirrored numbers, or hard-to-recognize shapes (see Figure 9), the learning algorithm of the robot initially tended to converge towards meaningless scribblings.We addressed this issue by having the robot refuse allographs that were too far from the reference shape (the robot would instead say "I'm not sure I understand what you are drawing..."), so that the child had to pay good attention to what he would demonstrate to the robot.Also, to make the robot's progress evident, we modified the initialization step of the learning algorithm to start with a roughly vertical stroke instead of a deformed number (see the initial state on Figure 8).a) Results: Despite his attention deficit, Thomas was able to remain engaged in the activity during more than forty minutes in each session (a long time for a five years old).In total, 55 allographs out of 82 demonstrated by the child were acceptable considering our threshold (with a progressive improvement from 13 out of 28 in the first session up to 26 out of 29 in the last session).
As soon as Thomas understood that the robot was only accepting well-formed allographs, he started to focus on it and he would typically draw 5 or 6 times the number before actually sending to the robot (the tablet lets children clear their drawing and try again before sending it).According to the therapist, it was the first time that Thomas was seen to correct himself in such a way, explicitly having to reflect on how another agent (the robot) would interpret and understand his writing.Figure 9 shows how he gradually improved his demonstrations for two different numbers.
Since the robot's handwriting started from a simple primitive (a stroke), each time Thomas succeeded in having his demonstration accepted by the robot, the improvement was clearly visible (as shown in Figure 8).This led to a selfrewarding situation that effectively supported Thomas' engagement.

IV. SUMMARY OF THE FINDINGS AND DISCUSSION
The four school studies, the experiment at the clinic and the two case-studies provide a first broad picture of how a robotbased remediation to handwriting is accepted by the children and practitioners, and what outcomes can be expected.
In total, more than 80 children have interacted with the system, for a total duration of more than 38 hours, in multiple experimental configurations (individual interaction vs. pairs vs. groups; at school, in the lab, at an occupational therapy clinic; short interactions vs. long, repeated interactions; 5 to 8 years old children).We summarize hereafter the main findings from these experiments and discuss some of the critical points of our approach.
a) Technical Assessment: We set ourselves the challenge of developing an autonomous robotic system able to perform handwriting tasks with children in real world environments.(b) Number "5" Fig. 9. Normalized distance between Thomas' demonstrations and reference allographs for the numbers "2" and "5".The horizontal dashed line correspond to the threshold for the robot to accept a demonstration.Thomas' progress is visible on these figures: we find a significant negative regression equation (r = −0.023,F (1, 19) = 8.69, p < .02,adjusted R 2 = .461)for the number "2" (dotted red line), indicating that Thomas' shapes are getting closer to the reference.The regression is not significant for the number "5", but we can observe that after about 10 repetitions, all the demonstrations are deemed of acceptable quality by the robot.
The system performed generally well: the children had no issues interacting with the robot, the robot experienced relatively few crashes, and those crashes did not significantly impair the interactions.The system has furthermore proved robust enough to conduct several hour-long experiments.However, we also found that the level of expertise required to deploy and operate our system still makes the presence of an experimenter mandatory at all time.Non-trivial technical developments may be required to reach a level of usability suitable for a broader, non-expert, audience.b) Acceptance: The acceptance of the robot in a educative and/or medical context was not initially obvious, and indeed, the attitude of practitioners toward the robot varies.For instance, while Thomas' therapist did voluntarily contact us (after hearing about the project on the radio) and readily involved herself in the design of the experiment, we had less positive feedback from other practitioners: in one instance, we contacted ourselves a local group of school psychologists to present the project: after the meeting, the opinions were definitively mixed, with some therapists willing to conduct actual experiments with their children, and others not quite as enthusiastic.
Expectedly the reaction of the children to the robot was good: they enjoyed interacting with the system, and, as we have shown, they actually committed to their teacher role over extended periods of time.The teaching situation was well accepted and technical constraints like having the robot to only gesture writing on the tablet instead of actually physically writing with a pen, were not actually raised as issues.
c) Engagement: We measured the engagement of the children by three different means: the number of demonstrations they provided to the robot, the amount of qualitative feedback they gave to the robot (in the Clinic experiment), and to what extent they were focusing on the task (measure of the with-me-ness).Independently of the experimental setting, it appears that the children engage easily into the interaction.More interestingly, we show in the Clinic experiment that they generally take on the role of a teacher easily, that they act this role seriously (and not only playfully), and that they can assume this role over an extended period of time.Designing a system that keeps children engaged over several hours is especially important for handwriting remediation, and we show in the case-studies that even children as young as 5.5 years old like Thomas were able to do so.This seems to indicate that our approach could be relevant for a broad range of ages.
Another finding relates to the Protégé effect: as seen with Vincent (when he sends us a mail several months later to know how the robot is doing with its writing) or with Thomas (when he realizes that the robot "does not understand", and consequently quickly improves his own writing to better help the robot), our system does elicit a Protégé effect that not only helps the children to remain engaged in their teaching over several weeks, but also positively impacts their learning process (Vincent strives to write in a consistent manner, as does Thomas).This supports a posteriori our choice to build an interaction situation based on the learning by teaching paradigm.
d) Remediation Efficacy: Vincent's case study did provide us with initial material to evidence handwriting improvements (Figure 7) and the study with Thomas provides further data, both quantitative (Figure 9) and qualitative (feedback from the therapist that points how Thomas is much better at drawing consistent shapes in a repeated manner, as well as reflecting on his own performance by training several times before actually sending a demonstration to the robot).
We must however remain cautious here as for the actual role of the system: while the children were indeed the ones deciding what to teach to the robot and the robot was autonomously learning and responding, the role of the adults (the experimenters or the occupational therapists) should not be underestimated.Beyond the normal explanations of how to operate the tablet and how to interact with the robot, the adults played the role of a facilitator in each of the studies by prompting the children to comment on the robot's performance, suggesting possible corrections, or proposing to try another letter/number/word.This facilitation not only compensates for the possible shortcomings of the interaction, but is also a fundamental part of the learning process itself.In that respect, our robot is essentially a tool that creates a favorable learning situation for the child, and where the adult (be it a teacher or a therapist) keeps their entire educative role.

V. CONCLUSION
We believe that this research provides a novel perspective on educative robots at several levels.Namely, we show that: • robots in an educative context are certainly relevant and effective beyond STEM (Science, Technology, Engineering and Mathematics) teaching, • we can successfully transpose the well-established learning by teaching paradigm from education sciences to robotics, even in a complex form: handwriting is a difficult physical skill, the robot learns and interact autonomously, the child is responsible not only for the teaching but also for the teaching orchestration by managing the turn taking and the progression of the activity, • blending machine-learning techniques with human-robot interaction allows for building a believable agent, that induces social commitment, • this social commitment induces cognitive engagement of the child with the robot, which is a key learning lever as it elicits reflective, meta-cognitive mechanisms on the learning task, and that • we have been able to sustain a long-term interaction (several hours) involving a task that would typically be considered repetitive and challenging by the children.Supported by several field experiments, our initial results are promising as we ultimately evidence handwriting improvements.It is however still early to quantify the lasting effects of this remediation: handwriting is a complex cognitive skill, that builds on many individual and social factors.Self-confidence is one of them.Our approach endows the child with the role of a teacher who can help a robot: we expect it may as well help some children to recover self-esteem and self-confidence by putting them in a positive, gratifying role.The experiments that we have conducted so far do not allow us to confirm this hypothesis yet, and more research will have to be conducted in this direction.a) Possible Ethical Concerns: There are two aspects of this research ought to be discussed in terms of their possible ethical implications: the perceived role of the robot vis-à-vis the real teachers, and the implications of the mentor-protégé relationship for children, especially vulnerable ones.
The place and role of the robot vis-à-vis the teacher can be questioned: as we see it, the role of the robot within the classroom (or at the therapist's clinic) does not infringe upon the role of the adult (teacher or therapist).The core of the learning by teaching paradigm relies on the child becoming the teacher of an underperforming pupil (the robot): from that perspective, the robot does not replace the teacher, on the contrary.It plays a different role in the classroom, which happens to be novel as well: the robot is the least performing student, and still a very patient, always eager to improve, one.In our experience, the teacher/facilitator keeps an instrumental role during the interaction, and the learning would hardly occur if the child is left alone (or even semi-alone).The initial feedback that we received from the teachers during the focus groups confirms this perception: once explained, our approach make sense to them and is indeed welcomed as a relevant pedagogical innovation.
The implication of the mentor-protégé relationship on the children is less clearly understood.We have certainly seen that the children can establish strong affective bonds with the robot (as witnessed for instance by the letter sent by Vincent several months after he interacted with the robot), but we are not yet able to precisely characterize these bonds.The ethical implications of the mentor-protégé relationship have been explored before in the context of human teaching [8], [16], but they mostly looked at the question from the perspective of the protégé, whereas in our case, the child is the mentor.As such, relatively little is known on the psychological implications for a child to commit to helping a robot, and as advocated by Belpaeme and Morse [1], we likely need to first gain more field experience before being able to draw conclusions.
Beyond handwriting, we do however believe that this work provides a novel perspective on the role for robots in the field of education.Learning by teaching is a powerful paradigm because of not only its pedagogical efficacy, but its potential to positively impact the child's motivation and self-esteem.While we need to carefully clear up the possible ethical concerns, we hope that this article shows that this is a very relevant context of use for robots: when facing a child with school difficulties, robots can play the role of a naïve learner which neither adults nor peers can convincingly play.

Fig. 1 .
Fig. 1.Thomas teaching a NAO robot how to write numbers, with the help of an occupational therapist.

2 Fig. 3 .
Fig. 3. Generating bad letters: effect of independently varying the weightings (columns) of the first five eigenvectors (rows) of the shape model of "g".Examples A, B, C, D illustrate how the PCA-based approach allows for the automatic generation of letters whose errors are typical of children handwriting: A has too large a bottom loop, B has a wide top loop, the bottom loop of C is not correctly closed, the top loop of D is not closed, etc.
(a) Nine allographs of the cursive "h", next to the reference (b) The same samples, normalized and projected in the eigenspace spanned by the first 3 eigenvectors: clusters arise, that actually match writing styles.

Fig. 4 .
Fig. 4. Projecting demonstrated letters onto the eigenspace generated from the reference dataset effectively clusters the samples according to their topological similarity.Allographs that are similar to the reference are close to it in the eigenspace.

Fig. 5 .
Fig.5.The first field studies were focused on technical validation, with more than 70 pupils interacting with the robot over short periods (between 10 and 25 minutes), either alone or in small groups.
(a) Initial text, generated by the robot (b) Final text, after training with Vincent

Fig. 7 .
Fig. 7.Text (in French) generated by the robot, before and after a one hour long interaction session with the child.The red box highlights one instance of striking improvement of the robot's handwriting legibility 'envoyer'.

Fig. 8 .
Fig.8.Demonstrations provided by Thomas for the number "6" (top row) and corresponding shapes generated by the robot.The plot beneath shows the distance to the reference shape (in the eigenspace of the shape) to Thomas' demonstrations, and to the robot's attempts.After eight demonstrations, Thomas decided that the robot's "6" was good enough, and switched to another character.In that respect, he was the one leading the learning process of the robot.

TABLE I
LEVELS OF WITH-ME-NESS.PERCENTAGE OF INTERACTION TIME DURING WHICH THE CHILD WAS EFFECTIVELY FOCUSING HER ATTENTION ON THE TASK.THE SIX CHILDREN ARE THOSE FROM THE SECOND STUDY AT SCHOOL A. INTERACTION DURATION: M = 19.6MIN, SD = 1.58.RESULTS TAKEN FROM [9].
Fig. 6.Vincent correcting NAO's attempt by rewriting the whole word.