<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>A Novel Approach for Behavior Management and Real-Time Adaptation during Child-Robot Interaction</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Giulia Berettieri</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Anna Allegra Bixio</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Lucrezia Grassi</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Carmine Recchiuto</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Antonio Sgorbissa</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Dibris Dept., University of Genoa</institution>
          ,
          <addr-line>Genoa</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>The paper presents a robotic architecture for managing behavior in educational settings, inspired by Applied Behavior Analysis (ABA). The system features a social robot that (1) learns a model of a child's goals, beliefs, and intentions, grounded in observations and conversations, to explain their detected behavior, and (2) responds efectively to behaviors by planning appropriate sequences of actions to implement the strategies suggested by experts. By leveraging cloud-based processing and local execution, the robot dynamically adapts to social interactions in real-time, delivering educational activities, monitoring children's behavior, and applying behavior management strategies. Results from the experimental evaluations highlight the system's replanning and cloud response times, as well as its overall efectiveness.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Behavior Management</kwd>
        <kwd>Real-Time Adaptation</kwd>
        <kwd>Child-Robot Interaction</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>Section 2 introduces the ABA methods and describes the scenario. Section 3 details the system’s
architecture and behavioral planning. Section 4 discusses a case study of behavior function recognition.
Section 5 summarizes the results. Finally, Section 6 discusses the conclusions and limitations.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Background and problem statement</title>
      <p>
        Applied Behavior Analysis is an evidence-based approach aimed at improving socially significant
behaviors [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. In the ABA framework, behavior is modeled as purposeful (functional) and influenced
by stimuli occurring before (antecedents) and after the behavior (consequences). Functional Behavior
Assessment (FBA) [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] is the process of identifying the functions or purposes of behavior, through an
assessment of its antecedent and consequence. The study considers two functions:
• Gain a Tangible, i.e. the purpose of behaviors aiming at having access to preferred stimuli.
• Escape, i.e. the purpose of behaviors aiming at avoiding unpleasant situations.
      </p>
      <p>FBA also provides valuable support to educators by ofering a structured method for managing
complex behaviors in a classroom setting.</p>
      <p>Given this premise, the problem we aim to address is how to develop an autonomous social robot
capable of planning educational activities, continuously monitoring children’s actions, conducting
FBA to identify the purposes of challenging behaviors, and proposing alternative strategies to handle
them. Our goal is not to categorize behaviors but to address a common classroom struggle: managing
behaviors considered “challenging” because they present major challenges to maintaining a productive
learning environment. A robot that can tailor learning interactions and respond efectively to others’
behaviors through the use of efective strategies could greatly improve the integration of robotics in
education.</p>
    </sec>
    <sec id="sec-3">
      <title>3. System architecture and planning for behavioral change</title>
      <p>To achieve efective and autonomous behavior management in CRI, we have designed a software
architecture that integrates cloud-based processing with local execution capabilities. Figure 1 illustrates
the detailed layout of the proposed system architecture, which is divided into two main components:
the Server and the Client.</p>
      <p>The server hosts two primary elements: the Hub and the Planner Engine. The Hub manages
connections to the external cloud service OpenAI, while the Planner Engine leverages Fast Downward,
a highly eficient planning system based on the Problem Domain Definition Language. The Planner
Engine processes inputs from the client, specifically the PDDL domain and the initial problem. These
ifles outline the available actions, their efects, preconditions, and the initial state of the problem that
the robot needs to address.</p>
      <p>The client, embedded within the robot, comes preloaded with the necessary domain and initial
problem files. The Plan Manager is responsible for sending these files to the Planner Engine and
retrieving the generated plan.</p>
      <p>Upon receiving the plan, the Behaviour Manager takes charge, iterating through the plan and
determining the actions that need to be executed by checking the predicates.</p>
      <p>As actions are performed, the PDDL Predicate Retriever asserts new predicates about the current
state of the world based on the interaction with the child and the environment. The goal is to monitor
plan progress to ensure that the actual preconditions and efects of actions match the expected ones.</p>
      <p>On one hand, the PDDL Predicate Retriever employs its sensors to make assertions about the
current state of the world; on the other hand, it attempts to infer the child’s mental state through
conversation. To this end, the robot employs Microsoft Azure services to transcribe the child’s spoken
words captured by microphones. The transcribed text is then sent to OpenAI, which analyzes the
content to generate appropriate responses and identify predicates related to the child’s behavior.</p>
      <p>The Behavior Manager compares asserted predicates with the expected preconditions and efects
in the plan. If the predicates do not match, the Behavior Manager triggers the Plan Manager, which
may then initiate a replan. This process follows a match and go approach, where the robot continuously
evaluates the environment against a set of predefined predicates and conditions that must be met for
an action to be executed. When a new situation arises, the robot checks its current state against the
efects of the current action and all other actions’ preconditions. If these conditions match the expected
criteria, the robot can either proceed to execute the next action — hence the term go — or request a
replan. This method ensures that the robot’s actions are contextually adaptive.
4. A case study: Escape and Gain a Tangible
Drawing from ABA and FBA principles, two behavior functions were identified to be recognized for
preliminary testing of the model’s validity: Gain a Tangible and Escape. The aim is that, through verbal
interaction with the child, the robot would be able to autonomously recognize the occurrence of the
following behaviors:
• Gain a Tangible: When pleasant activities are interrupted by time limits, negative reactions of the
child may be elicited.
• Escape: When presented with a task, a child may perceive it as too dificult or too boring,
potentially provoking adverse responses to avoid the task.</p>
      <p>With a comprehensive understanding of these psychological approaches, we developed a PDDL
domain capable of autonomously managing various scenarios of interest according to the ABA approach.
Leveraging actions detailed in Table 1, the framework can adapt to diferent situations, including making
real-time adjustments. The initial plan involves a robot presenting a memory card game to a child.
The process begins with a brief interaction (Interact), followed by an explanation of the rules
(PresentTask).The robot then monitors the child while they play (Wait). As time nears its end, the
robot warns the child (WarningCleanUp), instructs them to stop and put away the cards (PutAway),
confirms they have finished ( ConfirmAllGood), and ends with praise (GoodJob). During the Wait
action, the robot may detect issues by querying students via OpenAI-supported verbal interactions.</p>
      <p>The paragraphs below present some examples of verbal interaction logs related to this situation. User
inputs are denoted by “U,” the robot’s responses by “R,” and the retrieved predicates by “P.”</p>
      <sec id="sec-3-1">
        <title>U: Pepper, can we talk while I am playing? R: Giulia, let’s play together!</title>
        <p>P: warning, not_waiting, want_to_play
U: No, don’t worry, I don’t want to play anymore.</p>
        <p>R: Giulia, why are you so upset?
P: warning, not_waiting, want_to_play, not_agreed, not_doing
Replan is needed</p>
        <p>In the exchange above, the robot detects a shift in the child’s engagement, recognizing that Giulia
is no longer interested in continuing the game. This prompts replanning starting from the current
state (see Section 3), with the asserted predicate not_doing acting as a trigger. In response to this
interaction, a new plan is formulated, which includes the action (DiscoverToM1 game kid memory).
The efect of this action is investigating, and the following log shows a possible outcome of the
interaction.</p>
      </sec>
      <sec id="sec-3-2">
        <title>U: Because this game is too dificult! R: Giulia, what makes this game dificult for you?</title>
        <p>P: investigating, task_is_hard
Replan is needed</p>
        <p>This update leads to the conclusion that the task is perceived as too challenging for the user, triggering
again the PDDL Predicate Retriever to update the predicates describing the current state. It causes a
mismatch with the expected efects of the current action that is detected by the Behavior Manager,
which prompts the Plan Manager for a replanning process that will generate a new sequence of actions.
This particular case would confirm that the child believes the proposed task is too dificult, and the
robot will respond accordingly by implementing the Escape function strategy. However, this is just one
possible scenario.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>5. Performance Evaluation</title>
      <p>To assess our model’s efectiveness in educational settings, we have developed an experimental design
comprising one-on-one child-robot interaction sessions, where the children will engage in a memory
game task. The robot’s accuracy in detecting behavior functions and the appropriateness of employed
strategies will be retrospectively evaluated by educational experts.</p>
      <p>The experimental evaluation of the framework described in Sections 3 and 4, is conducted in a
controlled laboratory setting focused on a memory game task (Fig.2b). The setup involves a
oneon-one interaction between one of the authors and the humanoid robot Pepper. The experiment is
repeated multiple times with the same participant to test various scenarios of replanning within the
framework. The objective is to observe the triggering conditions for each scenario and evaluate whether
the framework can accurately assert the relevant grounded predicates at the appropriate moments. To
this end, key metrics being assessed include:
• Replan Time: Measures the time from the introduction of a disruption to the completion of the
replanning process.
• Cloud Response Time: Evaluates the time taken for the robot to send a request, process cloud
information, and receive a response.</p>
      <p>Concerning Replan time, cloud resources were compared with local planning by sending the same
PDDL problem to both a cloud-based Planner Engine and a local one. Planning times for the cloud
range from 0.09 to 0.13 seconds, while local times range from 0.08 to 0.12 seconds. This indicates that
cloud resources do not reduce planning time, likely due to the simplicity of the generated plans.</p>
      <p>Regarding the Cloud Response Time, the graph in Figure 2a shows both the time required to retrieve a
response sentence used to reply to the user (blue) and the time taken to retrieve grounded predicates
(red).
(a) Cloud Response Time vs. Number of Characters
in the User’s Sentence.
(b) Detecting Escape and Gain a Tangible during a
robot-assisted memory card game.</p>
      <p>
        The Figure 2a illustrates a diference in character processing between the two tasks. Our
implementation involves more complex instructions sent to OpenAI, incorporating additional context and
user-specific parameters. This leads to varying prompt lengths, impacting the average cloud response
time: approximately 1 second for sentence retrieval and 0.75 seconds for predicate retrieval. Both times
are significantly below the 2-second threshold deemed acceptable for human conversation [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ],
although occasional delays of ≈ 3 seconds occur.
      </p>
    </sec>
    <sec id="sec-5">
      <title>6. Conclusion</title>
      <p>Our study introduces a framework for enhancing child-robot interactions using behavior analysis
principles. The system architecture includes an innovative framework for online replanning to adapt
dynamically to user behavior. However, it is important to acknowledge several limitations. In its current
initial version, our model does not account for children’s acceptance of the robot, their motivation, or
attention during interactions. Addressing these factors is crucial for conducting more precise functional
analyses. Future research should focus on optimizing our model by incorporating these elements to
improve its efectiveness and acceptance.</p>
    </sec>
    <sec id="sec-6">
      <title>Acknowledgment</title>
      <p>This work has been co-funded by Ministero dell’Università e della Ricerca, Piano Nazionale
Complementare (PNC), FIT4MEDROB project, Mission 3.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>J. O.</given-names>
            <surname>Cooper</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T. E.</given-names>
            <surname>Heron</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W. L.</given-names>
            <surname>Heward</surname>
          </string-name>
          , et al.,
          <article-title>Applied behavior analysis</article-title>
          , Pearson/Merrill-Prentice Hall Upper Saddle River, NJ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>J. B.</given-names>
            <surname>Leaf</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. H.</given-names>
            <surname>Cihon</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Leaf</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>McEachin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Russell</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Unumb</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Shapiro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Khosrowshahi</surname>
          </string-name>
          ,
          <article-title>Concerns about aba-based intervention: An evaluation and recommendations</article-title>
          ,
          <source>Journal of autism and developmental disorders 52</source>
          (
          <year>2022</year>
          )
          <fpage>2838</fpage>
          -
          <lpage>2853</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>G.</given-names>
            <surname>Gordon</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Breazeal</surname>
          </string-name>
          ,
          <article-title>Bayesian active learning-based robot tutor for children's word-reading skills</article-title>
          ,
          <source>in: Proceedings of the AAAI conference on artificial intelligence</source>
          , volume
          <volume>29</volume>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>A.</given-names>
            <surname>Deshmukh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. K.</given-names>
            <surname>Babu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Unnikrishnan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Ramesh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Anitha</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. R.</given-names>
            <surname>Bhavani</surname>
          </string-name>
          ,
          <article-title>Influencing hand-washing behaviour with a social robot: Hri study with school children in rural india, in: 2019 28th IEEE international conference on robot and human interactive communication (RO-MAN)</article-title>
          , IEEE,
          <year>2019</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>6</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>W.-Y. G.</given-names>
            <surname>Louie</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Korneder</surname>
          </string-name>
          , I. Abbas,
          <string-name>
            <given-names>C.</given-names>
            <surname>Pawluk</surname>
          </string-name>
          ,
          <article-title>A study on an applied behavior analysis-based robot-mediated listening comprehension intervention for asd, Paladyn</article-title>
          ,
          <source>Journal of Behavioral Robotics</source>
          <volume>12</volume>
          (
          <year>2020</year>
          )
          <fpage>31</fpage>
          -
          <lpage>46</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>D.</given-names>
            <surname>Premack</surname>
          </string-name>
          ,
          <string-name>
            <surname>G.</surname>
          </string-name>
          <article-title>Woodruf, Does the chimpanzee have a theory of mind?</article-title>
          ,
          <source>Behavioral and brain sciences 1</source>
          (
          <year>1978</year>
          )
          <fpage>515</fpage>
          -
          <lpage>526</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>L.</given-names>
            <surname>Cominelli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Mazzei</surname>
          </string-name>
          , D. E. De Rossi,
          <article-title>Seai: Social emotional artificial intelligence based on damasio's theory of mind</article-title>
          ,
          <source>Frontiers in Robotics and AI</source>
          <volume>5</volume>
          (
          <year>2018</year>
          )
          <article-title>6</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>W.</given-names>
            <surname>Mou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Ruocco</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Zanatto</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Cangelosi</surname>
          </string-name>
          ,
          <article-title>When would you trust a robot? a study on trust and theory of mind in human-robot interactions</article-title>
          ,
          <source>in: 2020 29th IEEE International Conference on Robot and Human Interactive Communication (RO-MAN)</source>
          , IEEE,
          <year>2020</year>
          , pp.
          <fpage>956</fpage>
          -
          <lpage>962</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>E.</given-names>
            <surname>Cipani</surname>
          </string-name>
          ,
          <string-name>
            <surname>K. M. Schock</surname>
          </string-name>
          , et al.,
          <article-title>Functional behavioral assessment, diagnosis, and treatment: A complete system for education and mental health settings</article-title>
          , Springer Publishing Company,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>Z.</given-names>
            <surname>Peng</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Mo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Zhu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q.</given-names>
            <surname>Xu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Ma</surname>
          </string-name>
          ,
          <article-title>Understanding user perceptions of robot's delay, voice quality-speed trade-of and gui during conversation</article-title>
          ,
          <source>in: Extended Abstracts of the 2020 CHI Conference on Human Factors in Computing Systems</source>
          ,
          <year>2020</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>8</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>T.</given-names>
            <surname>Shiwa</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Kanda</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Imai</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Ishiguro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Hagita</surname>
          </string-name>
          ,
          <article-title>How quickly should communication robots respond?</article-title>
          ,
          <source>in: Proceedings of the 3rd ACM/IEEE international conference on Human robot interaction</source>
          ,
          <year>2008</year>
          , pp.
          <fpage>153</fpage>
          -
          <lpage>160</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>