<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.3 20210610//EN" "JATS-journalpublishing1-3-mathml3.dtd">
<article article-type="research-article" dtd-version="1.3" xml:lang="EN" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ali="http://www.niso.org/schemas/ali/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<front>
<journal-meta>
<journal-id journal-id-type="publisher-id">Front. Robot. AI</journal-id>
<journal-title-group>
<journal-title>Frontiers in Robotics and AI</journal-title>
<abbrev-journal-title abbrev-type="pubmed">Front. Robot. AI</abbrev-journal-title>
</journal-title-group>
<issn pub-type="epub">2296-9144</issn>
<publisher>
<publisher-name>Frontiers Media S.A.</publisher-name>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="publisher-id">1567211</article-id>
<article-id pub-id-type="doi">10.3389/frobt.2025.1567211</article-id>
<article-version article-version-type="Version of Record" vocab="NISO-RP-8-2008"/>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Original Research</subject>
</subj-group>
</article-categories>
<title-group>
<article-title>Comparative analysis of deep Q-learning algorithms for object throwing using a robot manipulator</article-title>
<alt-title alt-title-type="left-running-head">Al Homsi et al.</alt-title>
<alt-title alt-title-type="right-running-head">
<ext-link ext-link-type="uri" xlink:href="https://doi.org/10.3389/frobt.2025.1567211">10.3389/frobt.2025.1567211</ext-link>
</alt-title>
</title-group>
<contrib-group>
<contrib contrib-type="author" corresp="yes">
<name>
<surname>Al Homsi</surname>
<given-names>Mohammad</given-names>
</name>
<xref ref-type="aff" rid="aff1">
<sup>1</sup>
</xref>
<xref ref-type="corresp" rid="c001">&#x2a;</xref>
<uri xlink:href="https://loop.frontiersin.org/people/3118170"/>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Conceptualization" vocab-term-identifier="https://credit.niso.org/contributor-roles/conceptualization/">Conceptualization</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Data curation" vocab-term-identifier="https://credit.niso.org/contributor-roles/data-curation/">Data curation</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Formal analysis" vocab-term-identifier="https://credit.niso.org/contributor-roles/formal-analysis/">Formal Analysis</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Investigation" vocab-term-identifier="https://credit.niso.org/contributor-roles/investigation/">Investigation</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Methodology" vocab-term-identifier="https://credit.niso.org/contributor-roles/methodology/">Methodology</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Project administration" vocab-term-identifier="https://credit.niso.org/contributor-roles/project-administration/">Project administration</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Resources" vocab-term-identifier="https://credit.niso.org/contributor-roles/resources/">Resources</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Software" vocab-term-identifier="https://credit.niso.org/contributor-roles/software/">Software</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Supervision" vocab-term-identifier="https://credit.niso.org/contributor-roles/supervision/">Supervision</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Validation" vocab-term-identifier="https://credit.niso.org/contributor-roles/validation/">Validation</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Visualization" vocab-term-identifier="https://credit.niso.org/contributor-roles/visualization/">Visualization</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Writing &#x2013; original draft" vocab-term-identifier="https://credit.niso.org/contributor-roles/writing-original-draft/">Writing &#x2013; original draft</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Writing &#x2013; review &#x26; editing" vocab-term-identifier="https://credit.niso.org/contributor-roles/Writing - review &#x26; editing/">Writing &#x2013; review and editing</role>
</contrib>
<contrib contrib-type="author">
<name>
<surname>Trumi&#x107;</surname>
<given-names>Maja</given-names>
</name>
<xref ref-type="aff" rid="aff2">
<sup>2</sup>
</xref>
<uri xlink:href="https://loop.frontiersin.org/people/1311157"/>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Conceptualization" vocab-term-identifier="https://credit.niso.org/contributor-roles/conceptualization/">Conceptualization</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Methodology" vocab-term-identifier="https://credit.niso.org/contributor-roles/methodology/">Methodology</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Resources" vocab-term-identifier="https://credit.niso.org/contributor-roles/resources/">Resources</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Supervision" vocab-term-identifier="https://credit.niso.org/contributor-roles/supervision/">Supervision</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Validation" vocab-term-identifier="https://credit.niso.org/contributor-roles/validation/">Validation</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Writing &#x2013; review &#x26; editing" vocab-term-identifier="https://credit.niso.org/contributor-roles/Writing - review &#x26; editing/">Writing &#x2013; review and editing</role>
</contrib>
<contrib contrib-type="author">
<name>
<surname>Fagiolini</surname>
<given-names>Adriano</given-names>
</name>
<xref ref-type="aff" rid="aff1">
<sup>1</sup>
</xref>
<uri xlink:href="https://loop.frontiersin.org/people/1230043"/>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Formal analysis" vocab-term-identifier="https://credit.niso.org/contributor-roles/formal-analysis/">Formal Analysis</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Funding acquisition" vocab-term-identifier="https://credit.niso.org/contributor-roles/funding-acquisition/">Funding acquisition</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Project administration" vocab-term-identifier="https://credit.niso.org/contributor-roles/project-administration/">Project administration</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Supervision" vocab-term-identifier="https://credit.niso.org/contributor-roles/supervision/">Supervision</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Writing &#x2013; review &#x26; editing" vocab-term-identifier="https://credit.niso.org/contributor-roles/Writing - review &#x26; editing/">Writing &#x2013; review and editing</role>
</contrib>
<contrib contrib-type="author">
<name>
<surname>Cirrincione</surname>
<given-names>Giansalvo</given-names>
</name>
<xref ref-type="aff" rid="aff3">
<sup>3</sup>
</xref>
<uri xlink:href="https://loop.frontiersin.org/people/2277075"/>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Formal analysis" vocab-term-identifier="https://credit.niso.org/contributor-roles/formal-analysis/">Formal Analysis</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Investigation" vocab-term-identifier="https://credit.niso.org/contributor-roles/investigation/">Investigation</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Methodology" vocab-term-identifier="https://credit.niso.org/contributor-roles/methodology/">Methodology</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Resources" vocab-term-identifier="https://credit.niso.org/contributor-roles/resources/">Resources</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Supervision" vocab-term-identifier="https://credit.niso.org/contributor-roles/supervision/">Supervision</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Validation" vocab-term-identifier="https://credit.niso.org/contributor-roles/validation/">Validation</role>
<role vocab="credit" vocab-identifier="https://credit.niso.org/" vocab-term="Writing &#x2013; review &#x26; editing" vocab-term-identifier="https://credit.niso.org/contributor-roles/Writing - review &#x26; editing/">Writing &#x2013; review and editing</role>
</contrib>
</contrib-group>
<aff id="aff1">
<label>1</label>
<institution>Mobile and Intelligent Robots @ Panormus Laboratory (MIRPALab), Department of Engineering, University of Palermo</institution>, <city>Palermo</city>, <country country="IT">Italy</country>
</aff>
<aff id="aff2">
<label>2</label>
<institution>School of Electrical Engineering, University of Belgrade</institution>, <city>Belgrade</city>, <country country="RS">Serbia</country>
</aff>
<aff id="aff3">
<label>3</label>
<institution>Universit&#xe9; de Picardie Jules Verne</institution>, <city>Amiens</city>, <country country="FR">France</country>
</aff>
<author-notes>
<corresp id="c001">
<label>&#x2a;</label>Correspondence: Mohammad Al Homsi, <email xlink:href="mailto:mohammad.alhomsi@unipa.it">mohammad.alhomsi@unipa.it</email>
</corresp>
</author-notes>
<pub-date publication-format="electronic" date-type="pub" iso-8601-date="2025-11-14">
<day>14</day>
<month>11</month>
<year>2025</year>
</pub-date>
<pub-date publication-format="electronic" date-type="collection">
<year>2025</year>
</pub-date>
<volume>12</volume>
<elocation-id>1567211</elocation-id>
<history>
<date date-type="received">
<day>26</day>
<month>01</month>
<year>2025</year>
</date>
<date date-type="rev-recd">
<day>20</day>
<month>09</month>
<year>2025</year>
</date>
<date date-type="accepted">
<day>24</day>
<month>09</month>
<year>2025</year>
</date>
</history>
<permissions>
<copyright-statement>Copyright &#xa9; 2025 Al Homsi, Trumi&#x107;, Fagiolini and Cirrincione.</copyright-statement>
<copyright-year>2025</copyright-year>
<copyright-holder>Al Homsi, Trumi&#x107;, Fagiolini and Cirrincione</copyright-holder>
<license>
<ali:license_ref start_date="2025-11-14">https://creativecommons.org/licenses/by/4.0/</ali:license_ref>
<license-p>This is an open-access article distributed under the terms of the <ext-link ext-link-type="uri" xlink:href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution License (CC BY)</ext-link>. The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.</license-p>
</license>
</permissions>
<abstract>
<p>Recent advances in artificial intelligence (AI) have attracted significant attention due to AI&#x2019;s ability to solve complex problems and the rapid development of learning algorithms and computational power. Among the many AI techniques, transformers stand out for their flexible architectures and high computational capacity. Unlike traditional neural networks, transformers use mechanisms such as self-attention with positional encoding, which enable them to effectively capture long-range dependencies in sequential and spatial data. This paper presents a comparison of various deep Q-learning algorithms and proposes two original techniques that use self-attention into deep Q-learning. The first technique is structured self-attention with deep Q-learning, and the second uses multi-head attention with deep Q-learning. These methods are compared with different types of deep Q-learning and other temporal techniques in uncertain tasks, such as throwing objects to unknown targets. The performance of these algorithms is evaluated in a simplified environment, where the task involves throwing a ball using a robotic arm manipulator. This setup provides a controlled scenario to analyze the algorithms&#x2019; efficiency and effectiveness in solving dynamic control problems. Additional constraints are introduced to evaluate performance under more complex conditions, such as a joint lock or the presence of obstacles like a wall near the robot or the target. The output of the algorithm includes the correct joint configurations and trajectories for throwing to unknown target positions. The use of multi-head attention has enhanced the robot&#x2019;s ability to prioritize and interact with critical environmental features. The paper also includes a comparison of temporal difference algorithms to address constraints on the robot&#x2019;s joints. These algorithms are capable of finding solutions within the limitations of existing hardware, enabling robots to interact intelligently and autonomously with their environment.</p>
</abstract>
<kwd-group>
<kwd>artificial intelligence</kwd>
<kwd>deep learning</kwd>
<kwd>reinforcement learning</kwd>
<kwd>deep Q-learning</kwd>
<kwd>robotic manipulation</kwd>
<kwd>object throwing</kwd>
<kwd>robotics</kwd>
<kwd>self-attention mechanism</kwd>
</kwd-group>
<funding-group>
<funding-statement>The author(s) declare that financial support was received for the research and/or publication of this article. This work was partially funded by MIMIT under the FREECO2 project, grant number F/310265/01-02/X56&#x2014;Accordi per l&#x2019;innovazione DM 31/12/2021 and DD.18/03/2022. This work was partially funded by the Science Fund of the Republic of Serbia under the CircuBot project, grant number &#x23;6784.</funding-statement>
</funding-group>
<counts>
<fig-count count="47"/>
<table-count count="17"/>
<equation-count count="26"/>
<ref-count count="49"/>
<page-count count="38"/>
</counts>
<custom-meta-group>
<custom-meta>
<meta-name>section-in-acceptance</meta-name>
<meta-value>Robot Learning and Evolution</meta-value>
</custom-meta>
</custom-meta-group>
</article-meta>
</front>
<body>
<sec sec-type="intro" id="s1">
<label>1</label>
<title>Introduction</title>
<p>In recent years, rapid developments in processor hardware have enabled artificial intelligence (AI) to significantly transform the field of robotics. AI facilitates the transition from preprogrammed automation to adaptive learning, allowing robotic systems to operate more effectively in complex and dynamic environments. In this context, the success of deep Q-learning network (DQN<xref ref-type="fn" rid="fn1">
<sup>1</sup>
</xref>) in mastering control policies at a human level across various Atari games (<xref ref-type="bibr" rid="B31">Mnih et al., 2015</xref>) has inspired many AI researchers to explore enhancements to DeepMind&#x2019;s original algorithm (<xref ref-type="bibr" rid="B16">Hausknecht and Stone, 2015</xref>; <xref ref-type="bibr" rid="B32">Nair et al., 2015</xref>; <xref ref-type="bibr" rid="B41">van Hasselt et al., 2015</xref>). DQN has since led to significant advancements in multiple domains, particularly in robotics.</p>
<p>DQN is based on traditional Q-learning, which aims to determine the optimal action an agent should take in a given state to maximize cumulative rewards. However, traditional Q-learning becomes impractical in high-dimensional or complex environments, such as those often encountered in robotics. To address this, DQN uses deep neural networks (DNNs) to approximate Q-values for all states and possible actions, enabling scalable and efficient learning (<xref ref-type="bibr" rid="B22">Lapan, 2018</xref>). Originally introduced by researchers at DeepMind in 2013, DQN demonstrated superior performance in Atari games, surpassing human-level play through a trial-and-error learning process (<xref ref-type="bibr" rid="B31">Mnih et al., 2015</xref>). This success in gaming applications has encouraged researchers to apply DQN across a wide range of fields, including robotics.</p>
<p>In robotic applications, DQN enables robots to learn complex tasks such as navigation, manipulation, and interaction with dynamic environments (<xref ref-type="bibr" rid="B22">Lapan, 2018</xref>). Numerous advancements and innovations have been made within DQN, including the introduction of target networks and experience replay, both of which improve the algorithm&#x2019;s stability and performance. Experience replay enhances learning efficiency by allowing the agent to learn from a diverse set of past experiences rather than relying solely on recent interactions. The use of a target network provides a stable reference for updating Q-values, helping mitigate issues related to the non-stationary nature of learning (<xref ref-type="bibr" rid="B22">Lapan, 2018</xref>). As research in deep reinforcement learning (DRL) for robotics continue to advance, DQN offers a promising approach for developing more intelligent and autonomous robotic systems capable of adapting to their environments and performing complex tasks with minimal human intervention.</p>
<p>The demand for robotic solutions in the logistics industry has increased significantly in recent years, driven by the rapid expansion of e-commerce and the challenges it presents. For example, online shopping services exert increasing pressure on logistics operations to handle packages efficiently. Although human workers possess a high degree of adaptability, they are increasingly struggling to meet the increasing demand for package handling, particularly as product volumes continue to grow sharply (<xref ref-type="bibr" rid="B8">Britt, 2020</xref>; <xref ref-type="bibr" rid="B29">Mims, 2020</xref>; <xref ref-type="bibr" rid="B33">Raptopoulos et al., 2020</xref>; <xref ref-type="bibr" rid="B6">Bombile and Billard, 2022</xref>). Robotic systems, however, offer promising adaptability to address these challenges. For instance, robotic throwing can provide a substantial advantage in scenarios where speed and precision are critical as it extends a robot&#x2019;s effective working range beyond its physical and hardware limitations (<xref ref-type="bibr" rid="B12">Frank et al., 2006</xref>). This capability is particularly valuable in robotic pick-and-place tasks, as demonstrated in autonomous bi-manual robots such as Delta robots, which have proven especially effective in applications like waste sorting (<xref ref-type="bibr" rid="B33">Raptopoulos et al., 2020</xref>; <xref ref-type="bibr" rid="B15">Hassan et al., 2022</xref>).</p>
<table-wrap id="T1" position="float">
<label>TABLE 1</label>
<caption>
<p>List of acronyms.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th align="left">Acronym</th>
<th align="left">Meaning</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="left">AI</td>
<td align="left">Artificial intelligence</td>
</tr>
<tr>
<td align="left">ML</td>
<td align="left">Machine learning</td>
</tr>
<tr>
<td align="left">NN</td>
<td align="left">Neural network</td>
</tr>
<tr>
<td align="left">RL</td>
<td align="left">Reinforcement learning</td>
</tr>
<tr>
<td align="left">DQN</td>
<td align="left">Deep Q-learning</td>
</tr>
<tr>
<td align="left">DNN</td>
<td align="left">Deep neural network</td>
</tr>
<tr>
<td align="left">DRL</td>
<td align="left">Deep reinforcement learning</td>
</tr>
<tr>
<td align="left">DH parameters</td>
<td align="left">Denavit&#x2013;Hartenberg parameters</td>
</tr>
<tr>
<td align="left">PPO</td>
<td align="left">Proximal policy optimization</td>
</tr>
<tr>
<td align="left">SAC</td>
<td align="left">Soft actor-critic</td>
</tr>
<tr>
<td align="left">SARSA</td>
<td align="left">State&#x2013;action&#x2013;reward&#x2013;state&#x2013;action</td>
</tr>
<tr>
<td align="left">DQN-N</td>
<td align="left">Deep Q-learning with noisy network</td>
</tr>
<tr>
<td align="left">DDQN</td>
<td align="left">Double deep Q-learning</td>
</tr>
<tr>
<td align="left">PER-DQN</td>
<td align="left">Prioritized experience replay deep Q-learning</td>
</tr>
<tr>
<td align="left">DDQN-N</td>
<td align="left">Double deep Q-learning with noisy networks</td>
</tr>
<tr>
<td align="left">PER-DDQN</td>
<td align="left">Prioritized experience replay double deep Q-learning</td>
</tr>
<tr>
<td align="left">DQN-SA</td>
<td align="left">Structured self-attention-based deep Q-learning</td>
</tr>
<tr>
<td align="left">DQN-MHA</td>
<td align="left">Deep Q-network with multi-head attention</td>
</tr>
<tr>
<td align="left">DDQN-SA</td>
<td align="left">Structured self-attention-based double deep Q-learning</td>
</tr>
<tr>
<td align="left">PER-DDQN-SA</td>
<td align="left">Prioritized experience replay and structured self-attention-based double deep Q-learning</td>
</tr>
<tr>
<td align="left">TAR</td>
<td align="left">Total average return</td>
</tr>
<tr>
<td align="left">DM</td>
<td align="left">Dynamic model</td>
</tr>
<tr>
<td align="left">DDPG</td>
<td align="left">Deep deterministic policy gradient</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>Controlling the trajectory of an object using a robotic system is a complex task; however, it is essential for performing tasks in dynamic environments. In such scenarios, the robot must continuously adapt and adjust the position and velocity of the end-effector to ensure the ball lands accurately in the basket. Two main challenges arise under these conditions. First, the robot must compute a valid solution or determine the correct trajectory configuration to successfully throw the ball into the target. Second, it must accurately adapt its throwing parameters in real time, including the release position and velocity, to overcome environmental constraints (<xref ref-type="bibr" rid="B7">Bombile and Billard, 2023</xref>).</p>
<p>Controlling the trajectory of an object with a robotic system seems a complex task, however, it is essential when dealing with tasks in dynamic environments. In these scenarios, the robot must continuously adapt and adjust its parameters such as the end-effector&#x2019;s position to ensure the ball lands accurately in the basket position. There are two main challenges in these scenarios. First, the robot must determine a solution or the correct configuration for the robot&#x2019;s trajectory movement to throw the ball into the target. Second, it must accurately adapt its throwing parameters&#x2013;including release position, joint values, and direction in real-time to overcome constraints in the environment (7).</p>
<sec id="s1-1">
<label>1.1</label>
<title>Related work</title>
<p>The challenge of dynamic object manipulation has received increasing attention in recent years. The problem of robotic catching is often framed as an interception task, similar to traditional robotic catching scenarios (<xref ref-type="bibr" rid="B9">Burridge et al., 1995</xref>; <xref ref-type="bibr" rid="B27">Lynch and Mason, 1999</xref>; <xref ref-type="bibr" rid="B36">Schill and Buss, 2018</xref>; <xref ref-type="bibr" rid="B11">Dong et al., 2020</xref>; <xref ref-type="bibr" rid="B35">Satici et al., 2022</xref>). While catching involves intercepting an object moving toward the robot, throwing requires greater control over the robot&#x2019;s trajectory. In this case, the trajectory depends on several factors, including the initial and final positions of the joints, their velocities, and environmental constraints.</p>
<p>Robotic throwing (<xref ref-type="bibr" rid="B28">Mason and Lynch, 1993</xref>; <xref ref-type="bibr" rid="B33">Raptopoulos et al., 2020</xref>; <xref ref-type="bibr" rid="B6">Bombile and Billard, 2022</xref>) offers significant advantages in terms of time and energy efficiency compared to static pick-and-place approaches. In such cases, advanced vision systems are employed to track and guide thrown objects with high precision (<xref ref-type="bibr" rid="B12">Frank et al., 2006</xref>). Other researchers have used hybrid learning and optimization methods to determine the parameters required for accurate object throwing (<xref ref-type="bibr" rid="B7">Bombile and Billard, 2023</xref>).</p>
<p>Various robotic platforms have been used for object throwing, including 1-DoF and 2-DoF systems (<xref ref-type="bibr" rid="B12">Frank et al., 2006</xref>; <xref ref-type="bibr" rid="B28">Mason and Lynch, 1993</xref>), industrial robots (<xref ref-type="bibr" rid="B33">Raptopoulos et al., 2020</xref>; <xref ref-type="bibr" rid="B3">August et al., 2010</xref>; <xref ref-type="bibr" rid="B48">Zhang et al., 2012</xref>), and humanoid robots (<xref ref-type="bibr" rid="B21">Kim et al., 2008</xref>; <xref ref-type="bibr" rid="B34">Satici et al., 2016</xref>). For instance, the KUKA KR-16 robot has been shown to throw objects to targets 2.5 m away (<xref ref-type="bibr" rid="B3">August et al., 2010</xref>). The UR5 robot has been adapted to throw objects of different shapes and sizes (<xref ref-type="bibr" rid="B47">Zeng et al., 2020</xref>). More recently, the Franka Emika Panda robot demonstrated adaptive throwing capabilities, adjusting its behavior in response to dynamic conditions (<xref ref-type="bibr" rid="B26">Liu et al., 2022</xref>). These developments reflect the growing interest and potential of robotic throwing applications using deep learning models, laying the groundwork for future innovations across various industries.</p>
<p>Artificial intelligence enhances the performance of robotic systems but still requires retraining to adapt to sudden environmental changes or newly introduced constraints in robotic manipulators. When new manipulators are deployed, updated datasets are often necessary for retraining. However, current algorithms face several challenges in adapting to such changes. First, many adaptation algorithms rely heavily on human expertise to identify and address constraints, often requiring carefully planned strategies. Undetected constraints or malfunctions can cause the robot&#x2019;s task to fail. Moreover, some AI algorithms cannot compensate for constraints in real time.</p>
<p>Researchers have explored various approaches to improve robotic adaptability and mitigate these limitations. For instance, neural networks have been used to estimate new workspaces for robotic arms with locked joints, although these methods often fall short in providing real-time compensation (<xref ref-type="bibr" rid="B38">Sivasamy et al., 2019</xref>). Other research uses acoustic filtering to identify constraints using sound sensors (<xref ref-type="bibr" rid="B18">Hu et al., 2019</xref>). Deep learning algorithms have also been applied to improve fault diagnosis in robotic systems under harsh conditions, with a primarily focus on fault identification (<xref ref-type="bibr" rid="B49">Zhang et al., 2019</xref>; <xref ref-type="bibr" rid="B10">Costa et al., 2019</xref>). These algorithms have been primarily used for fault identification, leaving a research gap regarding their performing under such conditions.</p>
<p>In the context of robotic throwing, researchers have explored ways to significantly enhance robot capabilities by enabling them to throw objects into a moving basket while avoiding obstacles&#x2014;offering an advantage over manual object placement using algorithms such as soft actor-critic (SAC) and deep deterministic policy gradient (DDPG) (<xref ref-type="bibr" rid="B19">Kasaei and Kasaei, 2024</xref>). Other studies have combined several AI models, including deep convolutional encoder&#x2013;decoder architectures for image segmentation, stochastic neural networks for physics simulation, and reinforcement learning (<xref ref-type="bibr" rid="B47">Zeng et al., 2020</xref>).</p>
<p>In one approach, a reinforcement learning agent is used to generate forward-phase actuation, while a dynamic model (DM) predicts the landing position. Both the agent and the DM are implemented as neural networks with a single hidden layer (<xref ref-type="bibr" rid="B5">Bianchi et al., 2023</xref>). It could be observed that the robot&#x2019;s dynamics significantly influence the learning process. Other AI approaches include the use of dual neural networks to predict ping-pong ball trajectories (<xref ref-type="bibr" rid="B25">Lin et al., 2020</xref>) and more advanced architectures such as autoencoders (<xref ref-type="bibr" rid="B13">Gonzalez, 2020</xref>).</p>
<p>Previous studies have highlighted key challenges in this domain, related to limited training data, prediction errors, and insufficient accuracy in throwing tasks. Moreover, there is a lack of comprehensive analysis addressing scenarios where the robot encounters both environmental constraints and hardware failures during the throwing process.</p>
</sec>
<sec id="s1-2">
<label>1.2</label>
<title>Contributions</title>
<p>This paper compares the performance of various DQN algorithms applied to the task of object throwing using an articulated serial robot manipulator. In particular, one of the paper&#x2019;s contributions is two novel algorithms that integrate attention mechanisms into the DQN framework. The effectiveness of these attention-based algorithms is evaluated against standard DQN algorithms, with and without attention layers, through a detailed performance analysis. By incorporating attention mechanisms into DQN, the robot manipulator&#x2019;s ability to capture relevant information is improved, enabling more efficient decision-making during the throwing process.</p>
<p>This research further tackles real-world limitations such as hardware faults (e.g., joint restrictions) and environmental obstacles (e.g., nearby walls or target obstacles), demonstrating how these challenges can be effectively addressed through reward shaping within the Q-learning framework. To the best of our knowledge, this is the first study to evaluate the performance of learning algorithms for robotic throwing under such conditions, as summarized in <xref ref-type="table" rid="T2">Table 2</xref>.</p>
<table-wrap id="T2" position="float">
<label>TABLE 2</label>
<caption>
<p>Positioning of proposed research within the related work of throwing an object using a robot manipulator.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th align="left">Paper</th>
<th align="left">Approach</th>
<th align="left">Environmental constraint/hardware failure</th>
<th align="left">Learning model</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="left">
<xref ref-type="bibr" rid="B47">Zeng et al. (2020)</xref>
</td>
<td align="left">Deep learning residual physics</td>
<td align="left">Neither is considered</td>
<td align="left">Convolutional residual network</td>
</tr>
<tr>
<td align="left">
<xref ref-type="bibr" rid="B3">August et al. (2010)</xref>
</td>
<td align="left">Ballistic-trajectory-based motion planning. An illustrative result</td>
<td align="left">Neither is considered</td>
<td align="left">Not ML-based</td>
</tr>
<tr>
<td align="left">
<xref ref-type="bibr" rid="B26">Liu et al. (2022)</xref>
</td>
<td align="left">Adaptive throwing using trajectory planning. The approach requires accurate trajectory tracking</td>
<td align="left">The robot is disturbed using an external interaction force</td>
<td align="left">ML is used to build the object&#x2019;s inverted flying dynamics</td>
</tr>
<tr>
<td align="left">
<xref ref-type="bibr" rid="B21">Kim et al. (2008)</xref> and <xref ref-type="bibr" rid="B34">Satici et al. (2016)</xref>
</td>
<td align="left">Feasibility of humanoid throwing. The focus is on physical execution, not learning</td>
<td align="left">Neither is considered</td>
<td align="left">Not used</td>
</tr>
<tr>
<td align="left">
<xref ref-type="bibr" rid="B5">Bianchi et al. (2023)</xref>
</td>
<td align="left">Throwing an object using a soft manipulator</td>
<td align="left">Neither is considered</td>
<td align="left">NN &#x2b; RL</td>
</tr>
<tr>
<td align="left">
<xref ref-type="bibr" rid="B19">Kasaei and Kasaei (2024)</xref>
</td>
<td align="left">Throwing an object with obstacle avoidance</td>
<td align="left">There is an obstacle near the target.</td>
<td align="left">SAC and DDPG</td>
</tr>
<tr>
<td align="left">This paper</td>
<td align="left">Deep Q-learning approaches</td>
<td align="left">We consider three cases: 1) obstacle near the target, blocking the ball&#x2019;s trajectory; 2) obstacle near the robot, constraining its motion; and 3) failure in the robot&#x2019;s joint</td>
<td align="left">DQN, Noisy DQN, DDQN, PER, and SA variants</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>Finally, an extensive comparative analysis is presented, examining the performance of standard and attention-augmented DQN variants across a range of constrained and unconstrained scenarios, highlighting their potential for improved performance in unstructured environments.</p>
</sec>
</sec>
<sec id="s2">
<label>2</label>
<title>Methods and solution</title>
<p>To solve throwing or pick-and-place tasks using Q-learning and deep reinforcement learning algorithms, it is necessary to define the action and state spaces the algorithm operates in, along with several key design decisions, as outlined below:<list list-type="order">
<list-item>
<p>Actions: The actions correspond to joint adjustments, which vary across experiments. Each adjustment value is computed as a function of the difference between the basket&#x2019;s center position and the predicted landing point.</p>
</list-item>
<list-item>
<p>States: The states include the starting state, working state, and end state. An additional modification has been introduced: every new position of the end-effector corresponds to a new state.</p>
</list-item>
<list-item>
<p>Reward function: The reward is based on the error distance, defined as the distance between the basket&#x2019;s center and the landing point from the most recent throw.</p>
</list-item>
<list-item>
<p>Denavit&#x2013;Hartenberg (DH) parameters: These parameters are defined for each of the robots used.</p>
</list-item>
</list>
</p>
<sec id="s2-1">
<label>2.1</label>
<title>Reinforcement learning approach</title>
<p>An agent is defined as an entity that interacts with the environment by performing actions, collecting information (observations or states), and receiving rewards (positive or negative) (<xref ref-type="bibr" rid="B22">Lapan, 2018</xref>). In reinforcement learning, there are two main types of actions an agent can perform:<list list-type="bullet">
<list-item>
<p>Policy-based actions: The agent learns a policy, which is a mapping of states to actions. This policy can be stochastic&#x2014;where action&#x2013;state pairs are based on probabilities for different actions, as observed in algorithms such as DQN during exploration or proximal policy optimization (PPO)&#x2014;or deterministic, where each state maps to a single specific action (<xref ref-type="bibr" rid="B22">Lapan, 2018</xref>).</p>
</list-item>
<list-item>
<p>Value-based actions: Here, the agent estimates the value of each action&#x2013;state pair and selects actions based on these values (e.g., by choosing the action with the maximum value). For example, in Q-learning, the Q-function estimates the expected reward in a Q-table, and the agent selects the action with the highest Q-value (<xref ref-type="bibr" rid="B22">Lapan, 2018</xref>; <xref ref-type="bibr" rid="B42">Van Hasselt et al., 2016</xref>; <xref ref-type="bibr" rid="B40">Sutton and Barto, 2018</xref>).</p>
</list-item>
</list>
</p>
<p>The epsilon-greedy strategy in Q-learning is used to encourage exploration of the environment. When the agent encounters a new state with unknown Q-values, it needs to explore different actions to estimate their rewards since there is no prior knowledge. This strategy prevents the agent from sticking to a suboptimal policy and ensures it does not miss better actions or paths (<xref ref-type="bibr" rid="B42">Van Hasselt et al., 2016</xref>; <xref ref-type="bibr" rid="B40">Sutton and Barto, 2018</xref>). In contrast, algorithms such as PPO or SAC perform exploration automatically. Because these algorithms initialize network weights randomly during training, the output initially follows a uniform probability distribution, resulting in random agent behavior (<xref ref-type="bibr" rid="B22">Lapan, 2018</xref>).</p>
<p>A DRL policy is the decision-making mechanism in RL that guides the agent&#x2019;s actions based on observations from the environment. Traditional temporal difference algorithms such as Q-learning, state&#x2013;action&#x2013;reward&#x2013;state&#x2013;action (SARSA), and expected SARSA define policies by estimating state values mapped to each action, selecting the action with the highest expected return (<xref ref-type="bibr" rid="B22">Lapan, 2018</xref>). When the environment has a small, discrete action set, Q-learning can efficiently approximate the value of each state&#x2013;action pair and select the best action.</p>
<p>However, when the action set is large, directly calculating Q-values for every action becomes inefficient. In such cases, neural networks (NNs) are used to approximate Q-values (<xref ref-type="bibr" rid="B22">Lapan, 2018</xref>). In DQNs, the NN outputs the expected reward values for actions given a specific state, represented as scalar values.</p>
<p>There are multiple ways to implement this output:<list list-type="bullet">
<list-item>
<p>The NN outputs identifiers for all possible actions in an array (representing a discrete set of actions). Although this is a simple approach, it may not be the most effective way to handle discrete action sets (<xref ref-type="bibr" rid="B22">Lapan, 2018</xref>).</p>
</list-item>
<list-item>
<p>The NN outputs a probability distribution over the agent&#x2019;s actions, as illustrated in <xref ref-type="fig" rid="F1">Figure 1</xref> (<xref ref-type="bibr" rid="B22">Lapan, 2018</xref>).</p>
</list-item>
</list>
</p>
<fig id="F1" position="float">
<label>FIGURE 1</label>
<caption>
<p>Neural network-based policy approximation for a discrete action space (adapted from <xref ref-type="bibr" rid="B22">Lapan (2018)</xref>).</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g001.tif">
<alt-text content-type="machine-generated">Diagram showing a simplified model of an AI learning process. On the left is a screenshot of a retro video game with colorful bricks and a paddle. In the center is a neural network representation with interconnected nodes. On the right is a list of actions with probabilities: Left 0.05, Right 0.7, Up 0.08, Down 1.7.</alt-text>
</graphic>
</fig>
<p>The pieces of information or knowledge collected by the agent from the environment at a specific time and state are called the RL state. The state captures various aspects, including the agent&#x2019;s location, the surrounding environment, and sometimes information on previous states, actions taken, and rewards received.</p>
<p>The activities performed by the agent in DRL are called actions. Actions can be discrete, continuous, or a combination of both. Discrete actions represent fixed behaviors, such as moving left or right in a grid, moving up or down, or pressing and releasing buttons. Continuous actions specify variable values related to the agent, such as the angle position of a steering wheel or the angular velocity of robot joints. Some environments require multiple simultaneous actions, like adjusting an angle by a discrete increment while setting a continuous angular speed (<xref ref-type="bibr" rid="B22">Lapan, 2018</xref>). In this paper, the actions in DQN or Q-learning are described as varying between experiments. Importantly, the joint positions in all experiments respect the physical constraints and limitations of the robot arm.</p>
<p>The RL reward is a scalar value obtained from the environment that indicates the degree to which the agent&#x2019;s previous action was beneficial or detrimental. Rewards can be positive or negative and large or small. The timing of reward delivery depends on the experiment: rewards can be given continuously at every interaction or only once during the agent&#x2019;s lifetime (<xref ref-type="bibr" rid="B22">Lapan, 2018</xref>). When rewards are sparse&#x2014;given only once&#x2014;other reward signals are 0 until the final reward is received. The reward reflects the success or failure of the agent&#x2019;s previous actions. However, receiving a high reward for certain actions does not guarantee the absence of negative consequences from earlier decisions. For example, a risky policy might yield a high immediate reward but lead to poor outcomes overall (<xref ref-type="bibr" rid="B22">Lapan, 2018</xref>).</p>
</sec>
<sec id="s2-2">
<label>2.2</label>
<title>Q-learning approach</title>
<p>Q-learning is a model-free, off-policy algorithm that uses a lookup table to learn the optimal action-value function (Q-function) for a given state. In the context of throwing balls using a robot arm, the Q-function represents the expected reward for taking a particular action (e.g., adjusting the arm&#x2019;s angle or the throwing velocity) in a specific state (e.g., the current position of the ball or the robot arm). However, learning the optimal policy through Q-learning requires extensive trial-and-error exploration, which can be time-consuming and inefficient (<xref ref-type="bibr" rid="B42">Van Hasselt et al., 2016</xref>).</p>
<p>Additionally, Q-learning may struggle with continuous action spaces, posing limitations for tasks such as robotic ball throwing that demand precise control over continuous variables (<xref ref-type="bibr" rid="B40">Sutton and Barto, 2018</xref>). Q-learning is classified as an off-policy algorithm because it learns and improves a policy that is different from the policy currently being executed by the agent. This contrasts with on-policy algorithms, in which the agent learns and improves the policy it is actively following (<xref ref-type="bibr" rid="B42">Van Hasselt et al., 2016</xref>).</p>
<sec id="s2-2-1">
<label>2.2.1</label>
<title>Q-learning choice of hyperparameters</title>
<p>The Q-learning algorithm aims to find the optimal policy&#x2014;a sequence of actions&#x2014;that maximizes the expected cumulative reward over time. This is achieved by updating Q-values using the Bellman equation, which relates the Q-value of a current state&#x2013;action pair to the Q-values of the next state&#x2013;action pairs, as illustrated in <xref ref-type="fig" rid="F2">Figure 2</xref>.</p>
<fig id="F2" position="float">
<label>FIGURE 2</label>
<caption>
<p>Tabular representation of state&#x2013;action values (Q-table) in the Q-learning algorithm.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g002.tif">
<alt-text content-type="machine-generated">Diagram illustrating Q-Learning. It shows a process where &#x22;State&#x22; and &#x22;Action&#x22; inputs lead to a &#x22;Q Table&#x22; with &#x22;State-Action&#x22; pairs and their corresponding values, initialized at zero. The output is the &#x22;Q-Value&#x22;.</alt-text>
</graphic>
</fig>
<p>The Q-function, or Q-learning update rule, is expressed using the Bellman equation as follows:<disp-formula id="e1">
<mml:math id="m1">
<mml:mrow>
<mml:mi>Q</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>s</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x27f5;</mml:mo>
<mml:mi>Q</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>s</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>&#x3b1;</mml:mi>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:mi>r</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>&#x3b3;</mml:mi>
<mml:munder>
<mml:mrow>
<mml:mi>max</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:munder>
<mml:mi>Q</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
<mml:mo>,</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>Q</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>s</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
<mml:mo>.</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>
<list list-type="bullet">
<list-item>
<p>
<inline-formula id="inf1">
<mml:math id="m2">
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> is the learning rate, a value between 0 and 1 that determines how much new information overrides old estimates. A higher <inline-formula id="inf2">
<mml:math id="m3">
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> places more weight on recent rewards.</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf3">
<mml:math id="m4">
<mml:mrow>
<mml:mi>Q</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>s</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula> is the estimated cumulative reward for taking action <inline-formula id="inf4">
<mml:math id="m5">
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> in state <inline-formula id="inf5">
<mml:math id="m6">
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>.</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf6">
<mml:math id="m7">
<mml:mrow>
<mml:mi>r</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> is the immediate reward received after executing action <inline-formula id="inf7">
<mml:math id="m8">
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> in state <inline-formula id="inf8">
<mml:math id="m9">
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>.</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf9">
<mml:math id="m10">
<mml:mrow>
<mml:mi>&#x3b3;</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> is the discount factor, also between 0 and 1, which determines the importance of future rewards compared to immediate rewards.</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf10">
<mml:math id="m11">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>max</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:msub>
<mml:mi>Q</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
<mml:mo>,</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula> represents the maximum Q-value over all possible actions <inline-formula id="inf11">
<mml:math id="m12">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:math>
</inline-formula> in the next state <inline-formula id="inf12">
<mml:math id="m13">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:math>
</inline-formula>. Q-learning selects actions by considering both the immediate and the maximum future reward.</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf13">
<mml:math id="m14">
<mml:mrow>
<mml:mi>&#x3f5;</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> represents the exploration&#x2013;exploitation trade-off. A higher <inline-formula id="inf14">
<mml:math id="m15">
<mml:mrow>
<mml:mi>&#x3f5;</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> encourages exploration (trying new actions), while a lower <inline-formula id="inf15">
<mml:math id="m16">
<mml:mrow>
<mml:mi>&#x3f5;</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> favors exploitation (choosing the best-known action). A decaying <inline-formula id="inf16">
<mml:math id="m17">
<mml:mrow>
<mml:mi>&#x3f5;</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> schedule is commonly used, starting with high exploration that decreases over time (<xref ref-type="bibr" rid="B40">Sutton and Barto, 2018</xref>; <xref ref-type="bibr" rid="B42">Van Hasselt et al., 2016</xref>).</p>
</list-item>
</list>
</p>
<p>This approach allows the agent to first explore its environment through random actions and then use the gained experience to select the most appropriate actions for making an optimal policy (<xref ref-type="bibr" rid="B40">Sutton and Barto, 2018</xref>; <xref ref-type="bibr" rid="B44">Watkins, 1989</xref>; <xref ref-type="bibr" rid="B30">Mnih et al., 2013</xref>; <xref ref-type="bibr" rid="B31">Mnih et al., 2015</xref>; <xref ref-type="bibr" rid="B42">Van Hasselt et al., 2016</xref>). The Q-learning update rule is applied iteratively as the agent interacts with the environment, enabling it to learn the optimal policy for choosing actions across different states to maximize cumulative rewards over time. SARSA, an on-policy reinforcement learning algorithm, differs from Q-learning by replacing the term <inline-formula id="inf17">
<mml:math id="m18">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>max</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:msub>
<mml:mi>Q</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
<mml:mo>,</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula> with <inline-formula id="inf18">
<mml:math id="m19">
<mml:mrow>
<mml:mi>Q</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
<mml:mo>,</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula> in the update rule:<disp-formula id="e2">
<mml:math id="m20">
<mml:mrow>
<mml:mi>Q</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>s</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x27f5;</mml:mo>
<mml:mi>Q</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>s</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>&#x3b1;</mml:mi>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:mi>r</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>&#x3b3;</mml:mi>
<mml:mi>Q</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
<mml:mo>,</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>Q</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>s</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
<mml:mo>.</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>
</p>
<p>The agent in the SARSA algorithm updates its Q-values based on the actions it actually takes. This characteristic indicates that the learned policy is tightly coupled with the exploration strategy used during training. As a result, SARSA often yields more conservative behavior, making it more robust to the agent&#x2019;s exploration decisions. In contrast, expected SARSA is an off-policy reinforcement learning algorithm that improves upon standard SARSA. Instead of relying on the single action taken by the agent, it uses the expected value over all possible next actions in the policy&#x2019;s distribution. This provides a smoother and often more stable learning process. The update rule for expected SARSA is provided as follows:<disp-formula id="e3">
<mml:math id="m21">
<mml:mrow>
<mml:mtable class="aligned">
<mml:mtr>
<mml:mtd columnalign="right">
<mml:mi>Q</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mo>&#x2190;</mml:mo>
<mml:mi>Q</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="right"/>
<mml:mtd columnalign="left">
<mml:mo>&#x2b;</mml:mo>
<mml:mi>&#x3b1;</mml:mi>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>&#x3b3;</mml:mi>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="double-struck">E</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x223c;</mml:mo>
<mml:mi>&#x3c0;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:mi>Q</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>Q</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
<mml:mo>.</mml:mo>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mrow>
</mml:math>
</disp-formula>Here,<list list-type="bullet">
<list-item>
<p>
<inline-formula id="inf19">
<mml:math id="m22">
<mml:mrow>
<mml:mi>Q</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula> is the current estimate of the action-value function for state <inline-formula id="inf20">
<mml:math id="m23">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> and action <inline-formula id="inf21">
<mml:math id="m24">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>.</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf22">
<mml:math id="m25">
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> is the learning rate, determining the step size of the Q-value update.</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf23">
<mml:math id="m26">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> is the reward received after taking action <inline-formula id="inf24">
<mml:math id="m27">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> in state <inline-formula id="inf25">
<mml:math id="m28">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>.</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf26">
<mml:math id="m29">
<mml:mrow>
<mml:mi>&#x3b3;</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> is the discount factor, controlling the weight of future rewards relative to immediate rewards.</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf27">
<mml:math id="m30">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="double-struck">E</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x223c;</mml:mo>
<mml:mi>&#x3c0;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo stretchy="false">[</mml:mo>
<mml:mrow>
<mml:mi>Q</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mo stretchy="false">]</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula> denotes the expected value of <inline-formula id="inf28">
<mml:math id="m31">
<mml:mrow>
<mml:mi>Q</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula> over all possible actions <inline-formula id="inf29">
<mml:math id="m32">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> that may be taken in the next state <inline-formula id="inf30">
<mml:math id="m33">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> under policy <inline-formula id="inf31">
<mml:math id="m34">
<mml:mrow>
<mml:mi>&#x3c0;</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>.</p>
</list-item>
</list>
</p>
<p>This approach aims to reduce variance and improve both learning efficiency and stability. One of the key hyperparameters in Q-learning is the exploration&#x2013;exploitation strategy. As is well known, this strategy balances two competing objectives: selecting the best-known action based on current knowledge (exploitation) and exploring new actions that might yield better long-term rewards (exploration) (<xref ref-type="bibr" rid="B46">Wikipedia, 2023</xref>; <xref ref-type="bibr" rid="B1">AI-ML, 2023</xref>).</p>
<p>The immediate reward <inline-formula id="inf32">
<mml:math id="m35">
<mml:mrow>
<mml:mi>R</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>s</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula> is designed to encourage actions that move the throwing result closer to the basket. It is defined as follows:<disp-formula id="e4">
<mml:math id="m36">
<mml:mrow>
<mml:mi mathvariant="normal">R</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>0.5</mml:mn>
<mml:mo>&#x22c5;</mml:mo>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:mfenced open="{" close="">
<mml:mrow>
<mml:mtable class="cases">
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mo>&#x2212;</mml:mo>
<mml:mn>20</mml:mn>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mtext>if </mml:mtext>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2265;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mo>&#x2b;</mml:mo>
<mml:mn>0.3</mml:mn>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mtext>if </mml:mtext>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3c;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:math>
</disp-formula>where <inline-formula id="inf33">
<mml:math id="m37">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> is the distance&#x2013; i.e., the straight-line distance from the landing point to the center of the basket in throw <inline-formula id="inf34">
<mml:math id="m38">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>, and <inline-formula id="inf35">
<mml:math id="m39">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> is the corresponding distance in the next throw.</p>
<p>In experiments, an additional reward of <inline-formula id="inf36">
<mml:math id="m40">
<mml:mrow>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>0.3</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> is added if <inline-formula id="inf37">
<mml:math id="m41">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3c;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>. Conversely, a penalty of <inline-formula id="inf38">
<mml:math id="m42">
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>20</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> is imposed if the error increases. This adjustment helps the agent distinguish between joints with constraints and those without. For instance, if a joint with constraints is repeatedly selected, its Q-value will decrease due to poor performance, making it less likely to be chosen in future iterations. A numerical example illustrating this behavior is provided later in the paper.</p>
<p>Moreover, Q-learning easily allows mapping the joint adjustment values to the error distance <inline-formula id="inf39">
<mml:math id="m43">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>. When <inline-formula id="inf40">
<mml:math id="m44">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> is large, the algorithm tends to apply larger joint adjustments. Conversely, when <inline-formula id="inf41">
<mml:math id="m45">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> is small, finer adjustments are made to refine the trajectory (<xref ref-type="fig" rid="F3">Figure 3</xref>). Although adjusting the joint weights may influence the results, the same weight is consistently used across all experiments.</p>
<fig id="F3" position="float">
<label>FIGURE 3</label>
<caption>
<p>Different functional mappings from distance <inline-formula id="inf42">
<mml:math id="m46">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> to joint adjustments in Q-learning.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g003.tif">
<alt-text content-type="machine-generated">Chart titled &#x22;Error distance vs Joint adjustments&#x22; with four lines representing different formulas. The red line is (3&#x2a;x)/5, the blue line is (x)/2.5, the green line is (x^2)/5, and the yellow line is x/2. The x-axis shows error distance in meters, and the y-axis shows joint adjustments in radians.</alt-text>
</graphic>
</fig>
</sec>
<sec id="s2-2-2">
<label>2.2.2</label>
<title>Q-learning states and actions</title>
<p>A <italic>Q-learning state</italic> encompasses the information available to an agent about its environment at a specific moment in time. This includes various aspects such as the agent&#x2019;s current location, surrounding objects, and the history of previous states, actions taken, and rewards received. As illustrated in <xref ref-type="fig" rid="F2">Figure 2</xref>, the Q-learning algorithm relies on a Q-table, typically represented as an array of <inline-formula id="inf43">
<mml:math id="m47">
<mml:mrow>
<mml:mi>Q</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>-values where each row corresponds to a state and each column corresponds to an action. The generic entry <inline-formula id="inf44">
<mml:math id="m48">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> in the Q-table represents the value <inline-formula id="inf45">
<mml:math id="m49">
<mml:mrow>
<mml:mi>Q</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula> (<xref ref-type="bibr" rid="B40">Sutton and Barto, 2018</xref>). At the start of the algorithm, all entries in the Q-table are initialized to 0. The agent begins to explore the environment, and the Q-function iteratively updates these values based on interactions. Over time, this iterative process yields improved approximations of the optimal Q-values.</p>
<p>The typical Q-learning update loop is as follows:<list list-type="order">
<list-item>
<p>Parameters: step size <inline-formula id="inf46">
<mml:math id="m50">
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>in (0, 1], <inline-formula id="inf47">
<mml:math id="m51">
<mml:mrow>
<mml:mi>&#x3f5;</mml:mi>
<mml:mspace width="0.3333em"/>
<mml:mo>&#x3e;</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>0</p>
</list-item>
<list-item>
<p>Initialize <inline-formula id="inf48">
<mml:math id="m52">
<mml:mrow>
<mml:mi>Q</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>s</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula>, for all <inline-formula id="inf49">
<mml:math id="m53">
<mml:mrow>
<mml:mi>s</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">S</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>and <inline-formula id="inf50">
<mml:math id="m54">
<mml:mrow>
<mml:mi>a</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi>A</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula>, arbitrarily except <inline-formula id="inf51">
<mml:math id="m55">
<mml:mrow>
<mml:mi>Q</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mtext>terminal</mml:mtext>
<mml:mo>,</mml:mo>
<mml:mo>&#x22c5;</mml:mo>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</p>
</list-item>
<list-item>
<p>Loop for each episode:<list list-type="alpha-lower">
<list-item>
<p>Initialize s</p>
</list-item>
<list-item>
<p>Loop for each step of the episode: <list list-type="order">
<list-item>
<p>Choose a from s using policy derived from Q (e.g., <inline-formula id="inf52">
<mml:math id="m56">
<mml:mrow>
<mml:mi>&#x3f5;</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>-greedy).</p>
</list-item>
<list-item>
<p>Take action a and observe R and <inline-formula id="inf53">
<mml:math id="m57">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mtext>s</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:math>
</inline-formula>.</p>
</list-item>
<list-item>
<p>Calculate the new reward using the Q-function.</p>
</list-item>
<list-item>
<p>s &#x3d; <inline-formula id="inf54">
<mml:math id="m58">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="normal">s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:math>
</inline-formula>
</p>
</list-item>
</list>
</p>
</list-item>
<list-item>
<p>until s is terminal</p>
</list-item>
</list>
</p>
</list-item>
</list>
</p>
<p>The <inline-formula id="inf55">
<mml:math id="m59">
<mml:mrow>
<mml:mi>&#x3f5;</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>-greedy policy is defined as follows (<xref ref-type="bibr" rid="B24">Li, 2023</xref>):<disp-formula id="equ1">
<mml:math id="m60">
<mml:mrow>
<mml:mi>&#x3c0;</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>a</mml:mi>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mi>s</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mfenced open="{" close="">
<mml:mrow>
<mml:mtable class="cases">
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mfrac>
<mml:mrow>
<mml:mi>&#x3f5;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mi mathvariant="script">A</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo stretchy="false">&#x7c;</mml:mo>
</mml:mrow>
</mml:mfrac>
<mml:mo>&#x2b;</mml:mo>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mn>1</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>&#x3f5;</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mspace width="1em"/>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mtext>if&#x2009;</mml:mtext>
<mml:mi>a</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mi>arg</mml:mi>
<mml:msub>
<mml:mrow>
<mml:mi>max</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:msub>
<mml:mi>Q</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>s</mml:mi>
<mml:mo>,</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mfrac>
<mml:mrow>
<mml:mi>&#x3f5;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mi mathvariant="script">A</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo stretchy="false">&#x7c;</mml:mo>
</mml:mrow>
</mml:mfrac>
<mml:mspace width="1em"/>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mtext>otherwise</mml:mtext>
<mml:mo>.</mml:mo>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:math>
</disp-formula>Here,<list list-type="bullet">
<list-item>
<p>
<inline-formula id="inf56">
<mml:math id="m61">
<mml:mrow>
<mml:mi>&#x3c0;</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>a</mml:mi>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula> is the probability of taking action <inline-formula id="inf57">
<mml:math id="m62">
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> in state <inline-formula id="inf58">
<mml:math id="m63">
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>.</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf59">
<mml:math id="m64">
<mml:mrow>
<mml:mi>&#x3f5;</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> is the exploration rate (a small positive constant, typically between 0 and 1).</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf60">
<mml:math id="m65">
<mml:mrow>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mi mathvariant="script">A</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo stretchy="false">&#x7c;</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> is the number of possible actions in state <inline-formula id="inf61">
<mml:math id="m66">
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>.</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf62">
<mml:math id="m67">
<mml:mrow>
<mml:mi>Q</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>s</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula> is the action-value function.</p>
</list-item>
</list>
</p>
<p>In this paper, the initial state is defined as the starting configuration of the system, while the ending state corresponds to a configuration in which Q-learning identifies a successful throwing solution. A key modification introduced in this work is the assignment of a unique state to every new position of the end-effector. This results in a significantly larger number of working states compared to previous implementations that used a single state representation, thereby enhancing performance.</p>
<p>A comparison is conducted between two scenarios: (i) Q-learning with a limited number of discrete states and (ii) Q-learning with an expanded state space that includes a greater number of end-effector positions. This comparison is illustrated in <xref ref-type="fig" rid="F15">Figures 15</xref>&#x2013;<xref ref-type="fig" rid="F16">17</xref>. By using a finer state discretization, the algorithm is less reliant on pure exploitation. This is important as excessive exploitation can cause the algorithm to overlook alternative promising trajectories. The broader state space increases the diversity of solutions available for the throwing task, often allowing the algorithm to converge more quickly. However, this also introduces a risk of over-exploration, where the agent continually explores new actions without sufficiently exploiting learned policies. To mitigate this issue, the Q-learning algorithm is further modified: if an action results in a negative reward, the agent returns to the previous state. This simple yet effective modification ensures consistent convergence by discouraging the repetition of poor actions and reinforcing successful behaviors.</p>
<p>The actions in Q-learning are defined as joint adjustments, and they vary depending on the experiment, as described below:<list list-type="order">
<list-item>
<p>For the PhantomX Pincher Robot Manipulator (<xref ref-type="fig" rid="F10">Figure 10</xref>, DH parameters provided in <xref ref-type="table" rid="T3">Table 3</xref>), used in pick-and-place tasks, the defined actions for each joint are as follows:<list list-type="bullet">
<list-item>
<p>Increasing or decreasing the joint angle <inline-formula id="inf82">
<mml:math id="m87">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> by <inline-formula id="inf83">
<mml:math id="m88">
<mml:mrow>
<mml:mi>w</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> times the adjustment value, where <inline-formula id="inf84">
<mml:math id="m89">
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">{</mml:mo>
<mml:mrow>
<mml:mn>1,2,3,4</mml:mn>
</mml:mrow>
<mml:mo stretchy="false">}</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula> and <inline-formula id="inf85">
<mml:math id="m90">
<mml:mrow>
<mml:mi>w</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">{</mml:mo>
<mml:mrow>
<mml:mn>1,2,3</mml:mn>
</mml:mrow>
<mml:mo stretchy="false">}</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula>.</p>
</list-item>
</list>
</p>
</list-item>
<list-item>
<p>For the two-link planar arm (<xref ref-type="fig" rid="F4">Figure 4</xref>, DH parameters provided in <xref ref-type="table" rid="T4">Table 4</xref>), used in the throwing task, the defined actions for both joints are as follows:<list list-type="bullet">
<list-item>
<p>Increasing or decreasing the joint angle <inline-formula id="inf86">
<mml:math id="m91">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> by a fixed adjustment value, where <inline-formula id="inf87">
<mml:math id="m92">
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">{</mml:mo>
<mml:mrow>
<mml:mn>1,2</mml:mn>
</mml:mrow>
<mml:mo stretchy="false">}</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula>.</p>
</list-item>
<list-item>
<p>Increasing or decreasing the throwing angle by 0.1.</p>
</list-item>
</list>
</p>
</list-item>
<list-item>
<p>For the Franka Emika Panda robot (<xref ref-type="fig" rid="F5">Figure 5</xref>, DH parameters provided in <xref ref-type="table" rid="T5">Table 5</xref>), also used in the throwing task, the defined actions are as follows:<list list-type="bullet">
<list-item>
<p>Increasing or decreasing the joint angle <inline-formula id="inf88">
<mml:math id="m93">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> by a fixed adjustment value, where <inline-formula id="inf89">
<mml:math id="m94">
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">{</mml:mo>
<mml:mrow>
<mml:mn>1,2,3,4,5,6,7</mml:mn>
</mml:mrow>
<mml:mo stretchy="false">}</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula>.</p>
</list-item>
<list-item>
<p>Increasing or decreasing the throwing angle by 0.1.</p>
</list-item>
</list>
</p>
</list-item>
</list>
</p>
<table-wrap id="T3" position="float">
<label>TABLE 3</label>
<caption>
<p>DH parameters for PhantomX Pincher robot (standard convention).</p>
</caption>
<table>
<thead valign="top">
<tr>
<th align="left">Joint <inline-formula id="inf63">
<mml:math id="m68">
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>
</th>
<th align="center">
<inline-formula id="inf64">
<mml:math id="m69">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> (variable)</th>
<th align="center">
<inline-formula id="inf65">
<mml:math id="m70">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> (m)</th>
<th align="center">
<inline-formula id="inf66">
<mml:math id="m71">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> (m)</th>
<th align="center">
<inline-formula id="inf67">
<mml:math id="m72">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> (rad)</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="center">1</td>
<td align="center">
<inline-formula id="inf68">
<mml:math id="m73">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">0.05</td>
<td align="center">0</td>
<td align="center">
<inline-formula id="inf69">
<mml:math id="m74">
<mml:mrow>
<mml:mi>&#x3c0;</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
</tr>
<tr>
<td align="center">2</td>
<td align="center">
<inline-formula id="inf70">
<mml:math id="m75">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">0</td>
<td align="center">0.105</td>
<td align="center">0</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">
<inline-formula id="inf71">
<mml:math id="m76">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>3</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">0</td>
<td align="center">0.105</td>
<td align="center">0</td>
</tr>
<tr>
<td align="center">4</td>
<td align="center">
<inline-formula id="inf72">
<mml:math id="m77">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>4</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">0</td>
<td align="center">0.075</td>
<td align="center">0</td>
</tr>
</tbody>
</table>
</table-wrap>
<table-wrap id="T4" position="float">
<label>TABLE 4</label>
<caption>
<p>DH parameters for a two-link planar robot (standard convention).</p>
</caption>
<table>
<thead valign="top">
<tr>
<th align="center">Joint <inline-formula id="inf73">
<mml:math id="m78">
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>
</th>
<th align="center">
<inline-formula id="inf74">
<mml:math id="m79">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> (variable)</th>
<th align="center">
<inline-formula id="inf75">
<mml:math id="m80">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> (m)</th>
<th align="center">
<inline-formula id="inf76">
<mml:math id="m81">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> (m)</th>
<th align="center">
<inline-formula id="inf77">
<mml:math id="m82">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> (rad)</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="center">1</td>
<td align="center">
<inline-formula id="inf78">
<mml:math id="m83">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">0</td>
<td align="center">
<inline-formula id="inf79">
<mml:math id="m84">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">0</td>
</tr>
<tr>
<td align="center">2</td>
<td align="center">
<inline-formula id="inf80">
<mml:math id="m85">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">0</td>
<td align="center">
<inline-formula id="inf81">
<mml:math id="m86">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">0</td>
</tr>
</tbody>
</table>
</table-wrap>
<fig id="F4" position="float">
<label>FIGURE 4</label>
<caption>
<p>Admissible configuration of a two-link planar arm (<xref ref-type="bibr" rid="B37">Siciliano, 2008</xref>).</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g004.tif">
<alt-text content-type="machine-generated">Diagram depicting a mechanical linkage system with three pivot points labeled \( \alpha_{1} \), \( \alpha_{2} \), and \( \alpha_{3} \), connected by rods. Arrows indicate angles \( \alpha \), \( \beta \), and \( \phi \). Coordinates \( x_{0} \) and \( y_{0} \) are shown with an origin \( 0 \). A marker \( W \) is at the linkage, with a dashed line indicating a shifted position.</alt-text>
</graphic>
</fig>
<fig id="F5" position="float">
<label>FIGURE 5</label>
<caption>
<p>Franka Emika Panda robot whose simulated model is used in the robotic throwing task (<xref ref-type="bibr" rid="B2">Albu-Sch&#xe4;ffer et al., 2016</xref>).</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g005.tif">
<alt-text content-type="machine-generated">A robotic arm on a black platform holds a multicolored cube with letters next to a purple bin. The surface underneath has a grid pattern.</alt-text>
</graphic>
</fig>
<table-wrap id="T5" position="float">
<label>TABLE 5</label>
<caption>
<p>DH parameters for Franka Emika Panda (standard convention).</p>
</caption>
<table>
<thead valign="top">
<tr>
<th align="center">Joint <inline-formula id="inf90">
<mml:math id="m95">
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>
</th>
<th align="center">
<inline-formula id="inf91">
<mml:math id="m96">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> (variable)</th>
<th align="center">
<inline-formula id="inf92">
<mml:math id="m97">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> (m)</th>
<th align="center">
<inline-formula id="inf93">
<mml:math id="m98">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> (m)</th>
<th align="center">
<inline-formula id="inf94">
<mml:math id="m99">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> (rad)</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="center">1</td>
<td align="center">
<inline-formula id="inf95">
<mml:math id="m100">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">0.333</td>
<td align="center">0</td>
<td align="center">0</td>
</tr>
<tr>
<td align="center">2</td>
<td align="center">
<inline-formula id="inf96">
<mml:math id="m101">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">0</td>
<td align="center">0</td>
<td align="center">
<inline-formula id="inf97">
<mml:math id="m102">
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>&#x3c0;</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">
<inline-formula id="inf98">
<mml:math id="m103">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>3</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">0.316</td>
<td align="center">0</td>
<td align="center">
<inline-formula id="inf99">
<mml:math id="m104">
<mml:mrow>
<mml:mi>&#x3c0;</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
</tr>
<tr>
<td align="center">4</td>
<td align="center">
<inline-formula id="inf100">
<mml:math id="m105">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>4</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">0</td>
<td align="center">0.0825</td>
<td align="center">
<inline-formula id="inf101">
<mml:math id="m106">
<mml:mrow>
<mml:mi>&#x3c0;</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
</tr>
<tr>
<td align="center">5</td>
<td align="center">
<inline-formula id="inf102">
<mml:math id="m107">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>5</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">0.384</td>
<td align="center">&#x2212;0.0825</td>
<td align="center">
<inline-formula id="inf103">
<mml:math id="m108">
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>&#x3c0;</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
</tr>
<tr>
<td align="center">6</td>
<td align="center">
<inline-formula id="inf104">
<mml:math id="m109">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>6</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">0</td>
<td align="center">0</td>
<td align="center">
<inline-formula id="inf105">
<mml:math id="m110">
<mml:mrow>
<mml:mi>&#x3c0;</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
</tr>
<tr>
<td align="center">7</td>
<td align="center">
<inline-formula id="inf106">
<mml:math id="m111">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>7</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">0.107</td>
<td align="center">0</td>
<td align="center">0</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>The adjustment value is computed based on the Euclidean distance between the position of the target (basket) center and the landing point of the most recent throw as follows:<disp-formula id="e5">
<mml:math id="m112">
<mml:mrow>
<mml:mtext>Adj_value</mml:mtext>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>w</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mtext>&#x2009;</mml:mtext>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>where <inline-formula id="inf107">
<mml:math id="m113">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> denotes the distance between the two points and <inline-formula id="inf108">
<mml:math id="m114">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>w</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> is a scaling factor. The updated joint values are constrained to remain within their predefined ranges and must satisfy all joint-specific constraints.</p>
</sec>
<sec id="s2-2-3">
<label>2.2.3</label>
<title>Constraint compensation using Q-learning</title>
<p>Q-learning is employed to update the joint positions, resulting in new coordinates for the end-effector. These coordinates are calculated using the DH parameters, which describe the kinematics of the robotic arm. Various approaches exist for computing the correct end-effector coordinates required for the throwing task. Once these coordinates are determined, inverse kinematics (IK) can be applied to derive the corresponding joint values. Techniques such as the Jacobian inverse method and numerical optimization are commonly used to solve IK problems. These methods account for the arm&#x2019;s specific kinematic structure and any joint faults or constraints (<xref ref-type="bibr" rid="B14">Group, 2024</xref>; <xref ref-type="bibr" rid="B23">Learning, 2025</xref>).</p>
<p>However, traditional IK solutions are often slow and struggle to handle multiple joint failures. The Q-learning algorithm overcomes these limitations by adapting to environmental changes and predefined policies. The Q-function is shaped to assign higher rewards to actions that result in throws closer to the basket. If an action violates a joint constraint, the associated reward is reduced, guiding the algorithm to select alternative actions involving unconstrained joints in subsequent iterations. Thus, Q-learning provides a more adaptive and fault-tolerant solution for dynamically updating joint positions during the throwing task.</p>
</sec>
</sec>
<sec id="s2-3">
<label>2.3</label>
<title>Approaches using DQNs</title>
<p>Deep reinforcement learning combines neural networks with RL techniques to address high-dimensional decision-making problems. This integration enables interactive learning in complex and dynamic environments. A key reason behind the growing adoption of deep RL is its demonstrated effectiveness across diverse applications and its compatibility with modern computational platforms (<xref ref-type="fig" rid="F6">Figure 6</xref>). Several types of DQNs have been developed to enhance performance in various settings (<xref ref-type="bibr" rid="B22">Lapan, 2018</xref>; <xref ref-type="bibr" rid="B39">Sorokin et al., 2015</xref>). These include standard DQN, double DQN, N-step DQN, noisy networks, and prioritized experience replay (PER) DQN, along with attention-based extensions.</p>
<fig id="F6" position="float">
<label>FIGURE 6</label>
<caption>
<p>Structure of the deep Q-network, illustrating the flow from input state representation to Q-value outputs for each discrete action.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g006.tif">
<alt-text content-type="machine-generated">Diagram of a Deep Q-Network (DQN). A yellow rectangle labeled &#x22;State&#x22; points to three yellow circles representing input neurons. These connect to three blue circles, then four green circles representing hidden layers, and a red circle for output, linked to &#x22;Q-Value Action&#x22; boxes on the right.</alt-text>
</graphic>
</fig>
<p>This paper explores several advanced DQN variants:<list list-type="bullet">
<list-item>
<p>Noisy networks (DQN-N): they enhance exploration efficiency by injecting noise into the network weights.</p>
</list-item>
<list-item>
<p>Double DQNs (DDQNs): they mitigate overestimation by decoupling action selection and evaluation through two separate networks and improving stability and accuracy&#x2014;especially useful in tasks requiring precision, such as robotic throwing.</p>
</list-item>
<list-item>
<p>Prioritized replay DQNs (PER-DQNs): they increase learning efficiency by prioritizing more informative experiences during training.</p>
</list-item>
<list-item>
<p>Noisy double DQNs (DDQN-Ns): they combine the benefits of DQN-Ns and DDQNs for robust exploration and stable learning.</p>
</list-item>
<list-item>
<p>PER with double DQNs (PER-DDQNs): they integrate the strengths of PER-DQNs and DDQNs to enhance both sampling efficiency and Q-value estimation.</p>
</list-item>
<list-item>
<p>Self-attention-based DQNs (DQN-SA, DQN-MHA): they incorporate attention mechanisms to help the model focus on critical input features, improving learning in high-dimensional environments such as throwing tasks.</p>
</list-item>
<list-item>
<p>Structured self-attention double DQNs (DDQN-SA): they combine DDQNs with structured self-attention to further refine decision making.</p>
</list-item>
<list-item>
<p>PER-DDQN-SA: it integrates PER, DDQN, and self-attention to leverage the advantages of all three approaches.</p>
</list-item>
</list>
</p>
<p>Recently, deep reinforcement learning studies have investigated the robustness of policies. A robust policy is desirable because it should not be sensitive to random seeds or hyperparameters. In some cases, such as when a validation environment is unavailable, off-policy evaluation can be used to estimate policy performance using only pre-collected data. This method allows RL agents to predict the effectiveness of new policies without deploying them in the real world (<xref ref-type="bibr" rid="B24">Li, 2023</xref>).</p>
<p>In this paper, the following metrics are used to evaluate the performance of different DQN algorithms:<list list-type="bullet">
<list-item>
<p>Policy performance: the total average return (TAR) is the most common measure of policy performance (<xref ref-type="bibr" rid="B24">Li, 2023</xref>):</p>
</list-item>
</list>
<disp-formula id="e6">
<mml:math id="m115">
<mml:mrow>
<mml:mtext>TAR</mml:mtext>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="double-struck">E</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x223c;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:msub>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mi>N</mml:mi>
</mml:mrow>
</mml:mfrac>
<mml:mstyle displaystyle="true">
<mml:munderover>
<mml:mrow>
<mml:mo>&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mi>N</mml:mi>
</mml:mrow>
</mml:munderover>
</mml:mstyle>
<mml:msub>
<mml:mrow>
<mml:mi>R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>where<list list-type="bullet">
<list-item>
<p>
<inline-formula id="inf109">
<mml:math id="m116">
<mml:mrow>
<mml:mtext>TAR</mml:mtext>
</mml:mrow>
</mml:math>
</inline-formula> is the total average return,</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf110">
<mml:math id="m117">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="double-struck">E</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x223c;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> is the expectation over initial states <inline-formula id="inf111">
<mml:math id="m118">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> sampled from distribution <inline-formula id="inf112">
<mml:math id="m119">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>,</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf113">
<mml:math id="m120">
<mml:mrow>
<mml:mi>N</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> is the number of episodes or samples, and</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf114">
<mml:math id="m121">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> is the return in the <inline-formula id="inf115">
<mml:math id="m122">
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>th episode.</p>
</list-item>
</list>
</p>
<p>This equation expresses the expected average return computed over <inline-formula id="inf116">
<mml:math id="m123">
<mml:mrow>
<mml:mi>N</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> episodes, with the initial states drawn from a given distribution.<list list-type="bullet">
<list-item>
<p>Learning speed: this refers to the rate at which an RL agent improves its performance over time through training and interactions with the environment (<xref ref-type="bibr" rid="B24">Li, 2023</xref>).</p>
</list-item>
<list-item>
<p>Learning accuracy: this metric assesses how closely a learned policy or value function approximates the optimal one (<xref ref-type="bibr" rid="B24">Li, 2023</xref>).</p>
</list-item>
</list>
</p>
<sec id="s2-3-1">
<label>2.3.1</label>
<title>DQN with self-attention</title>
<p>This novel approach applies two different self-attention mechanisms within DQN. Self-attention mechanisms selectively focus on the most relevant parts of the input data, enhancing the neural network&#x2019;s capacity to process large inputs.</p>
<p>The key concepts of attention mechanisms are as follows:<list list-type="bullet">
<list-item>
<p>Self-attention computes relationships between different parts of the input to generate context-aware representations. It maps a query and a set of key-value pairs to an output, as shown in <xref ref-type="fig" rid="F7">Figure 7</xref>. The output is a weighted sum of the values, where weights are computed using a compatibility function. This function measures the alignment between the query and each corresponding key (<xref ref-type="bibr" rid="B43">Vaswani et al., 2017</xref>).</p>
</list-item>
<list-item>
<p>Scaled dot-product attention calculates attention scores by taking the dot products of queries and keys, scaling by <inline-formula id="inf119">
<mml:math id="m126">
<mml:mrow>
<mml:msqrt>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:msqrt>
</mml:mrow>
</mml:math>
</inline-formula>, and applying a softmax function to obtain attention weights (<xref ref-type="bibr" rid="B43">Vaswani et al., 2017</xref>). The inputs are queries and keys (each of dimension <inline-formula id="inf120">
<mml:math id="m127">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>) and values (dimension <inline-formula id="inf121">
<mml:math id="m128">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>v</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>), arranged in matrices <inline-formula id="inf122">
<mml:math id="m129">
<mml:mrow>
<mml:mi>Q</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>, <inline-formula id="inf123">
<mml:math id="m130">
<mml:mrow>
<mml:mi>K</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>, and <inline-formula id="inf124">
<mml:math id="m131">
<mml:mrow>
<mml:mi>V</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>, respectively (<xref ref-type="fig" rid="F7">Figure 7</xref>). The attention output is computed as follows (<xref ref-type="bibr" rid="B4">Ba et al., 2016</xref>):</p>
</list-item>
</list>
<disp-formula id="equ2">
<mml:math id="m132">
<mml:mrow>
<mml:mi mathvariant="normal">A</mml:mi>
<mml:mi mathvariant="normal">t</mml:mi>
<mml:mi mathvariant="normal">t</mml:mi>
<mml:mi mathvariant="normal">e</mml:mi>
<mml:mi mathvariant="normal">n</mml:mi>
<mml:mi mathvariant="normal">t</mml:mi>
<mml:mi mathvariant="normal">i</mml:mi>
<mml:mi mathvariant="normal">o</mml:mi>
<mml:mi mathvariant="normal">n</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>Q</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>K</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>V</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mi mathvariant="normal">s</mml:mi>
<mml:mi mathvariant="normal">o</mml:mi>
<mml:mi mathvariant="normal">f</mml:mi>
<mml:mi mathvariant="normal">t</mml:mi>
<mml:mi mathvariant="normal">m</mml:mi>
<mml:mi mathvariant="normal">a</mml:mi>
<mml:mi mathvariant="normal">x</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mi>Q</mml:mi>
<mml:msup>
<mml:mrow>
<mml:mi>K</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x22a4;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mrow>
<mml:mrow>
<mml:msqrt>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:msqrt>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:mfenced>
<mml:mi>V</mml:mi>
<mml:mo>.</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>
<list list-type="bullet">
<list-item>
<p>Multi-head attention uses multiple attention heads to capture different aspects of relationships within the data (<xref ref-type="fig" rid="F7">Figure 7</xref>).</p>
</list-item>
</list>
</p>
<p>Incorporating self-attention mechanisms into DQNs enhances the agent&#x2019;s ability to focus on the most relevant features. This leads to improved decision-making and increased learning efficiency. Self-attention can be integrated into a DQN as follows:<list list-type="bullet">
<list-item>
<p>The representation of the state uses attention mechanisms to process and encode state information. For example, the state vector in a throwing task with a robot manipulator is processed using self-attention to extract crucial features. This allows the network to prioritize the most significant parts of the input data.</p>
</list-item>
<list-item>
<p>Self-attention-based DQNs incorporate self-attention layers within the network architecture. In this paper, self-attention layers are added to the network except for the final fully connected layers. This modification significantly improves the network&#x2019;s ability to handle complex state representations and enhances learning performance.</p>
</list-item>
</list>
</p>
<fig id="F7" position="float">
<label>FIGURE 7</label>
<caption>
<p>Visualization of scaled dot-product attention (left) and multi-head attention (right) (<xref ref-type="bibr" rid="B43">Vaswani et al., 2017</xref>).</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g007.tif">
<alt-text content-type="machine-generated">Diagram illustrating Scaled Dot-Product Attention and Multi-Head Attention. Scaled Dot-Product involves MatMul, Scale, optional Mask, SoftMax, and MatMul with inputs Q, K, V. Multi-Head Attention involves three Linear transformations of inputs Q, K, Q, followed by Scaled Dot-Product Attention, concatenation, and a final Linear transformation.</alt-text>
</graphic>
</fig>
<p>Integrating attention mechanisms into DQN improves the identification and prioritization of critical information from input data. By focusing on important features, the learning process becomes more efficient, reducing the number of episodes required to achieve good performance and accelerating training. Moreover, attention mechanisms enhance the agent&#x2019;s ability to generalize. This facilitates better performance in unseen or complex environments and allows the agent to adapt more effectively to new scenarios and challenges.</p>
</sec>
<sec id="s2-3-2">
<label>2.3.2</label>
<title>Multi-head attention in DQNs</title>
<p>Integrating multi-head attention into a DQN can enhance the agent&#x2019;s ability to learn more complex policies. This improvement is achieved by enabling the agent to simultaneously focus on multiple aspects of the state representation. The architecture of the DQN with multi-head attention (DQN-MHA) used in this paper is shown in <xref ref-type="fig" rid="F8">Figure 8</xref> and includes the following components.<list list-type="bullet">
<list-item>
<p>A state input layer that receives a sequence representing the environment&#x2019;s current and previous states as a vector, illustrated in <xref ref-type="fig" rid="F8">Figure 8</xref>. The input sequence consists of the latest eight states.</p>
</list-item>
<list-item>
<p>An attention layer that applies a self-attention mechanism to the input state, allowing the model to focus on the most relevant parts. Each attention head processes the same input sequence but from a different perspective. The outputs of the heads are concatenated to form the multi-head attention output. This approach mimics the [query, value] format by passing the same input twice. Following <xref ref-type="bibr" rid="B20">Keras (2023)</xref>, the value is also used as a key. In this work, 12 attention heads are employed (<xref ref-type="bibr" rid="B43">Vaswani et al., 2017</xref>).</p>
</list-item>
<list-item>
<p>Normalization and residual layers are applied to the multi-head attention output. The residual connection allows the input to bypass sub-layers and be added directly to the output. Layer normalization is applied after the residual connection to stabilize learning and improve convergence. The normalization layer uses <inline-formula id="inf125">
<mml:math id="m133">
<mml:mrow>
<mml:mi>&#x3f5;</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>&#xd7;</mml:mo>
<mml:mn>1</mml:mn>
<mml:msup>
<mml:mrow>
<mml:mn>0</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>6</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:math>
</inline-formula>. Its output type is a <monospace>KerasTensor</monospace> with shape <inline-formula id="inf126">
<mml:math id="m134">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mn>1</mml:mn>
<mml:mo>,</mml:mo>
<mml:mi mathvariant="monospace">N</mml:mi>
<mml:mi mathvariant="monospace">o</mml:mi>
<mml:mo>.</mml:mo>
<mml:mi mathvariant="monospace">N</mml:mi>
<mml:mi mathvariant="monospace">e</mml:mi>
<mml:mi mathvariant="monospace">u</mml:mi>
<mml:mi mathvariant="monospace">r</mml:mi>
<mml:mi mathvariant="monospace">o</mml:mi>
<mml:mi mathvariant="monospace">n</mml:mi>
<mml:mi mathvariant="monospace">s</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>.</p>
</list-item>
<list-item>
<p>A flatten layer reshapes the multi-dimensional tensor <inline-formula id="inf127">
<mml:math id="m135">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mn>1</mml:mn>
<mml:mo>,</mml:mo>
<mml:mi mathvariant="monospace">N</mml:mi>
<mml:mi mathvariant="monospace">o</mml:mi>
<mml:mo>.</mml:mo>
<mml:mi mathvariant="monospace">N</mml:mi>
<mml:mi mathvariant="monospace">e</mml:mi>
<mml:mi mathvariant="monospace">u</mml:mi>
<mml:mi mathvariant="monospace">r</mml:mi>
<mml:mi mathvariant="monospace">o</mml:mi>
<mml:mi mathvariant="monospace">n</mml:mi>
<mml:mi mathvariant="monospace">s</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> into a one-dimensional tensor of the same shape. This facilitates the transition from attention layers to fully connected dense layers, without altering the data values or structure.</p>
</list-item>
<list-item>
<p>A DQN consisting of fully connected dense layers applies linear transformations followed by ReLU activations. This enables the learning of complex patterns from the integrated attention outputs.</p>
</list-item>
<list-item>
<p>A final dense output layer produces q-values for each possible action. These Q-values estimate the expected future rewards for actions given the current state and are used for decision-making in reinforcement learning.</p>
</list-item>
</list>
</p>
<fig id="F8" position="float">
<label>FIGURE 8</label>
<caption>
<p>Overview of the DQN-MHA architecture, which integrates multi-head attention into the deep Q-network framework.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g008.tif">
<alt-text content-type="machine-generated">Flowchart displaying a processing sequence starting with &#x22;State Input,&#x22; followed by &#x22;Multi-Head Attention,&#x22; &#x22;Layer Normalization &#x2b; Residual Connection,&#x22; and &#x22;Flatten.&#x22; It then enters a section labeled &#x22;DQN&#x22; containing &#x22;Dense 1&#x22; and &#x22;Dense 2&#x22; before outputting &#x22;Q-values.&#x22; Labels on the side indicate &#x22;Multi-Head Attention&#x22; and &#x22;Normalization &#x2b; Residual.&#x22;</alt-text>
</graphic>
</fig>
<p>Within the DQN-MHA model, each attention head receives the same input sequence, processes it independently using distinct <inline-formula id="inf129">
<mml:math id="m137">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>q</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>k</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> weight matrices, and generates an output that reflects a unique perspective. This design implements horizontal self-attention, enabling the model to extract diverse features from the same input, which enhances information abstraction.</p>
<p>The output of each attention head <inline-formula id="inf130">
<mml:math id="m138">
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> is defined as follows:<disp-formula id="equ3">
<mml:math id="m139">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mtext>Attention</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold">S</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mtext>softmax</mml:mtext>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mi mathvariant="bold">S</mml:mi>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>Q</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:msup>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold">S</mml:mi>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>K</mml:mi>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x22a4;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mrow>
<mml:mrow>
<mml:msqrt>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:msqrt>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:mfenced>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold">S</mml:mi>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>V</mml:mi>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
</mml:mfenced>
<mml:mo>.</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>
</p>
<p>The outputs from all heads are concatenated and projected:<disp-formula id="equ4">
<mml:math id="m140">
<mml:mrow>
<mml:mtext>MHA</mml:mtext>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold">S</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mtext>Concat</mml:mtext>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mtext>Attention</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold">S</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
<mml:mo>&#x2026;</mml:mo>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mtext>Attention</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold">S</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="bold">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>O</mml:mi>
</mml:mrow>
</mml:msup>
<mml:mo>.</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>
</p>
<p>A residual connection followed by layer normalization is applied:<disp-formula id="equ5">
<mml:math id="m141">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">Z</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mtext>LayerNorm</mml:mtext>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold">S</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mtext>MHA</mml:mtext>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold">S</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
<mml:mo>.</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>
</p>
<p>The output is then flattened and passed through two fully connected layers with ReLU activations:<disp-formula id="equ6">
<mml:math id="m142">
<mml:mrow>
<mml:mi mathvariant="bold">z</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mtext>Flatten</mml:mtext>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">Z</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>
<disp-formula id="equ7">
<mml:math id="m143">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">h</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mtext>ReLU</mml:mtext>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mi mathvariant="bold">z</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>
<disp-formula id="equ8">
<mml:math id="m144">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">h</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mtext>ReLU</mml:mtext>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">h</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
<mml:mo>.</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>
</p>
<p>The final Q-value is computed as follows:<disp-formula id="equ9">
<mml:math id="m145">
<mml:mrow>
<mml:mi>Q</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>3</mml:mn>
</mml:mrow>
</mml:msub>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">h</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>3</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>.</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>
</p>
<p>Notations:<list list-type="bullet">
<list-item>
<p>
<inline-formula id="inf131">
<mml:math id="m146">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2208;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:math>
</inline-formula>: current state vector</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf132">
<mml:math id="m147">
<mml:mrow>
<mml:mi mathvariant="bold">S</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">[</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>7</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:mo>&#x2026;</mml:mo>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo stretchy="false">]</mml:mo>
</mml:mrow>
<mml:mo>&#x2208;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>8</mml:mn>
<mml:mo>&#xd7;</mml:mo>
<mml:mi>n</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:math>
</inline-formula>: sequence of the last eight states</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf133">
<mml:math id="m148">
<mml:mrow>
<mml:mi>Q</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi mathvariant="bold">s</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula>: Q-value for state <inline-formula id="inf134">
<mml:math id="m149">
<mml:mrow>
<mml:mi mathvariant="bold">s</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> and action <inline-formula id="inf135">
<mml:math id="m150">
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>
</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf136">
<mml:math id="m151">
<mml:mrow>
<mml:mi>A</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>: number of actions</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf137">
<mml:math id="m152">
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>: number of attention heads</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf138">
<mml:math id="m153">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>, <inline-formula id="inf139">
<mml:math id="m154">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>v</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>: dimensions of keys/queries and values</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf140">
<mml:math id="m155">
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>Q</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>K</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>V</mml:mi>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
</mml:math>
</inline-formula>: weight matrices for query, key, and value in head <inline-formula id="inf141">
<mml:math id="m156">
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>
</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf142">
<mml:math id="m157">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="bold">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>O</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:math>
</inline-formula>: output projection matrix for the multi-head attention</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf143">
<mml:math id="m158">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">Z</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>: output after residual connection and LayerNorm</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf144">
<mml:math id="m159">
<mml:mrow>
<mml:mi mathvariant="bold">z</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>: flattened vector of <inline-formula id="inf145">
<mml:math id="m160">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">Z</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>
</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf146">
<mml:math id="m161">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>3</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>: weight matrices for the fully connected layers</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf147">
<mml:math id="m162">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>3</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>: bias terms for the fully connected layers</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf148">
<mml:math id="m163">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">h</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">h</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>: hidden layer outputs in the feedforward network</p>
</list-item>
</list>
</p>
</sec>
<sec id="s2-3-3">
<label>2.3.3</label>
<title>Structured self-attention in DQNs</title>
<p>Integrating scaled dot-product attention with a DQN can improve the agent&#x2019;s ability to learn more complex policies. This is achieved by enabling the agent to focus on different aspects of the state representation simultaneously. The DQN-SA architecture proposed in this work (<xref ref-type="fig" rid="F9">Figure 9</xref>) consists of the following components:<list list-type="bullet">
<list-item>
<p>State input layer: it receives a sequence of states, identical to the input used in the DQN with MHA architecture.</p>
</list-item>
<list-item>
<p>Self-attention layer 1: it applies a scaled dot-product attention mechanism to the input sequence, offering a first perspective (&#x201c;point of view&#x201d;) on the state.</p>
</list-item>
<list-item>
<p>Self-attention layer 2: it processes the original state input again, now incorporating the output of the first self-attention layer.</p>
</list-item>
<list-item>
<p>Self-attention layer 3: it takes the result from the second layer and combines it with the first layer&#x2019;s output to form a refined third-level perspective.</p>
</list-item>
<list-item>
<p>Concatenation layer: it merges the outputs of all three self-attention layers into a single vector. This integration step allows the network to combine multiple attention-derived representations of the state.</p>
</list-item>
<list-item>
<p>DQN module: it comprises a series of fully connected dense layers, identical to the architecture used in the MHA-based DQN, which processes the concatenated output.</p>
</list-item>
<list-item>
<p>Q-values output layer: It is a final dense layer that computes the Q-values for each possible action.</p>
</list-item>
</list>
</p>
<fig id="F9" position="float">
<label>FIGURE 9</label>
<caption>
<p>Overview of the DQN-SA architecture integrating self-attention layers within the deep Q-network.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g009.tif">
<alt-text content-type="machine-generated">Flowchart illustrating a deep reinforcement learning model. It starts with a state sequence of states and actions, followed by three attention layers labeled Attention 1, Attention 2, and Attention 3. These layers are concatenated and passed through a Deep Q-Network (DQN) consisting of Dense 1 and Dense 2 layers. The output is Q-values.</alt-text>
</graphic>
</fig>
<p>This architecture processes the input state through successive self-attention layers, with each layer forming its own representation based on the output of the previous layer. As a result, the network creates a vertical self-attention hierarchy. This layered structure enables the model to extract increasingly abstract features during training. However, there is a risk of losing certain low-level details. To mitigate this, outputs from all attention layers are concatenated, ensuring that essential information is retained.</p>
<p>For DQN-SA, let <inline-formula id="inf149">
<mml:math id="m164">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">Z</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mi mathvariant="bold">S</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>. For each attention layer <inline-formula id="inf150">
<mml:math id="m165">
<mml:mrow>
<mml:mi>l</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1,2,3</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>,<disp-formula id="equ10">
<mml:math id="m166">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">Q</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">Z</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>Q</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">K</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">Z</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>K</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">V</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">Z</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>V</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>
<disp-formula id="equ11">
<mml:math id="m167">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mtext>Attention</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mtext>softmax</mml:mtext>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">Q</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold">K</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x22a4;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mrow>
<mml:msqrt>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:msqrt>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:mfenced>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">V</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>
<disp-formula id="equ12">
<mml:math id="m168">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">Z</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mtext>Attention</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>.</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>
</p>
<p>After computing the outputs of the attention layers, they are concatenated and passed through a fully connected feedforward network:<disp-formula id="equ13">
<mml:math id="m169">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">Z</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>concat</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mtext>Concat</mml:mtext>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">Z</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">Z</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">Z</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>3</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
<mml:mi mathvariant="bold">z</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mtext>Flatten</mml:mtext>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">Z</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>concat</mml:mtext>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>
<disp-formula id="equ14">
<mml:math id="m170">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">h</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mtext>ReLU</mml:mtext>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mi mathvariant="bold">z</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">h</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mtext>ReLU</mml:mtext>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">h</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>
<disp-formula id="equ15">
<mml:math id="m171">
<mml:mrow>
<mml:mi>Q</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>3</mml:mn>
</mml:mrow>
</mml:msub>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">h</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>3</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>where<list list-type="bullet">
<list-item>
<p>
<inline-formula id="inf151">
<mml:math id="m172">
<mml:mrow>
<mml:mi mathvariant="bold">S</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:math>
</inline-formula>: input state sequence vector.</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf152">
<mml:math id="m173">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">Z</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mi mathvariant="bold">S</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>: initial input to the first attention layer.</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf153">
<mml:math id="m174">
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>Q</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>K</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>V</mml:mi>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
</mml:math>
</inline-formula>: query, key, and value weight matrices for layer <inline-formula id="inf154">
<mml:math id="m175">
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>, respectively.</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf155">
<mml:math id="m176">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>: dimensionality of the keys and queries.</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf156">
<mml:math id="m177">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">Q</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">K</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">V</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>: transformed input matrices in layer <inline-formula id="inf157">
<mml:math id="m178">
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>.</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf158">
<mml:math id="m179">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mtext>Attention</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>: output of the scaled dot-product attention for layer <inline-formula id="inf159">
<mml:math id="m180">
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>.</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf160">
<mml:math id="m181">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">Z</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>: output of attention layer <inline-formula id="inf161">
<mml:math id="m182">
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>.</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf162">
<mml:math id="m183">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">Z</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>concat</mml:mtext>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>: concatenated outputs from all attention layers.</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf163">
<mml:math id="m184">
<mml:mrow>
<mml:mi mathvariant="bold">z</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>: flattened version of <inline-formula id="inf164">
<mml:math id="m185">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">Z</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>concat</mml:mtext>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>.</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf165">
<mml:math id="m186">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>3</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>: weight matrices of the dense layers.</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf166">
<mml:math id="m187">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>3</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>: bias vectors for the dense layers.</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf167">
<mml:math id="m188">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">h</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">h</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>: intermediate activations from the fully connected layers.</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf168">
<mml:math id="m189">
<mml:mrow>
<mml:mi>Q</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula>: predicted Q-value for taking action <inline-formula id="inf169">
<mml:math id="m190">
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> in state <inline-formula id="inf170">
<mml:math id="m191">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>.</p>
</list-item>
</list>
</p>
</sec>
<sec id="s2-3-4">
<label>2.3.4</label>
<title>Comparison analysis of DQNs based on self-attention</title>
<p>The primary distinction between the two architectures lies in the direction of self-attention: DQN-SA employs vertical self-attention, while DQN-MHA uses horizontal self-attention. In DQN-MHA, multiple attention heads operate in parallel on the same input but produce different outputs due to variations in their query&#x2013;key weight matrices. Each head captures a distinct perspective of the input, enabling the network to extract diverse features relevant for solving deep reinforcement learning problems.</p>
<p>In contrast, DQN-SA generates each layer&#x2019;s output based on the preceding self-attention layer, forming a hierarchical abstraction of the input. This vertical stacking enhances the model&#x2019;s capacity for abstraction but may lead to a loss of finer details. To mitigate this, the input vector of each self-attention layer is fused with the original state input. Although DQN-SA shares structural similarities with DQN-MHA, it functions in a sequential (vertical) manner. Considering the complexity of the throwing task, additional self-attention layers or multi-head attention in DQN-SA may not be necessary.</p>
</sec>
</sec>
</sec>
<sec sec-type="results" id="s3">
<label>3</label>
<title>Result</title>
<p>This section describes the application of the above techniques to different robots performing various tasks when limited by physical boundaries or affected by failures. These scenarios are addressed using different reinforcement learning algorithms. The corresponding code can be found on GitHub<xref ref-type="fn" rid="fn2">
<sup>2</sup>
</xref>.</p>
<sec id="s3-1">
<label>3.1</label>
<title>Q-learning for robot throwing</title>
<sec id="s3-1-1">
<label>3.1.1</label>
<title>Q-learning for pick-and-place tasks</title>
<p>To evaluate the performance of the Q-learning algorithm in the presence of physical constraints (e.g., hardware failures or environmental boundaries), two experiments were conducted for pick-and-place tasks (<xref ref-type="bibr" rid="B45">Wiki, 2024</xref>). The robot used is the PhantomX Pincher, shown in <xref ref-type="fig" rid="F10">Figure 10</xref>, with its DH parameters provided in <xref ref-type="table" rid="T3">Table 3</xref>.<list list-type="bullet">
<list-item>
<p>Experiment &#x23;1: The robot is tasked with moving from an initial position to point A <inline-formula id="inf171">
<mml:math id="m192">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mn>0.1698</mml:mn>
<mml:mo>,</mml:mo>
<mml:mn>0.0272</mml:mn>
<mml:mo>,</mml:mo>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>0.2081</mml:mn>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> and subsequently to point B <inline-formula id="inf172">
<mml:math id="m193">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mn>0.2313</mml:mn>
<mml:mo>,</mml:mo>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>0.0401</mml:mn>
<mml:mo>,</mml:mo>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>0.1333</mml:mn>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> in Cartesian space. After reaching point A, two simultaneous failures occur: one restricts the motion of the second joint, while the other completely locks the fourth joint. Despite these failures, the Q-learning algorithm is able to adapt and find alternative solutions, avoiding reliance on the faulty joints. The robot reaches near point A with a position error of 0.8778 cm and near point B with an error of 0.3817 cm. The total execution time is 10.25 s.</p>
</list-item>
<list-item>
<p>Experiment &#x23;2: To assess the algorithm&#x2019;s behavior under multiple joint failures, the robot must sequentially reach three target points in Cartesian space: <inline-formula id="inf173">
<mml:math id="m194">
<mml:mrow>
<mml:mi>A</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mn>0.1698</mml:mn>
<mml:mo>,</mml:mo>
<mml:mn>0.0272</mml:mn>
<mml:mo>,</mml:mo>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>0.2081</mml:mn>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula>, <inline-formula id="inf174">
<mml:math id="m195">
<mml:mrow>
<mml:mi>B</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mn>0.2313</mml:mn>
<mml:mo>,</mml:mo>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>0.0401</mml:mn>
<mml:mo>,</mml:mo>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>0.1333</mml:mn>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula>, and <inline-formula id="inf175">
<mml:math id="m196">
<mml:mrow>
<mml:mi>C</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>0.0436</mml:mn>
<mml:mo>,</mml:mo>
<mml:mn>0.2610</mml:mn>
<mml:mo>,</mml:mo>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>0.182</mml:mn>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula>. After reaching point A, a failure affects the first joint, limiting its motion. Upon reaching point B, two additional failures occur: the second joint becomes fully blocked, and the third joint&#x2019;s range is severely restricted. The Q-learning algorithm successfully guides the robot to all three points despite the joint limitations, achieving position errors of 0.7176 cm, 0.7921 cm, and 0.9853 cm for points A, B, and C, respectively. The total time taken is 18.83 s.</p>
</list-item>
</list>
</p>
<fig id="F10" position="float">
<label>FIGURE 10</label>
<caption>
<p>PhantomX Pincher robotic manipulator.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g010.tif">
<alt-text content-type="machine-generated">A robotic arm with multiple joints and cables is mounted on a black base against a blue background. The arm has a rectangular attachment at the end.</alt-text>
</graphic>
</fig>
</sec>
<sec id="s3-1-2">
<label>3.1.2</label>
<title>Constraint compensation using reward function</title>
<p>Reward function design, also known as reward function engineering, is among the most challenging aspects of reinforcement learning, particularly when addressing robotic constraints such as joint range limits and torque saturation. To ensure that the agent operates within its physical limitations, penalty terms can be introduced into the reward function, e.g., for actions that violate joint constraints. Properly tuning these penalty weights not only encourages physically feasible behavior but also accelerates the learning process by guiding the agent toward safer and more effective solutions.</p>
<p>Although numerous types of constraints are relevant in robotic systems, we focus now solely on total joint failures. The reward function is modified accordingly to enable efficient task execution while respecting these constraints.<disp-formula id="equ20">
<mml:math id="m197">
<mml:mrow>
<mml:mi>R</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>0.5</mml:mn>
<mml:mo>&#x22c5;</mml:mo>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:mfenced open="{" close="">
<mml:mrow>
<mml:mtable class="cases">
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mo>&#x2212;</mml:mo>
<mml:mn>20</mml:mn>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mtext>if </mml:mtext>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2265;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mo>&#x2b;</mml:mo>
<mml:mn>0.3</mml:mn>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mtext>if </mml:mtext>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3c;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mrow>
</mml:mfenced>
<mml:mo>.</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>
</p>
<p>The above reward function incorporates a distance-based shaping term and a discrete bonus/penalty mechanism. The additional reward values (<inline-formula id="inf176">
<mml:math id="m198">
<mml:mrow>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>0.3</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> and <inline-formula id="inf177">
<mml:math id="m199">
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>20</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>) were selected empirically through systematic experimentation, evaluating various alternatives to identify those that produced optimal learning performance and stable agent behavior.</p>
<p>The reward is computed based on the distance, defined as the Euclidean distance between the landing point and the center of the basket. The center of the basket is taken as the coordinate origin (0,0). A positive bonus of <inline-formula id="inf178">
<mml:math id="m200">
<mml:mrow>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>0.3</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> is applied whenever the distance decreases, whereas a large negative penalty of <inline-formula id="inf179">
<mml:math id="m201">
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>20</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> is applied when the distance increases or remains the same as in the previous attempt. This design encourages the agent to perform actions that improve task success while simultaneously adhering to joint constraints.<list list-type="bullet">
<list-item>
<p>Analysis without sudden constrains.</p>
</list-item>
</list>
</p>
<p>As illustrated in <xref ref-type="fig" rid="F11">Figure 11</xref>, selecting action 2 from state 2 leads to a negative reward because the distance <inline-formula id="inf180">
<mml:math id="m202">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> increases. Consequently, the algorithm does not transition to state 3 but instead remains in state 2, and the negative reward is recorded for action 2. In the following iteration, the algorithm selects a different action&#x2014;either by exploiting prior knowledge or through random exploration&#x2014;and chooses action 3. Since this action results in a smaller <inline-formula id="inf181">
<mml:math id="m203">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>, it yields a positive reward and transitions the agent to state 4.</p>
<fig id="F11" position="float">
<label>FIGURE 11</label>
<caption>
<p>Example of state transition in Q-learning based on action outcomes.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g011.tif">
<alt-text content-type="machine-generated">Diagram showing a state-action-reward model with three actions and four states. S1 transitions to S2 with Action 1, gaining Reward 1. From S2, Action 3 leads to S4, gaining Reward 3, while Action 2 leads to S3 with Reward 2. A table is below detailing the rewards for each action and state combination. Rewards are noted: Reward 1 and 3 are positive, and Reward 2 is negative.</alt-text>
</graphic>
</fig>
<p>If a valid solution&#x2014;or multiple solutions&#x2014;exists, the Q-learning algorithm consistently converges toward it as it favors joint adjustment values that minimize the error distance. In cases where no exact solution is possible due to joint failures or constraints, the algorithm outputs a set of joint values and a throwing angle that results in the object being thrown to the position closest to the basket.<list list-type="bullet">
<list-item>
<p>Analysis with sudden constraints.</p>
</list-item>
</list>
</p>
<p>There are two possible sub-cases in this scenario:<list list-type="order">
<list-item>
<p>Unconstrained action dominance: The reward associated with the unconstrained joint is higher, and the agent consistently selects actions unrelated to constraints. In this case, the algorithm proceeds toward the solution.</p>
</list-item>
<list-item>
<p>Constraint-induced deviation (worst case): The agent may choose an action involving a constrained joint either during exploration or due to exploitation, where the constrained joint previously had the highest Q-value. This situation worsens if a sudden constraint (e.g., joint failure) is introduced.</p>
</list-item>
</list>
</p>
<p>Consider the worst-case scenario where the agent previously selected an action with the highest reward, and the resulting landing point was very close to the basket but not inside it. Suppose a fault occurs in a specific joint, rendering it immobile. Let the following parameters apply:<list list-type="bullet">
<list-item>
<p>
<inline-formula id="inf182">
<mml:math id="m204">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0.02</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>&#x2009;m (distance to target remains the same),</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf183">
<mml:math id="m205">
<mml:mrow>
<mml:mi>Q</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>s</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0.5</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> (previous Q-value),</p>
</list-item>
<list-item>
<p>
<inline-formula id="inf184">
<mml:math id="m206">
<mml:mrow>
<mml:mi>Q</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
<mml:mo>,</mml:mo>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> (assuming next state&#x2019;s value is 0 for simplicity),</p>
</list-item>
<list-item>
<p>learning rate <inline-formula id="inf185">
<mml:math id="m207">
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0.5</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>, and</p>
</list-item>
<list-item>
<p>discount factor <inline-formula id="inf186">
<mml:math id="m208">
<mml:mrow>
<mml:mi>&#x3b3;</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0.5</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>.</p>
</list-item>
</list>
</p>
<p>The immediate reward, without any additional reward or penalty, is calculated as follows:<disp-formula id="equ16">
<mml:math id="m209">
<mml:mrow>
<mml:mi>R</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>0.5</mml:mn>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>0.5</mml:mn>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mn>0.02</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>0.02</mml:mn>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>.</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>
</p>
<p>The Q-value is updated as follows:<disp-formula id="equ17">
<mml:math id="m210">
<mml:mrow>
<mml:mi>Q</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>s</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0.5</mml:mn>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>0.5</mml:mn>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mn>1</mml:mn>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>0.5</mml:mn>
<mml:mo>&#x22c5;</mml:mo>
<mml:mn>0</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>0.5</mml:mn>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0.75</mml:mn>
<mml:mo>.</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>
</p>
<p>The increase in <inline-formula id="inf187">
<mml:math id="m211">
<mml:mrow>
<mml:mi>Q</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>s</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula> incorrectly indicates that choosing the same action brings the throwing point closer to the target, which is misleading due to the joint fault.</p>
<p>Reward shaping: To address this issue, additional penalties and rewards are introduced in the reward function:<list list-type="bullet">
<list-item>
<p>If <inline-formula id="inf188">
<mml:math id="m212">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2265;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>, a large penalty of <inline-formula id="inf189">
<mml:math id="m213">
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>20</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> is applied to discourage moving away from the target.</p>
</list-item>
<list-item>
<p>If <inline-formula id="inf190">
<mml:math id="m214">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3c;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>, a positive bonus of <inline-formula id="inf191">
<mml:math id="m215">
<mml:mrow>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>0.3</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula> is awarded to encourage a reduction in distance.</p>
</list-item>
</list>
</p>
<p>With the penalty applied, the new immediate reward becomes<disp-formula id="equ18">
<mml:math id="m216">
<mml:mrow>
<mml:mi>R</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>0.5</mml:mn>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mn>0.02</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>0.02</mml:mn>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>20</mml:mn>
<mml:mo>&#x3d;</mml:mo>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>19</mml:mn>
<mml:mo>.</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>
</p>
<p>The updated Q-value is<disp-formula id="equ19">
<mml:math id="m217">
<mml:mrow>
<mml:mi>Q</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>s</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0.5</mml:mn>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>0.5</mml:mn>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>19</mml:mn>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>0.5</mml:mn>
<mml:mo>&#x22c5;</mml:mo>
<mml:mn>0</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>0.5</mml:mn>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>9.25</mml:mn>
<mml:mo>.</mml:mo>
</mml:mrow>
</mml:math>
</disp-formula>
</p>
<p>Compared to the unmodified case, this significantly lower Q-value ensures that the agent avoids selecting the same faulty action in future iterations. Similarly, the positive additional reward helps reinforce beneficial behavior when the distance decreases.</p>
<p>These reward modifications must be carefully tuned to ensure a balance between exploration and exploitation during training.</p>
</sec>
<sec id="s3-1-3">
<label>3.1.3</label>
<title>Q-learning for throwing tasks</title>
<p>The performance of the Q-learning algorithm is evaluated for throwing tasks using a two-link planar arm (<xref ref-type="fig" rid="F4">Figure 4</xref>) and the Franka Emika robot (<xref ref-type="fig" rid="F5">Figure 5</xref>). The experiments are conducted under different scenarios, both with and without boundary constraints.<list list-type="bullet">
<list-item>
<p>Experiment &#x23;3: The target basket is placed at varying positions to evaluate the algorithm&#x2019;s learning capability. A two-link planar manipulator with rotational joints is used, with its DH parameters given in <xref ref-type="table" rid="T4">Table 4</xref>.</p>
</list-item>
</list>
</p>
<p>As shown in <xref ref-type="fig" rid="F12">Figure 12</xref>, after the initial throw, the algorithm quickly adapts the manipulator&#x2019;s joint configuration to bring the ball closer to the basket, using information obtained from the previous throw. The number of iterations is 2, and the elapsed time is 0.010830 s.</p>
<fig id="F12" position="float">
<label>FIGURE 12</label>
<caption>
<p>Learning process using Q-learning-based throwing using the two-link planar robot. The figure shows how the robot refines its throwing strategy: the green line denotes the initial attempt, and the blue line reflects improvement in the subsequent throw.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g012.tif">
<alt-text content-type="machine-generated">Graph of throwing coordinates over time, showing two parabolic trajectories with X and Y coordinates in meters. The blue and green lines rise steeply, peak around 0.35 meters in Y, and descend sharply.</alt-text>
</graphic>
</fig>
<p>In the scenario illustrated in <xref ref-type="fig" rid="F13">Figure 13</xref>, the algorithm executes six actions as follows:<list list-type="order">
<list-item>
<p>Decrease <inline-formula id="inf192">
<mml:math id="m218">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>, negative reward, &#x201c;randomly.&#x201d;</p>
</list-item>
<list-item>
<p>Increase <inline-formula id="inf193">
<mml:math id="m219">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>, positive reward, &#x201c;exploit.&#x201d;</p>
</list-item>
<list-item>
<p>Increase <inline-formula id="inf194">
<mml:math id="m220">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>, positive reward, &#x201c;randomly.&#x201d;</p>
</list-item>
<list-item>
<p>Increase <inline-formula id="inf195">
<mml:math id="m221">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> and <inline-formula id="inf196">
<mml:math id="m222">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>, positive reward, &#x201c;randomly.&#x201d;</p>
</list-item>
<list-item>
<p>Increase <inline-formula id="inf197">
<mml:math id="m223">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>, positive reward, &#x201c;exploit.&#x201d;</p>
</list-item>
<list-item>
<p>Increase <inline-formula id="inf198">
<mml:math id="m224">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>, positive reward, &#x201c;exploit.&#x201d;</p>
</list-item>
</list>
</p>
<fig id="F13" position="float">
<label>FIGURE 13</label>
<caption>
<p>Learning process using Q-learning-based throwing using the two-link planar robot. The figure illustrates the evolution of the learned policy across six training steps, highlighting how the agent progressively improves its decision-making.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g013.tif">
<alt-text content-type="machine-generated">Graph titled &#x22;Throwing Coordinates over Time&#x22; with X coordinates on the horizontal axis and Y coordinates on the vertical axis, both in meters. It features five parabolic trajectories in blue, converging into a thicker green line at the top right. A red dot marks a starting point near the bottom left at -0.7 meters on the X-axis.</alt-text>
</graphic>
</fig>
<p>The total elapsed time is 0.143417 s, and the final distance is 0.92 cm.<list list-type="bullet">
<list-item>
<p>Experiment &#x23;4: The basket is placed at position (0,0), close to the robot&#x2019;s base, to evaluate Q-learning behavior under more constrained spatial configurations.</p>
</list-item>
</list>
</p>
<p>As shown in <xref ref-type="fig" rid="F14">Figure 14</xref>, the algorithm finds a valid solution by adjusting the throwing angle. However, it requires a large number of iterations (1183), resulting in a total execution time of 2.248 s (<xref ref-type="bibr" rid="B17">Homsi et al., 2023</xref>). This is primarily due to the limited number of states managed by the algorithm.<list list-type="bullet">
<list-item>
<p>Experiment &#x23;5: This experiment explores performance in three scenarios: (i) a limited number of states (<xref ref-type="fig" rid="F15">Figure 15</xref>), (ii) an expanded state set (<xref ref-type="fig" rid="F16">Figure 16</xref>), and (iii) expanded states with a hardware failure in joint 2 (<xref ref-type="fig" rid="F17">Figure 17</xref>).</p>
</list-item>
</list>
</p>
<fig id="F14" position="float">
<label>FIGURE 14</label>
<caption>
<p>Learning process using Q-learning as the agent progressively improves its actions to reach the target position at (0,0).</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g014.tif">
<alt-text content-type="machine-generated">Plot titled &#x22;Throwing Coordinates over time&#x22; showing a set of blue trajectory curves with lines peaking at varying Y coordinates and converging near the origin. A green curve and a red star are visible near the base, indicating a notable data point. The X-axis ranges from -0.8 to 0.4 meters and the Y-axis ranges from -0.05 to 0.45 meters.</alt-text>
</graphic>
</fig>
<fig id="F15" position="float">
<label>FIGURE 15</label>
<caption>
<p>Learning process using Q-learning shows how the agent learns to perform the throwing motion despite being constrained to a limited number of states.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g015.tif">
<alt-text content-type="machine-generated">A line graph titled &#x22;Throwing Coordinates over Time&#x22; shows the paths of various throws. The X-axis represents X coordinates in meters, ranging from -0.7 to 0.3. The Y-axis represents Y coordinates in meters, ranging from 0 to 0.4. Blue and green curves depict different throwing trajectories, with red dots clustered near Y equals 0, indicating initial or final positions.</alt-text>
</graphic>
</fig>
<fig id="F16" position="float">
<label>FIGURE 16</label>
<caption>
<p>Learning process using Q-learning illustrates improved throwing behavior enabled by incorporating a larger number of states.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g016.tif">
<alt-text content-type="machine-generated">Graph titled &#x22;Throwing Coordinates over time&#x22; showing multiple curved trajectories. The X-axis represents coordinates in meters from -0.8 to 0.4, and the Y-axis ranges from 0 to 0.4 meters. Blue curves depict trajectories, with one green and several red markings near the origin.</alt-text>
</graphic>
</fig>
<fig id="F17" position="float">
<label>FIGURE 17</label>
<caption>
<p>Learning process using Q-learning with more states considered and the fully constrained second joint.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g017.tif">
<alt-text content-type="machine-generated">Graph showing throwing coordinates over time with X coordinates on the horizontal axis and Y coordinates on the vertical axis. Blue curved lines indicate trajectories, with a green highlighted curve among them. A cluster of red dots appears near the bottom.</alt-text>
</graphic>
</fig>
<p>These setups assess the algorithm&#x2019;s adaptability to changes in the state space and the reliability of the hardware. With a limited state space, the algorithm converges in 51 iterations. When the number of states is increased, convergence improves significantly to just nine iterations. However, in the presence of a hardware fault (immobile second joint), convergence requires 12 iterations. This comparison illustrates that expanding the state space enhances learning efficiency, while hardware failures introduce additional complexity that delays convergence.<list list-type="bullet">
<list-item>
<p>Experiment 6: The algorithm was evaluated under physical constraints, such as the presence of a wall or a nearby person. In certain test scenarios, the algorithm operated without explicitly detecting these constraints, relying solely on the distance between the landing point and the basket, as shown in <xref ref-type="fig" rid="F18">Figures 18</xref>&#x2013;<xref ref-type="fig" rid="F20">20</xref>.</p>
</list-item>
</list>
</p>
<fig id="F18" position="float">
<label>FIGURE 18</label>
<caption>
<p>Learning process using Q-learning when a wall presents a nearby boundary.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g018.tif">
<alt-text content-type="machine-generated">Graph illustrating &#x22;Throwing Coordinates over time&#x22;, showing multiple trajectories with X Coordinates in meters on the horizontal axis and Y Coordinates in meters on the vertical axis. Five distinct curves in cyan, pink, and blue suggest different throwing paths, all peaking around Y &#x3d; 0.35 meters before descending. A red vertical line is present at X &#x3d; -0.1 meters.</alt-text>
</graphic>
</fig>
<fig id="F19" position="float">
<label>FIGURE 19</label>
<caption>
<p>Learning process using Q-learning when there is a wall as a nearby boundary and one joint is completely fixed (nine iterations).</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g019.tif">
<alt-text content-type="machine-generated">Graph depicting throwing coordinates over time. The x-axis shows X Coordinates in meters, and the y-axis shows Y Coordinates in meters. Curves are plotted in cyan, magenta, and blue, with distinctive arcs peaking between 0.15 and 0.35 meters on the y-axis. Two red circles highlight points, and a vertical red line intersects near the x-axis.</alt-text>
</graphic>
</fig>
<fig id="F20" position="float">
<label>FIGURE 20</label>
<caption>
<p>Learning process using Q-learning when a wall presents a boundary that is near the target basket (10 iterations).</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g020.tif">
<alt-text content-type="machine-generated">Graph titled &#x22;Throwing Coordinates over time,&#x22; showing X and Y coordinates in meters. The pink line curves upwards, intersecting with a blue line that loops. A red vertical line on the left and small green markers near the origin are present.</alt-text>
</graphic>
</fig>
<p>The algorithm demonstrated notable robustness under the following challenging conditions.<list list-type="bullet">
<list-item>
<p>With a wall near the basket, a successful throw was achieved within 10 iterations.</p>
</list-item>
<list-item>
<p>In the presence of a hardware failure (immobile second joint) and a nearby wall, the robot successfully adapted, requiring nine iterations.</p>
</list-item>
<list-item>
<p>When only a wall was present near the robot, the algorithm needed just seven iterations to reach the goal.</p>
</list-item>
</list>
</p>
<p>These outcomes highlight the adaptability and efficiency of the Q-learning algorithm in environments constrained by physical obstacles and hardware limitations.<list list-type="bullet">
<list-item>
<p>Experiment 7: To further test the adaptability of Q-learning, experiments were conducted using the Franka Emika robot to optimize object throwing into a basket. The robot learned through iterative trials, adjusting its joint parameters to minimize the distance between the landing point and the basket.</p>
</list-item>
</list>
</p>
<p>The learning process, illustrated in <xref ref-type="fig" rid="F21">Figure 21</xref>, demonstrates the robot&#x2019;s improved performance over time. The resulting trajectory of a successful throw is shown in <xref ref-type="fig" rid="F22">Figure 22</xref>. Remarkably, the algorithm required only five iterations to discover an effective solution using the Franka Emika platform.</p>
<fig id="F21" position="float">
<label>FIGURE 21</label>
<caption>
<p>Learning process using Q-learning for the throwing task using the Franka Emika Panda robot (five iterations).</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g021.tif">
<alt-text content-type="machine-generated">3D plot illustrating a Q-learning process with paths in different colors, such as purple and blue. Axes are labeled X, Y, and Z coordinates in meters. Points converge at the center, with a green starting area.</alt-text>
</graphic>
</fig>
<fig id="F22" position="float">
<label>FIGURE 22</label>
<caption>
<p>Trajectory of the solution for the throwing task found by Q-learning using the Franka Emika Panda robot.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g022.tif">
<alt-text content-type="machine-generated">A 3D line graph titled &#x22;Final trajectory by Q-learning&#x22; shows a trajectory in purple and pink lines from a green starting point at the bottom. The axes represent X, Y, and Z coordinates in meters, depicting the path learned through Q-learning.</alt-text>
</graphic>
</fig>
<p>Although Q-learning exhibits clear benefits in terms of robustness and rapid convergence, it is important to recognize its limitations in scenarios involving high-dimensional or continuous action spaces. In such cases, deep reinforcement learning methods such as DQNs are typically employed to extend Q-learning&#x2019;s capabilities (<xref ref-type="bibr" rid="B40">Sutton and Barto, 2018</xref>; <xref ref-type="bibr" rid="B44">Watkins, 1989</xref>).</p>
</sec>
</sec>
<sec id="s3-2">
<label>3.2</label>
<title>Throwing a ball using deep RL</title>
<sec id="s3-2-1">
<label>3.2.1</label>
<title>Compatibility with deep learning</title>
<p>Integration with deep neural networks through techniques such as DQNs expands the capabilities of Q-learning (<xref ref-type="bibr" rid="B30">Mnih et al., 2013</xref>; <xref ref-type="bibr" rid="B31">Mnih et al., 2015</xref>). This combination, often referred to as deep RL, enables Q-learning to handle high-dimensional input spaces, including images, thereby broadening its applicability across diverse domains (<xref ref-type="bibr" rid="B40">Sutton and Barto, 2018</xref>; <xref ref-type="bibr" rid="B44">Watkins, 1989</xref>).</p>
<p>DQN enhances conventional Q-learning by effectively managing complex and high-dimensional state spaces, which are difficult to represent using tabular methods (<xref ref-type="bibr" rid="B30">Mnih et al., 2013</xref>; <xref ref-type="bibr" rid="B31">Mnih et al., 2015</xref>). It is a powerful AI technique capable of learning hierarchical features directly from raw input data, eliminating the need for manual feature engineering (<xref ref-type="bibr" rid="B40">Sutton and Barto, 2018</xref>; <xref ref-type="bibr" rid="B44">Watkins, 1989</xref>).</p>
<p>Despite these advantages, DQNs present several challenges. As an extension of Q-learning, DQN approximates the Q-function using a deep neural network instead of a Q-table. The network takes the environment&#x2019;s state as input and outputs expected rewards for each possible action. It is trained by minimizing a loss function defined as the difference between predicted and target Q-values. However, DQN involves high computational complexity, requires careful hyperparameter tuning, and may experience instability during training. Additionally, its effectiveness depends on the specific problem characteristics (<xref ref-type="bibr" rid="B40">Sutton and Barto, 2018</xref>; <xref ref-type="bibr" rid="B44">Watkins, 1989</xref>).</p>
</sec>
<sec id="s3-2-2">
<label>3.2.2</label>
<title>Comparison between DQN and other RL algorithms</title>
<p>The same experiments were conducted using the standard DQN, and a comparison was made between SARSA, expected SARSA, and Q-learning for the task of throwing a ball into a basket using a two-arm robot manipulator. Upon comparison, DQN demonstrated superior performance over the other algorithms in terms of total average return, as shown in <xref ref-type="fig" rid="F23">Figure 23</xref>.</p>
<fig id="F23" position="float">
<label>FIGURE 23</label>
<caption>
<p>Comparison between DQN, Q-learning, expected SARSA, and SARSA in terms of TAR.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g023.tif">
<alt-text content-type="machine-generated">Line graph titled &#x22;Returns of Different RL algorithms,&#x22; showing the performance of four algorithms over 100 episodes. The y-axis represents returns in millions, and the x-axis represents episodes. Normal DQN (blue) shows the highest returns, peaking around 1.4 million. Q-Learning (orange) maintains steady growth, reaching about 0.7 million. Expected Sarsa (green) plateaus near 0.6 million, while Sarsa (red) has the lowest returns, stabilizing below 0.2 million.</alt-text>
</graphic>
</fig>
</sec>
<sec id="s3-2-3">
<label>3.2.3</label>
<title>Comparison between different types of DQNs</title>
<p>When comparing different types of DQNs for a robot manipulator tasked with throwing balls, several key factors are considered. All types of DQNs succeed in the throwing task; however, DQNs with multi-head attention (DQN-MHA) outperform others in terms of total average return, as shown in <xref ref-type="fig" rid="F24">Figure 24</xref>.</p>
<fig id="F24" position="float">
<label>FIGURE 24</label>
<caption>
<p>Comparison between different types of DQN in terms of total average return for 100 episodes.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g024.tif">
<alt-text content-type="machine-generated">Line graph depicting returns of different DQNs over 100 episodes. Each colored line represents a different DQN type, with the legend indicating types like Normal DQN, PER-DQN, and DDQN. Returns increase with episodes, showing performance variability among DQN types.</alt-text>
</graphic>
</fig>
<p>The performance comparison between different DQNs is based on key performance indicators (KPIs) related to policy performance, learning speed, and learning accuracy.<list list-type="order">
<list-item>
<p>Total average return (TAR): this parameter provides an overall measure of the agent&#x2019;s performance by calculating the mean reward across multiple episodes.</p>
</list-item>
<list-item>
<p>Standard deviation (SD): this parameter measures the variability in the reward curve, indicating the consistency of the agent&#x2019;s performance:<list list-type="bullet">
<list-item>
<p>Lower SD values indicate more consistent rewards, implying stable agent performance.</p>
</list-item>
<list-item>
<p>Higher SD values suggest greater variability in rewards, generally indicating instability or inconsistency in performance.</p>
</list-item>
</list>
</p>
</list-item>
<list-item>
<p>Learning speed: this parameter indicates how quickly the agent improves its performance, how rapidly it converges to an optimal or near-optimal policy, and how effectively it balances exploration and exploitation.</p>
</list-item>
<list-item>
<p>Trend slope (TS) of the reward: this parameter reflects the general direction of the agent&#x2019;s performance over time:<list list-type="bullet">
<list-item>
<p>Positive TS values indicate increasing rewards, suggesting that the agent is learning and improving, which is desirable.</p>
</list-item>
<list-item>
<p>Negative TS values indicate decreasing rewards, implying deterioration in performance, which is generally undesirable.</p>
</list-item>
<list-item>
<p>Zero or near-zero TS indicates stable rewards over time, which may indicate a learning plateau.</p>
</list-item>
</list>
</p>
</list-item>
<list-item>
<p>Mean loss: this parameter measures average error; lower values indicate better model performance accuracy.</p>
</list-item>
</list>
</p>
<p>Based on these KPIs, performance improves as the TAR increases. As shown in <xref ref-type="fig" rid="F24">Figure 24</xref>, DQN-MHA achieves the highest rewards (TAR &#x3d; <inline-formula id="inf200">
<mml:math id="m226">
<mml:mrow>
<mml:mn>415,505</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>), while the standard DQN has the lowest performance (TAR &#x3d; <inline-formula id="inf201">
<mml:math id="m227">
<mml:mrow>
<mml:mn>100,147</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>). Regarding SD and TS, algorithms with lower SD and higher TS are considered superior. As presented in <xref ref-type="table" rid="T6">Table 6</xref>, DQN-MHA and PER-DDQN-SA outperform other variants in terms of TS. Conversely, standard DQN and DQN-N exhibit the best performance concerning SD. Other DQN types demonstrate intermediate results across KPIs, neither excelling nor significantly underperforming. While they do not lead in all metrics, they maintain competitive performance compared to other methods.</p>
<table-wrap id="T6" position="float">
<label>TABLE 6</label>
<caption>
<p>Comparison between different DQNs. The first column lists the considered DQNs. The second column reports the standard deviation of the return, the third column shows the trend slope of the return during training, and the final column indicates the learning speed through the number of episodes required to reach 75%, 90%, and 95% of the final return.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th align="center">DQN type</th>
<th align="center">SD <inline-formula id="inf202">
<mml:math id="m228">
<mml:mrow>
<mml:mo stretchy="false">[</mml:mo>
<mml:mrow>
<mml:mn>1</mml:mn>
<mml:msup>
<mml:mrow>
<mml:mn>0</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mn>5</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
<mml:mo stretchy="false">]</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>
</th>
<th align="center">TS <inline-formula id="inf203">
<mml:math id="m229">
<mml:mrow>
<mml:mo stretchy="false">[</mml:mo>
<mml:mrow>
<mml:mn>1</mml:mn>
<mml:msup>
<mml:mrow>
<mml:mn>0</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mn>4</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
<mml:mo stretchy="false">]</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>
</th>
<th align="center">75%</th>
<th align="center">90%</th>
<th align="center">95%</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="center">DQN-MHA</td>
<td align="center">2.25</td>
<td align="center">0.766</td>
<td align="center">86</td>
<td align="center">95</td>
<td align="center">98</td>
</tr>
<tr>
<td align="center">DQN-SA</td>
<td align="center">1.435</td>
<td align="center">0.4625</td>
<td align="center">84</td>
<td align="center">94</td>
<td align="center">97</td>
</tr>
<tr>
<td align="center">DQN-N</td>
<td align="center">0.793</td>
<td align="center">0.288</td>
<td align="center">79</td>
<td align="center">92</td>
<td align="center">96</td>
</tr>
<tr>
<td align="center">PER-DDQN-SA</td>
<td align="center">
<inline-formula id="inf204">
<mml:math id="m230">
<mml:mrow>
<mml:mn>2.126</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">0.733</td>
<td align="center">86</td>
<td align="center">95</td>
<td align="center">98</td>
</tr>
<tr>
<td align="center">DDQN-SA</td>
<td align="center">
<inline-formula id="inf205">
<mml:math id="m231">
<mml:mrow>
<mml:mn>1.6</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">0.546</td>
<td align="center">85</td>
<td align="center">95</td>
<td align="center">98</td>
</tr>
<tr>
<td align="center">DDQN-N</td>
<td align="center">1.745</td>
<td align="center">0.595</td>
<td align="center">88</td>
<td align="center">96</td>
<td align="center">98</td>
</tr>
<tr>
<td align="center">DDQN</td>
<td align="center">1.727</td>
<td align="center">0.572</td>
<td align="center">91</td>
<td align="center">97</td>
<td align="center">99</td>
</tr>
<tr>
<td align="center">PER-DDQN</td>
<td align="center">1.973</td>
<td align="center">0.636</td>
<td align="center">84</td>
<td align="center">94</td>
<td align="center">97</td>
</tr>
<tr>
<td align="center">PER-DQN</td>
<td align="center">1.883</td>
<td align="center">0.647</td>
<td align="center">89</td>
<td align="center">96</td>
<td align="center">98</td>
</tr>
<tr>
<td align="center">Standard-DQN</td>
<td align="center">0.664</td>
<td align="center">0.227</td>
<td align="center">89</td>
<td align="center">97</td>
<td align="center">99</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>Another crucial metric is learning speed, which indicates how rapidly an agent improves its performance during training. It is typically measured by the rate at which cumulative reward or average reward per episode increases over time. Common measurements include the number of episodes needed to reach <inline-formula id="inf206">
<mml:math id="m232">
<mml:mrow>
<mml:mn>75</mml:mn>
<mml:mi>%</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>, <inline-formula id="inf207">
<mml:math id="m233">
<mml:mrow>
<mml:mn>90</mml:mn>
<mml:mi>%</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>, and <inline-formula id="inf208">
<mml:math id="m234">
<mml:mrow>
<mml:mn>95</mml:mn>
<mml:mi>%</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> of the total reward. Learning speed generally depends on factors such as the neural network architecture, the quality of the training data, and the effectiveness of the exploration&#x2013;exploitation strategy (<xref ref-type="bibr" rid="B24">Li, 2023</xref>; <xref ref-type="bibr" rid="B22">Lapan, 2018</xref>). The results from the previous experiment are summarized in <xref ref-type="table" rid="T6">Table 6</xref>. Based on the mean loss KPI, the results demonstrate a significant reduction in mean loss from the standard DQN (242.2) to the enhanced variants. DDQN-based models demonstrate significantly lower losses, with DDQN-N achieving the lowest among standard variants (0.26). PER-enhanced methods further improve performance by several orders of magnitude, with PER-DQN reaching as low as <inline-formula id="inf209">
<mml:math id="m235">
<mml:mrow>
<mml:mn>7.367</mml:mn>
<mml:mo>&#xd7;</mml:mo>
<mml:mn>1</mml:mn>
<mml:msup>
<mml:mrow>
<mml:mn>0</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>12</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:math>
</inline-formula>, indicating more stability and learning efficiency, as summarized in <xref ref-type="table" rid="T7">Table 7</xref>.</p>
<table-wrap id="T7" position="float">
<label>TABLE 7</label>
<caption>
<p>Mean loss values for different DQNs. The mean is computed as <inline-formula id="inf210">
<mml:math id="m236">
<mml:mrow>
<mml:mi>&#x3bc;</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
</mml:mfrac>
<mml:msubsup>
<mml:mrow>
<mml:mo>&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:msub>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th align="left">Algorithm</th>
<th align="center">Mean loss<inline-formula id="inf211">
<mml:math id="m237">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>&#x3bc;</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>
</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="left">DQN</td>
<td align="center">242.2</td>
</tr>
<tr>
<td align="left">DQN-MHA</td>
<td align="center">211.05</td>
</tr>
<tr>
<td align="left">DQN-N</td>
<td align="center">142</td>
</tr>
<tr>
<td align="left">DQN-SA</td>
<td align="center">104.36</td>
</tr>
<tr>
<td align="left">DDQN</td>
<td align="center">6.6</td>
</tr>
<tr>
<td align="left">DDQN-SA</td>
<td align="center">0.34</td>
</tr>
<tr>
<td align="left">DDQN-N</td>
<td align="center">0.26</td>
</tr>
<tr>
<td align="left">PER-DQN</td>
<td align="center">
<inline-formula id="inf212">
<mml:math id="m238">
<mml:mrow>
<mml:mn>7.367</mml:mn>
<mml:mo>&#xd7;</mml:mo>
<mml:mn>1</mml:mn>
<mml:msup>
<mml:mrow>
<mml:mn>0</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>12</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
</tr>
<tr>
<td align="left">PER-DDQN</td>
<td align="center">
<inline-formula id="inf213">
<mml:math id="m239">
<mml:mrow>
<mml:mn>7.5458230</mml:mn>
<mml:mo>&#xd7;</mml:mo>
<mml:mn>1</mml:mn>
<mml:msup>
<mml:mrow>
<mml:mn>0</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>8</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
</tr>
<tr>
<td align="left">PER-DDQN-SA</td>
<td align="center">
<inline-formula id="inf214">
<mml:math id="m240">
<mml:mrow>
<mml:mn>1.22712</mml:mn>
<mml:mo>&#xd7;</mml:mo>
<mml:mn>1</mml:mn>
<mml:msup>
<mml:mrow>
<mml:mn>0</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>10</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>Based on these results, DQN-N emerges as the best-performing algorithm. By injecting noise into network parameters, DQN-N enhances exploration by introducing stochasticity in action selection. This enables the agent to explore a broader range of actions and states more effectively, accelerating the discovery of optimal policies. Additionally, DQN-N reduces dependence on manually tuned parameters such as <inline-formula id="inf215">
<mml:math id="m241">
<mml:mrow>
<mml:mi>&#x3f5;</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>, leading to more stable and consistent learning. By balancing exploration and exploitation while minimizing hyperparameter tuning, DQN-N achieves superior learning speed, making it a powerful alternative among DQN variants (<xref ref-type="bibr" rid="B24">Li, 2023</xref>; <xref ref-type="bibr" rid="B22">Lapan, 2018</xref>).</p>
</sec>
<sec id="s3-2-4">
<label>3.2.4</label>
<title>Throwing an object to an unknown position of the basket using DQNs with and without an external constraint</title>
<p>To evaluate the robustness of various DQN algorithms in uncertain conditions, two experiments were conducted. In both cases, DQNs were trained to throw a ball into a basket located 0.6 m away from the robot manipulator. Their performance was then tested without retraining when the basket was moved to a new location, 0.8 m away from the robot. The first experiment was performed without any obstacles, while the second included a wall obstructing the throw, as illustrated in <xref ref-type="fig" rid="F25">Figures 25</xref>, <xref ref-type="fig" rid="F26">26</xref>. Each algorithm was tested over 100 trials using the same robot manipulator. The training settings (hyperparameters, the activation function, and optimizer) were consistent across all DQNs and are listed below:<list list-type="bullet">
<list-item>
<p>
<monospace>Learning rate</monospace> &#x3d; 0.001</p>
</list-item>
<list-item>
<p>
<monospace>Network layers</monospace> &#x3d; 12</p>
</list-item>
<list-item>
<p>
<monospace>Episodes</monospace> &#x3d; 100</p>
</list-item>
<list-item>
<p>
<monospace>Neurons for each layer</monospace> &#x3d; 512</p>
</list-item>
<list-item>
<p>
<monospace>Epoch</monospace> &#x3d; 500</p>
</list-item>
<list-item>
<p>
<monospace>Activation function</monospace> &#x3d; ReLU</p>
</list-item>
<list-item>
<p>
<monospace>Optimizer</monospace> &#x3d; Adam</p>
</list-item>
</list>
</p>
<fig id="F25" position="float">
<label>FIGURE 25</label>
<caption>
<p>Throwing task using the DQN without a wall.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g025.tif">
<alt-text content-type="machine-generated">Graph depicting the throw trajectory of a robot arm. The X-axis represents coordinates in meters from negative one to zero, and the Y-axis ranges from negative point one to point five meters. The trajectory is shown as a pink dashed line arcing upward, with bright green and black markers indicating the start and end points, respectively, and a vertical red line extending downward from the start point. The legend labels the trajectory as &#x201C;Throw trajectory.&#x201D;</alt-text>
</graphic>
</fig>
<fig id="F26" position="float">
<label>FIGURE 26</label>
<caption>
<p>Throwing task using the DQN with a wall.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g026.tif">
<alt-text content-type="machine-generated">Graph titled &#x22;Robot Arm&#x22; showing a throw trajectory as a magenta dashed line from a green circle at (-0.8, 0) to a black circle at (0, 0). A red line highlights a point of maximum height at (-0.6, 0.3). X and Y coordinates are in meters.</alt-text>
</graphic>
</fig>
<p>The performance results are summarized in <xref ref-type="table" rid="T8">Table 8</xref>, showing the number of successful throws into the relocated basket with and without the wall for each DQN variant.</p>
<table-wrap id="T8" position="float">
<label>TABLE 8</label>
<caption>
<p>Comparison between different DQNs (task performance). The first column lists the considered DQNs. The second column shows the number of attempts required to successfully throw the ball to a new target location without a wall. The third column presents the number of attempts needed when a wall is introduced as an obstacle.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th align="center">DQN type</th>
<th align="center">No boundaries</th>
<th align="center">With boundaries</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="center">DQN-MHA</td>
<td align="center">18</td>
<td align="center">35</td>
</tr>
<tr>
<td align="center">DQN-SA</td>
<td align="center">23</td>
<td align="center">39</td>
</tr>
<tr>
<td align="center">DQN-N</td>
<td align="center">25</td>
<td align="center">52</td>
</tr>
<tr>
<td align="center">DDQN</td>
<td align="center">25</td>
<td align="center">53</td>
</tr>
<tr>
<td align="center">PER-DQN</td>
<td align="center">24</td>
<td align="center">45</td>
</tr>
<tr>
<td align="center">DDQN-N</td>
<td align="center">26</td>
<td align="center">55</td>
</tr>
<tr>
<td align="center">PER-DDQN</td>
<td align="center">24</td>
<td align="center">45</td>
</tr>
<tr>
<td align="center">PER-DDQN-SA</td>
<td align="center">21</td>
<td align="center">39</td>
</tr>
<tr>
<td align="center">DDQN-SA</td>
<td align="center">23</td>
<td align="center">49</td>
</tr>
<tr>
<td align="center">Standard-DQN</td>
<td align="center">31</td>
<td align="center">68</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>The results indicate that DQN-MHA demonstrated the best overall performance in both scenarios. This suggests that the multi-head attention mechanism significantly enhances the network&#x2019;s ability to focus on important environmental features. This attention-driven adaptability enables DQN-MHA to outperform other variants by achieving higher precision in altered environments, particularly when obstacles are introduced.</p>
</sec>
</sec>
</sec>
<sec sec-type="discussion" id="s4">
<label>4</label>
<title>Discussion</title>
<sec id="s4-1">
<label>4.1</label>
<title>Results and discussion</title>
<p>The experiments were repeated using the best-performing configuration for each algorithm, with hyperparameters tuned individually. To ensure optimal performance of each algorithm, we employed Optuna, a modern open-source framework for automated hyperparameter optimization that enables efficient exploration of the hyperparameter space and is recognized as one of the most effective tools for this purpose. Specifically, we utilized Bayesian optimization via the tree-structured Parzen estimator (TPE), a variant of sequential model-based optimization (SMBO), to guide the search process. To enhance robustness and mitigate overfitting, cross-validation was integrated into the optimization pipeline. The final configurations, summarized in <xref ref-type="table" rid="T10">Table 10</xref>, correspond to the best-performing hyperparameter sets identified by Optuna for each algorithm, as shown in <xref ref-type="table" rid="T9">Table 9</xref>.</p>
<table-wrap id="T9" position="float">
<label>TABLE 9</label>
<caption>
<p>Hyperparameter settings for DQN variants in reinforcement learning experiments. Optimized hyperparameters are used for each algorithm. The learning rate <inline-formula id="inf223">
<mml:math id="m249">
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> is shown in the column labeled <inline-formula id="inf224">
<mml:math id="m250">
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
<mml:mspace width="0.3333em"/>
<mml:mrow>
<mml:mo stretchy="false">[</mml:mo>
<mml:mrow>
<mml:mn>1</mml:mn>
<mml:msup>
<mml:mrow>
<mml:mn>0</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>3</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
<mml:mo stretchy="false">]</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula>. The number of hidden layers is specified in the column <inline-formula id="inf225">
<mml:math id="m251">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>, while <inline-formula id="inf226">
<mml:math id="m252">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">neuron</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula> denotes the number of neurons per layer. The activation function and optimizer are the same across all DQNs. The same number of neurons was used across all layers within a given model.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th align="center">DQN type</th>
<th align="center">
<inline-formula id="inf227">
<mml:math id="m253">
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>(<inline-formula id="inf228">
<mml:math id="m254">
<mml:mrow>
<mml:mn>1</mml:mn>
<mml:msup>
<mml:mrow>
<mml:mn>0</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
</mml:mrow>
</mml:msup>
<mml:mn>3</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>)</th>
<th align="center">
<inline-formula id="inf229">
<mml:math id="m255">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>
</th>
<th align="center">
<inline-formula id="inf230">
<mml:math id="m256">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="italic">neuron</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>
</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="center">DQN-MHA</td>
<td align="center">10</td>
<td align="center">256</td>
<td align="center">2024</td>
</tr>
<tr>
<td align="center">DQN-SA</td>
<td align="center">10</td>
<td align="center">128</td>
<td align="center">1024</td>
</tr>
<tr>
<td align="center">DQN-N</td>
<td align="center">0.3</td>
<td align="center">8</td>
<td align="center">256</td>
</tr>
<tr>
<td align="center">DDQN</td>
<td align="center">0.1</td>
<td align="center">8</td>
<td align="center">512</td>
</tr>
<tr>
<td align="center">PER-DQN</td>
<td align="center">0.5</td>
<td align="center">10</td>
<td align="center">512</td>
</tr>
<tr>
<td align="center">DDQN-N</td>
<td align="center">0.5</td>
<td align="center">8</td>
<td align="center">256</td>
</tr>
<tr>
<td align="center">PER-DDQN</td>
<td align="center">0.5</td>
<td align="center">8</td>
<td align="center">256</td>
</tr>
<tr>
<td align="center">PER-DDQN-SA</td>
<td align="center">1</td>
<td align="center">12</td>
<td align="center">512</td>
</tr>
<tr>
<td align="center">DDQN-SA</td>
<td align="center">5</td>
<td align="center">12</td>
<td align="center">512</td>
</tr>
<tr>
<td align="center">Standard-DQN</td>
<td align="center">0.1</td>
<td align="center">12</td>
<td align="center">512</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>All algorithms were optimized with the same procedure (Optuna with Bayesian TPE, equal trial budgets, identical metrics, and cross-validation). Search spaces were adapted to each algorithm since DRL methods differ in terms of stability, sensitivity, and capacity requirements; for instance, attention-based variants often require deeper networks, while vanilla DQN is more susceptible to high learning rates as they cause Q-values to fluctuate excessively (each update potentially overwriting previous estimates), leading to divergence or oscillations in the Q-function. Imposing identical ranges would have biased results by forcing some methods into suboptimal regions rather than allowing them to explore the whole search space. Fairness was ensured by giving every algorithm equal opportunity to reach its best configuration within an appropriate search space, so the observed differences in hyperparameters in <xref ref-type="table" rid="T9">Table 9</xref> reflect intrinsic inductive biases rather than unequal treatment, as shown in <xref ref-type="table" rid="T9">Table 9</xref>.</p>
<p>
<xref ref-type="fig" rid="F27">Figure 27</xref> illustrates the performance of various DQN variants in terms of TAR, following individual tuning. The TAR metric evaluates the cumulative rewards collected across episodes during training, offering a quantitative measure of policy effectiveness. In robotic manipulation tasks, a higher TAR reflects the policy&#x2019;s ability to consistently execute precise and repeatable throwing trajectories.</p>
<fig id="F27" position="float">
<label>FIGURE 27</label>
<caption>
<p>Comparison between different types of DQNs in terms of total average return for 100 episodes after tuning.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g027.tif">
<alt-text content-type="machine-generated">Line chart showing the returns of various DQN types over 100 episodes. The y-axis represents returns and the x-axis shows episodes. Different colored lines represent DQN, DQN-N, DDQN, DQN-SA, DDQN-N, DQN-MHA, PER-DQN, PER-DDQN, DDQN-SA, and PER-DDQN-SA. PER-DQN achieves the highest returns.</alt-text>
</graphic>
</fig>
<p>Among the evaluated algorithms, <italic>DDQN-N</italic> achieved the highest TAR value of <inline-formula id="inf231">
<mml:math id="m257">
<mml:mrow>
<mml:mn>3,010,079</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>, surpassing even the performance of <italic>PER-DDQN-SA</italic>. The superior performance of <italic>DDQN-N</italic> can be attributed to the following factors:<list list-type="bullet">
<list-item>
<p>Stochastic policy exploration: The use of noisy weights in noisy DQN allows for adaptive exploration during training, enhancing the agent&#x2019;s ability to navigate the complex and high-dimensional reward landscape of the throwing task.</p>
</list-item>
<list-item>
<p>Robust value estimation: Double Q-learning mitigates overestimation bias by decoupling action selection and evaluation, resulting in more reliable Q-value estimates and fewer suboptimal decisions in environments with high variance.</p>
</list-item>
</list>
</p>
<p>The poor performance of the standard <italic>DQN</italic> <inline-formula id="inf232">
<mml:math id="m258">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mn>424,286</mml:mn>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> can be attributed to the following factors:<list list-type="bullet">
<list-item>
<p>Over-reliance on greedy policies: Standard DQN primarily follows greedy action selection, which limits exploration and prevents the agent from discovering better strategies.</p>
</list-item>
<list-item>
<p>Inadequate handling of reward sparsity: The throwing task often involves delayed and sparse rewards, requiring effective temporal credit assignment. Standard DQN struggles to propagate reward signals across long episodes, resulting in suboptimal learning.</p>
</list-item>
</list>
</p>
<p>Attention-based variants, such as <italic>DQN-MHA</italic> <inline-formula id="inf233">
<mml:math id="m259">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mn>937,760</mml:mn>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> and <italic>DQN-SA</italic> <inline-formula id="inf234">
<mml:math id="m260">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mn>743,742</mml:mn>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>, show moderate improvements in TAR. These architectures benefit from hierarchical representation learning, where attention mechanisms excel at identifying critical dependencies in throwing dynamics&#x2014;essential for accurate trajectory prediction. However, in the absence of other key enhancements&#x2014;such as double Q-learning to reduce overestimation or noisy networks to encourage better exploration&#x2014;their performance remains limited, with slower convergence and reduced robustness compared to more advanced variants.</p>
<p>The loss curve, or training curve, illustrates the temporal difference (TD) error during the learning process. This metric captures the discrepancy between the estimated value function and the actual return received from the environment. As shown in <xref ref-type="fig" rid="F28">Figures 28</xref>&#x2013;<xref ref-type="fig" rid="F32">32</xref>, the TD error provides insights into the convergence behavior and stability of different DQN variants during training.</p>
<fig id="F28" position="float">
<label>FIGURE 28</label>
<caption>
<p>Loss curves for all DQN architectures across training episodes, illustrating convergence behavior.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g028.tif">
<alt-text content-type="machine-generated">Line graph titled &#x22;Loss Curve during the Training&#x22; showing the loss over 100 episodes for various algorithms. Different lines represent DQN, DQN-N, DDQN, DQN-SA, DDQN-N, DQN-MHA, PER-DQN, PER-DDQN, DDQN-SA, and PER-DDQN-SA. Loss values start high and generally decrease, with varied stability and rates of reduction across algorithms.</alt-text>
</graphic>
</fig>
<fig id="F29" position="float">
<label>FIGURE 29</label>
<caption>
<p>Last 10 loss values for DQN, DQN-N, DQN-MHA, and DQN-SA architectures.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g029.tif">
<alt-text content-type="machine-generated">Line graph titled &#x22;Last 10 Loss Values for Different DQN Variants&#x22; shows loss values across 10 episodes for four variants: DQN (blue) remains steady around 236.7, DQN-N (orange) fluctuates between 48.81 and 65.66, DQN-SA (green) is stable around 93.4, and DQN-MHA (red) stays around 186.48.</alt-text>
</graphic>
</fig>
<fig id="F30" position="float">
<label>FIGURE 30</label>
<caption>
<p>Last 10 loss values for DDQN-SA and DDQN-N architectures.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g030.tif">
<alt-text content-type="machine-generated">Line graph showing the last ten loss values for DQN variants over episodes ninety-one to one hundred. The DDQN-N line fluctuates, starting at 0.44 and ending at 0.12. The DDQN-SA line remains flat at 0.34.</alt-text>
</graphic>
</fig>
<fig id="F31" position="float">
<label>FIGURE 31</label>
<caption>
<p>Last 10 loss values for PER-DDQN and DDQN architectures.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g031.tif">
<alt-text content-type="machine-generated">Line chart titled &#x22;Last 10 Loss Values for Different DQN Variants&#x22; shows loss values over the last 10 episodes. The blue line represents DDQN, starting at 0.00034 and ending at 0.00084. The orange line represents PER-DDQN, consistently around 0.01209 to 0.01184.</alt-text>
</graphic>
</fig>
<fig id="F32" position="float">
<label>FIGURE 32</label>
<caption>
<p>Last 10 loss values for PER-DQN and PER-DDQN-SA architectures.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g032.tif">
<alt-text content-type="machine-generated">Line graph showing the last 10 loss values for PER-DDQN and PER-DDQN-SA variants. The x-axis represents episodes, and the y-axis represents the loss. PER-DDQN values fluctuate, peaking at 6.3204, while PER-DDQN-SA values remain consistently low at 0.0737.</alt-text>
</graphic>
</fig>
<p>Among all evaluated algorithms, the standard <italic>DQN</italic> exhibited the poorest performance, with the highest loss value (236.67), indicating instability in the learning process. This poor performance is attributed to overestimation bias, a known limitation of standard DQN due to the absence of enhancements such as target networks with double estimation or structured noise. In contrast, advanced variants&#x2014;such as <italic>PER-DQN</italic>, <italic>PER-DDQN</italic>, and the self-attention-based <italic>PER-DDQN-SA</italic>&#x2014;achieved significantly lower loss values, with <italic>PER-DDQN-SA</italic> reaching the lowest at <inline-formula id="inf235">
<mml:math id="m261">
<mml:mrow>
<mml:mn>6.32</mml:mn>
<mml:mo>&#xd7;</mml:mo>
<mml:mn>1</mml:mn>
<mml:msup>
<mml:mrow>
<mml:mn>0</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>10</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:math>
</inline-formula>. These results can be explained by the improved training efficiency introduced by prioritized experience replay. Unlike standard DQN, which samples past transitions uniformly, PER prioritizes training on transitions with high temporal-difference error. This prioritization emphasizes informative yet rare events&#x2014;such as successful or failed throws&#x2014;that are critical in tasks such as robotic ball-throwing.</p>
<p>By sampling more frequently from these high-value experiences, PER guides the learning process toward more effective policy updates, especially in environments characterized by sparse rewards and high-dimensional state&#x2013;action spaces. Furthermore, the <italic>DDQN</italic> architecture addresses the overestimation bias by decoupling action selection from value estimation using two separate networks. When combined with structured exploration strategies such as noisy networks, <italic>DDQN-N</italic> demonstrated notable stability (0.1171), suggesting that guided stochastic exploration accelerates convergence in complex robotic control tasks.</p>
<p>As shown in <xref ref-type="table" rid="T10">Table 10</xref>, <italic>PER-DDQN</italic> and <italic>DDQN-N</italic> required the fewest number of trials to successfully throw the ball to a new location without hitting a wall. This highlights the algorithms&#x2019; superior ability to generalize the task dynamics. The use of prioritized experience replay enables more efficient learning from informative transitions, while the incorporation of double Q-learning mitigates overestimation bias during value updates. Moreover, the inclusion of noisy weights in the DQN-N variants further improves the exploration&#x2013;exploitation trade-off by enabling more structured and adaptive exploration, outperforming algorithms that rely on fixed or simplistic exploration strategies.</p>
<table-wrap id="T10" position="float">
<label>TABLE 10</label>
<caption>
<p>Comparison between different DQNs after hyperparameter optimization. The first column lists the considered DQNs. The second column shows the number of attempts required to reach a new target without a wall, while the third column shows the number of attempts required with a wall in place.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th align="center">DQN type</th>
<th align="center">No boundaries</th>
<th align="center">With boundaries</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="center">DQN-MHA</td>
<td align="center">16</td>
<td align="center">30</td>
</tr>
<tr>
<td align="center">DQN-SA</td>
<td align="center">21</td>
<td align="center">35</td>
</tr>
<tr>
<td align="center">DQN-N</td>
<td align="center">16</td>
<td align="center">29</td>
</tr>
<tr>
<td align="center">DDQN</td>
<td align="center">15</td>
<td align="center">29</td>
</tr>
<tr>
<td align="center">PER-DQN</td>
<td align="center">16</td>
<td align="center">35</td>
</tr>
<tr>
<td align="center">DDQN-N</td>
<td align="center">12</td>
<td align="center">27</td>
</tr>
<tr>
<td align="center">PER-DDQN</td>
<td align="center">12</td>
<td align="center">28</td>
</tr>
<tr>
<td align="center">PER-DDQN-SA</td>
<td align="center">20</td>
<td align="center">37</td>
</tr>
<tr>
<td align="center">DDQN-SA</td>
<td align="center">20</td>
<td align="center">46</td>
</tr>
<tr>
<td align="center">Standard-DQN</td>
<td align="center">29</td>
<td align="center">61</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>In contrast, standard <italic>DQN</italic> consistently demonstrated poor performance across multiple metrics, including high loss, low TAR, and inefficient policy convergence. These shortcomings are primarily due to its reliance on basic epsilon-greedy exploration, which often results in overfitting and suboptimal Q-value estimation. Notably, DQN variants with attention mechanisms achieved higher trial efficiency compared to their non-attention counterparts. In particular, <italic>DDQN-SA</italic> benefited from the ability to better reason about complex dependencies, such as the relationship between ball trajectories and basket locations, leading to more effective decision-making during task execution.</p>
<p>The combined techniques with standard DQN, such as double networks, prioritized experience replay, noisy networks, and self-attention, show better convergence, higher TAR, and greater trial efficiency. These findings reflect the importance of many structured exploration and reasoning mechanisms in DRL for complex robotic tasks such as throwing.</p>
</sec>
<sec id="s4-2">
<label>4.2</label>
<title>Robustness evaluation</title>
<p>To evaluate robustness to sensor noise and joint constraints, we choose two architectures: DQN as a baseline architecture and DDQN-N as an architecture with superior performance.</p>
<sec id="s4-2-1">
<label>4.2.1</label>
<title>Testing sensitivity to sensor noise</title>
<p>To evaluate the robustness of the trained DQN and DQN-N policies under sensor noise, we introduced zero-mean Gaussian noise to the input observations during testing&#x2014;specifically to the joint positions and the computed throwing angle. The noise was applied with standard deviations of 0.01, 0.05, and 0.1, as suggested.</p>
<p>The performance under these noise levels is illustrated in <xref ref-type="fig" rid="F33">Figures 33</xref>, <xref ref-type="fig" rid="F34">34</xref> for DQN and <xref ref-type="fig" rid="F35">Figures 35</xref>, <xref ref-type="fig" rid="F36">36</xref> for DDQN-N, which show that all three policies maintain similar TAR and loss curve behavior across noise levels. However, differences become apparent when examining the number of attempts required to complete the task.</p>
<fig id="F33" position="float">
<label>FIGURE 33</label>
<caption>
<p>Comparison of the total average return for the DQN architecture under different levels of sensor noise.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g033.tif">
<alt-text content-type="machine-generated">Line graph showing returns of DQN under sensor noise across episodes. Three lines represent different noise levels: blue circles for SD&#x3d;0.1, orange squares for SD&#x3d;0.05, and green triangles for SD&#x3d;0.01. Returns increase with episodes, with the green line consistently achieving the highest returns, followed by orange, then blue.</alt-text>
</graphic>
</fig>
<fig id="F34" position="float">
<label>FIGURE 34</label>
<caption>
<p>Loss curves for the DQN under different levels of sensor noise.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g034.tif">
<alt-text content-type="machine-generated">Line graph titled &#x22;DQN Loss with sensor noise over time,&#x22; showing loss on the y-axis and episodes on the x-axis. Three lines represent different noise levels: blue for SD&#x3d;0.1, orange for SD&#x3d;0.05, and green for SD&#x3d;0.01. All lines show a sharp initial loss drop, stabilizing near zero from episode 5 onwards.</alt-text>
</graphic>
</fig>
<fig id="F35" position="float">
<label>FIGURE 35</label>
<caption>
<p>Comparison between DDQN-N for different levels of sensor noise in terms of the total average return.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g035.tif">
<alt-text content-type="machine-generated">Line graph showing the returns of DDQN-N under sensor noise across 100 episodes. Three lines represent different sensor noise standard deviations: 0.1 (blue circles), 0.05 (orange squares), and 0.01 (green triangles). Returns increase over episodes, with lower noise achieving higher returns.</alt-text>
</graphic>
</fig>
<fig id="F36" position="float">
<label>FIGURE 36</label>
<caption>
<p>Loss curves for DDQN-N under sensor noise.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g036.tif">
<alt-text content-type="machine-generated">Line graph titled &#x22;DDQN-N Loss with sensor noise over time&#x22; showing loss versus episodes. It includes three lines representing sensor noise standard deviations: 0.1 (blue circles), 0.05 (orange squares), and 0.01 (green triangles). The loss decreases rapidly and stabilizes across episodes.</alt-text>
</graphic>
</fig>
<p>For this evaluation, we conducted 100 tasks for each DQN architecture. In each task, the planar robot arm started from a different initial position and attempted to throw an object toward a new target. The number of attempts required before a successful throw was recorded and plotted as a histogram, shown in <xref ref-type="fig" rid="F37">Figures 37</xref>, <xref ref-type="fig" rid="F38">38</xref> for DQN and DDQN-N, respectively. <xref ref-type="table" rid="T11">Table 11</xref> summarizes the results for DQN and DDQN-N. The pairwise comparison results show that both the DQN and DDQN-N algorithms are sensitive to increases in sensor noise, particularly when comparing high noise levels (SD &#x3d; 0.10) with lower levels (SD &#x3d; 0.05 and SD &#x3d; 0.01). For DQN, these differences are statistically significant with medium effect sizes, indicating a clear degradation in performance as noise increases, as shown in <xref ref-type="table" rid="T12">Table 12</xref>. In contrast, DDQN-N also shows significant differences under the same comparisons, but with smaller effect sizes, indicating greater robustness to noise perturbations. Comparisons between SD &#x3d; 0.05 and SD &#x3d; 0.01 are not significant for either algorithm, implying that performance remains stable at lower noise levels. Overall, DQN is more strongly impacted by noise, whereas DDQN-N exhibits greater resilience, though it still exhibits measurable performance degradation under high-noise conditions, as shown in <xref ref-type="table" rid="T13">Table 13</xref>.</p>
<fig id="F37" position="float">
<label>FIGURE 37</label>
<caption>
<p>Histogram of attempts needed to successfully throw using DQN under sensor noise. In each episode (out of 100 in total), the robot has different initial positions.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g037.tif">
<alt-text content-type="machine-generated">Three histograms display Standard DQN trials with varying sensor noise. Top: Noise SD 0.1, highest percentage at zero trials. Middle: Noise SD 0.05, similar pattern with peaks at zero and minimal trials. Bottom: Noise SD 0.01, highest concentration at zero trials, with gradual drop-off. Each graph shows the percentage of trials per number of trials.</alt-text>
</graphic>
</fig>
<fig id="F38" position="float">
<label>FIGURE 38</label>
<caption>
<p>Histogram of attempts needed to throw using the DDQN-N under sensor noise. In each episode (out of 100 in total), the robot has different initial positions.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g038.tif">
<alt-text content-type="machine-generated">Three histograms display percentage distributions of trials for DDQN-N with different sensor noise: SD 0.1 shows a peak at 0 trials with 35%; SD 0.05 peaks at 0 trials with 51%; SD 0.01 peaks at 0 trials with 42%.</alt-text>
</graphic>
</fig>
<p>From these results, two key observations can be made:<list list-type="bullet">
<list-item>
<p>Impact of noise level: All architectures performed better with lower noise levels. As sensor noise increased, a higher proportion of throws required more attempts.</p>
</list-item>
<list-item>
<p>Comparison between DQN and DDQN-N: DDQN-N showed improved resilience to noise. For instance, under the highest noise level (with a standard deviation of 0.1), only 8% of the throws with DDQN-N required more than 40 attempts, compared to 20% for the baseline DQN.</p>
</list-item>
</list>
</p>
<p>These results indicate that DDQN-N exhibits greater robustness to input noise. We attribute this to the architectural differences: standard DQN learns a deterministic state&#x2013;action mapping via the Q-function, which makes it more susceptible to perturbations in the input. In contrast, DDQN-N integrates mechanisms that enable it to better generalize over noisy observations.</p>
</sec>
<sec id="s4-2-2">
<label>4.2.2</label>
<title>Testing sensitivity to joint constraints</title>
<p>To evaluate the impact of joint constraints on throwing task performance, we considered a two-link planar robot and imposed the following constraints:<list list-type="bullet">
<list-item>
<p>The angles of both joints are limited to move within the range<inline-formula id="inf280">
<mml:math id="m306">
<mml:mrow>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:mn>0</mml:mn>
<mml:mo>,</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mi>&#x3c0;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>6</mml:mn>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:math>
</inline-formula>.</p>
</list-item>
<list-item>
<p>The angles of both joints are limited to move within the range<inline-formula id="inf281">
<mml:math id="m307">
<mml:mrow>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mi>&#x3c0;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>6</mml:mn>
</mml:mrow>
</mml:mfrac>
<mml:mo>,</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mi>&#x3c0;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>3</mml:mn>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:math>
</inline-formula>.</p>
</list-item>
<list-item>
<p>The angles of both joints are limited to move within the range<inline-formula id="inf282">
<mml:math id="m308">
<mml:mrow>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mi>&#x3c0;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>3</mml:mn>
</mml:mrow>
</mml:mfrac>
<mml:mo>,</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mi>&#x3c0;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:math>
</inline-formula>.</p>
</list-item>
</list>
</p>
<p>We again employed DQN and DQN-N architectures and compared their performance.</p>
<p>We could observe the following:<list list-type="bullet">
<list-item>
<p>The range of the joint constraint highly impacts the robot&#x2019;s performance. For example, in the case of the first range, neither DQN nor DDQN-N could find the solution and the task has consistently failed. On the other hand, for the other two ranges, both DQN and DDQN-N were able to successfully learn the task.</p>
</list-item>
<list-item>
<p>For successful ranges, the evolution of the total average return (<xref ref-type="fig" rid="F39">Figures 39</xref>, <xref ref-type="fig" rid="F40">40</xref>) and the loss curves (<xref ref-type="fig" rid="F41">Figures 41</xref>, <xref ref-type="fig" rid="F42">42</xref>) were similar across all architectures. However, there was a notable difference in the loss curve value: for DQN, it exhibited high values (above 311), indicating slower convergence and greater variance in Q-value estimates, whereas for DDQN-N, it converged to 0.</p>
</list-item>
<list-item>
<p>When it comes to the number of attempts needed to successfully throw the ball, both architectures had a relatively high and consistent performance (see <xref ref-type="fig" rid="F43">Figures 43</xref>, <xref ref-type="fig" rid="F44">44</xref>). However, DDQN-N had no throws where the number of attempts was greater than 50.</p>
</list-item>
</list>
</p>
<fig id="F39" position="float">
<label>FIGURE 39</label>
<caption>
<p>Comparison between DQN for two different joint constraints in terms of the total average return.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g039.tif">
<alt-text content-type="machine-generated">Line graph titled &#x22;Returns of Standard DQN under joints constraints&#x22; shows episodes on the x-axis and returns on the y-axis up to 35000. Two lines compare standard DQN with joint constraints: blue circles for \([\pi/6, \pi/3]\) and orange squares for \([\pi/3, \pi/2]\). Both lines ascend, with blue performing better overall.</alt-text>
</graphic>
</fig>
<fig id="F40" position="float">
<label>FIGURE 40</label>
<caption>
<p>Comparison between DDQN-N for two different ranges of the joint constraints in terms of the total average return.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g040.tif">
<alt-text content-type="machine-generated">Line graph titled &#x22;Returns of DDQN-N under joints constraints&#x22; shows two series. The blue line with circles represents [&#x3C0;/6, &#x3C0;/3] constraints; the orange line with squares represents [&#x3C0;/3, &#x3C0;/2] constraints. Both lines depict returns over 100 episodes, with values ranging from 0 to over 100,000. The orange line performs better initially but both converge near the end.</alt-text>
</graphic>
</fig>
<fig id="F41" position="float">
<label>FIGURE 41</label>
<caption>
<p>Loss curves for the DQN under joint constraints.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g041.tif">
<alt-text content-type="machine-generated">Line graph titled &#x22;Standard DQN Loss with joints constraints over time&#x22; with episodes on the x-axis and loss on the y-axis. Two lines represent different constraints: blue circles for [&#x3C0;/6, &#x3C0;/3] and orange squares for [&#x3C0;/3, &#x3C0;/2]. The loss initially fluctuates but quickly stabilizes around 300 for both constraints.</alt-text>
</graphic>
</fig>
<fig id="F42" position="float">
<label>FIGURE 42</label>
<caption>
<p>Loss curves for the DDQN-N under joint constraints.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g042.tif">
<alt-text content-type="machine-generated">Line graph titled &#x22;DDQN-N Loss with joints constraints over time&#x22; displays loss over episodes. Two data series are shown: blue circles for constraints \([\pi/6,\pi/3]\) and orange squares for \([\pi/3,\pi/2]\). Both series decrease and stabilize near zero.</alt-text>
</graphic>
</fig>
<fig id="F43" position="float">
<label>FIGURE 43</label>
<caption>
<p>Histogram of iterations needed to throw using the DQN under joint constraint.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g043.tif">
<alt-text content-type="machine-generated">Two histograms display the percentage distribution of trials in standard DQN with joint constraints. The top histogram, labeled \([&#x3C0;/6, &#x3C0;/3]\), shows the highest percentage at ten trials, with a peak at thirty-six percent. The bottom histogram, labeled \([&#x3C0;/3, &#x3C0;/2]\), also peaks around ten trials, reaching forty-five percent. Both histograms reveal a decreasing pattern as the number of trials increases.</alt-text>
</graphic>
</fig>
<fig id="F44" position="float">
<label>FIGURE 44</label>
<caption>
<p>Histogram of iterations needed to throw using the DDQN-N under joint constraint.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g044.tif">
<alt-text content-type="machine-generated">Two histograms display the percentage of trials for DDQN-N with different joint constraints. The top histogram shows a constraint of pi over six and pi over three, with most trials under twenty and a peak at forty-two percent at zero trials. The bottom histogram has a constraint of pi over three and pi over two, peaking at forty percent at zero trials, with most trials below twenty.</alt-text>
</graphic>
</fig>
<p>The joint range comparison highlights differing sensitivities between the DDQN-N and DQN algorithms. For DDQN-N, the performance difference between the 30&#xb0;&#x2013;60&#xb0; and 60&#xb0;&#x2013;90&#xb0; ranges is not statistically significant, with a very small effect size, indicating stable behavior across these ranges. In contrast, DQN shows a significant difference at the 95% confidence level, with a small-to-medium effect size, suggesting that its performance is more strongly influenced by joint range variations. These results suggest that DDQN-N demonstrates greater robustness to changes in joint range, while DQN is more susceptible to performance shifts under different configurations, as shown in <xref ref-type="table" rid="T15">Table 15</xref>.</p>
<p>In summary, DDQN-N showed faster reward convergence, lower loss, and overall more reliable performance than DQN, as shown in <xref ref-type="table" rid="T14">Table 14</xref>.</p>
</sec>
</sec>
<sec id="s4-3">
<label>4.3</label>
<title>Analysis of the time window</title>
<p>In this section, we examine how the sequence length influences the performance of the DQN-MHA architecture. In this context, the sequence length refers to the number of consecutive time steps provided as input to the self-attention mechanism for the assigned task. As this parameter directly influences how the model integrates past observations (previous knowledge) when estimating Q-values for the current state, it affects both short-term reactivity and long-term planning. The shorter sequences improve efficiency and reactivity over time but may fail in long-term tasks, and longer sequences enhance strategic foresight but require more computation and data.</p>
<p>To evaluate the impact of the sequence length on the performance of DQN-MHA, different values of the sequence length are used (<xref ref-type="bibr" rid="B4">Ba et al., 2016</xref>; <xref ref-type="bibr" rid="B8">Britt, 2020</xref>; <xref ref-type="bibr" rid="B16">Hausknecht and Stone, 2015</xref>; <xref ref-type="bibr" rid="B31">Mnih et al., 2015</xref>) as follows:<list list-type="bullet">
<list-item>
<p>Sequence length &#x3d; 4: With a very short context window, the DQN captures only the most recent states, enabling fast computation and reduced memory usage due to smaller attention matrices, resulting in fast training. However, it limits the modeling of delayed rewards, often resulting in short-sighted strategies in multi-step planning.</p>
</list-item>
<list-item>
<p>Sequence length &#x3d; 8: It has better performance than length 4 as it provides more historical context to DQN. On the other hand, it required greater computational and memory resources than length 4 and may still fail in tasks requiring long-term credit assignment.</p>
</list-item>
<list-item>
<p>Sequence lengths &#x3d; 16 and 32: It allows attention to operate over an extended history, enabling the capture of long-term dependencies and delayed rewards. However, it needs greater computational and memory resources for attention operations (<inline-formula id="inf311">
<mml:math id="m337">
<mml:mrow>
<mml:mi>O</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula> complexity) and carries a higher risk of overfitting in small or simple environments.</p>
</list-item>
</list>
</p>
<p>Regarding the TAR and loss curves (see <xref ref-type="fig" rid="F45">Figures 45</xref>, <xref ref-type="fig" rid="F46">46</xref>), all architectures show similar behavior with a slight improvement observed for DQN-MHA using a 32-time-step window, as shown in <xref ref-type="table" rid="T16">Table 16</xref>. However, the results in <xref ref-type="fig" rid="F47">Figure 47</xref> show that increasing the sequence length generally improves the efficiency of the DQN-MHA. When the sequence length increases from 4 to 8, the agent&#x2019;s average decreases from 17.51 to 16.01 and further to 15.08 with a sequence length of 16, showing gradual gains as more contextual information becomes available to the agent. The largest improvement occurred at 32 steps, where the average decreased sharply to 9.25 trials. This suggests that the assigned task benefits from long context, which helps model the delayed rewards for more consistent planning. Overall, increasing the sequence length in DQN-MHA improves performance, particularly when changing from medium to long context windows. However, this gain comes at the expense of higher computational and memory usage. The DQN-MHA results show no significant differences among shorter windows (TW &#x3d; 4, 8, and 16), with negligible effects. In contrast, TW &#x3d; 32 consistently outperforms the others, yielding significant improvements with medium effect sizes, as shown in <xref ref-type="table" rid="T17">Table 17</xref>.</p>
<fig id="F45" position="float">
<label>FIGURE 45</label>
<caption>
<p>Comparison between DQN-MHA for different sequence lengths in terms of the total average return.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g045.tif">
<alt-text content-type="machine-generated">Line graph showing returns of DQN-MHA with different sequence lengths over 100 episodes. Sequence lengths of 4, 8, 16, and 32 are represented by blue circles, orange squares, green triangles, and red crosses, respectively. Returns increase steadily, with longer sequences generally yielding higher returns.</alt-text>
</graphic>
</fig>
<fig id="F46" position="float">
<label>FIGURE 46</label>
<caption>
<p>Loss curves for DQN-MHA for different sequence lengths.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g046.tif">
<alt-text content-type="machine-generated">Line graph showing DQN-MHA loss over episodes with different sequence lengths. Loss on the y-axis and episodes on the x-axis. Sequence lengths are 4, 8, 16, and 32. The red line with sequence length 32 shows a steady decline, while others fluctuate before stabilizing around episode 40.</alt-text>
</graphic>
</fig>
<fig id="F47" position="float">
<label>FIGURE 47</label>
<caption>
<p>Histogram of iterations needed to throw using the DQN-MHA with different sequence lengths.</p>
</caption>
<graphic xlink:href="frobt-12-1567211-g047.tif">
<alt-text content-type="machine-generated">Four histograms showing the percentage of trials for DQN-MHA at different sequence lengths: 4, 8, 16, and 32. Each histogram displays the percentage distribution across various trial numbers, with noticeable peaks at lower trial numbers. Sequence length 4 shows higher concentration at the lowest trial number compared to other lengths. Sequence length 32 has the highest peak over 50 percent for the initial trial number, indicating most trials occurred there. Each subsequent increase in sequence length shows a shift towards slightly lower percentages at the start, with a tapering towards higher trial numbers.</alt-text>
</graphic>
</fig>
<p>To ensure statistical robustness, all reported results are based on N independent runs with different random seeds. In addition to mean values, we provide 90%, 95%, and 99% confidence intervals (<xref ref-type="table" rid="T11">Tables 11</xref>&#x2013;<xref ref-type="table" rid="T17">17</xref>), including the corresponding half-widths, which quantify the uncertainty associated with each estimate. Reporting confidence intervals across multiple levels offers information equivalent to formal significance testing while avoiding the pitfalls of assuming specific distributional forms, which are often violated in reinforcement learning outcomes. The observed performance differences, therefore, represent statistically meaningful improvements. Furthermore, the magnitude of gains (e.g., DQN-MHA achieving approximately 60% higher mean performance than DQN under comparable conditions) illustrates the practical significance of the results. Our choice of sample size follows established practice in the reinforcement learning literature, balancing computational feasibility with reliable estimation of performance variability.</p>
<table-wrap id="T11" position="float">
<label>TABLE 11</label>
<caption>
<p>Performance with 90%, 95%, and 99% confidence intervals of the number of trials across algorithms against sensor noise. <inline-formula id="inf236">
<mml:math id="m262">
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> denotes the half-width of the CI.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th rowspan="2" align="left">Algorithm</th>
<th colspan="2" align="center">90%</th>
<th colspan="2" align="center">95%</th>
<th colspan="2" align="center">99%</th>
</tr>
<tr>
<th align="center">Mean <inline-formula id="inf237">
<mml:math id="m263">
<mml:mrow>
<mml:mo>&#xb1;</mml:mo>
<mml:mspace width="0.3333em"/>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>
</th>
<th align="center">CI</th>
<th align="center">Mean <inline-formula id="inf238">
<mml:math id="m264">
<mml:mrow>
<mml:mo>&#xb1;</mml:mo>
<mml:mspace width="0.3333em"/>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>
</th>
<th align="center">CI</th>
<th align="center">Mean <inline-formula id="inf239">
<mml:math id="m265">
<mml:mrow>
<mml:mo>&#xb1;</mml:mo>
<mml:mspace width="0.3333em"/>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>
</th>
<th align="center">CI</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="left">DQN, SD &#x3d; 0.01</td>
<td align="center">
<inline-formula id="inf240">
<mml:math id="m266">
<mml:mrow>
<mml:mn>12.22</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>2.88</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(9.34, 15.1)</td>
<td align="center">
<inline-formula id="inf241">
<mml:math id="m267">
<mml:mrow>
<mml:mn>12.22</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>3.44</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(8.78, 15.66)</td>
<td align="center">
<inline-formula id="inf242">
<mml:math id="m268">
<mml:mrow>
<mml:mn>12.22</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>4.56</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(7.66, 16.78)</td>
</tr>
<tr>
<td align="left">DQN, SD &#x3d; 0.05</td>
<td align="center">
<inline-formula id="inf243">
<mml:math id="m269">
<mml:mrow>
<mml:mn>12.52</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>2.98</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(9.54, 15.5)</td>
<td align="center">
<inline-formula id="inf244">
<mml:math id="m270">
<mml:mrow>
<mml:mn>12.52</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>3.56</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(8.96, 16.08)</td>
<td align="center">
<inline-formula id="inf245">
<mml:math id="m271">
<mml:mrow>
<mml:mn>12.52</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>4.71</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(7.81, 17.23)</td>
</tr>
<tr>
<td align="left">DQN, SD &#x3d; 0.1</td>
<td align="center">
<inline-formula id="inf246">
<mml:math id="m272">
<mml:mrow>
<mml:mn>24.76</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>4.57</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(20.19, 29.33)</td>
<td align="center">
<inline-formula id="inf247">
<mml:math id="m273">
<mml:mrow>
<mml:mn>24.76</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>5.46</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(19.3, 30.22)</td>
<td align="center">
<inline-formula id="inf248">
<mml:math id="m274">
<mml:mrow>
<mml:mn>24.76</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>7.23</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(17.53, 31.99)</td>
</tr>
<tr>
<td align="left">DDQN-N, SD &#x3d; 0.01</td>
<td align="center">
<inline-formula id="inf249">
<mml:math id="m275">
<mml:mrow>
<mml:mn>9.99</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>1.57</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(8.42, 11.56)</td>
<td align="center">
<inline-formula id="inf250">
<mml:math id="m276">
<mml:mrow>
<mml:mn>9.99</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>1.87</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(8.12, 11.86)</td>
<td align="center">
<inline-formula id="inf251">
<mml:math id="m277">
<mml:mrow>
<mml:mn>9.99</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>2.48</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(7.51, 12.47)</td>
</tr>
<tr>
<td align="left">DDQN-N, SD &#x3d; 0.05</td>
<td align="center">
<inline-formula id="inf252">
<mml:math id="m278">
<mml:mrow>
<mml:mn>10.22</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>2.17</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(8.05, 12.39)</td>
<td align="center">
<inline-formula id="inf253">
<mml:math id="m279">
<mml:mrow>
<mml:mn>10.22</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>2.6</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(7.62, 12.82)</td>
<td align="center">
<inline-formula id="inf254">
<mml:math id="m280">
<mml:mrow>
<mml:mn>10.22</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>3.44</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(6.78, 13.66)</td>
</tr>
<tr>
<td align="left">DDQN-N, SD &#x3d; 0.1</td>
<td align="center">
<inline-formula id="inf255">
<mml:math id="m281">
<mml:mrow>
<mml:mn>14.55</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>3.0</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(12.04, 17.06)</td>
<td align="center">
<inline-formula id="inf256">
<mml:math id="m282">
<mml:mrow>
<mml:mn>14.55</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>3.0</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(11.55, 17.55)</td>
<td align="center">
<inline-formula id="inf257">
<mml:math id="m283">
<mml:mrow>
<mml:mn>14.55</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>3.97</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(10.58, 18.52)</td>
</tr>
</tbody>
</table>
</table-wrap>
<table-wrap id="T12" position="float">
<label>TABLE 12</label>
<caption>
<p>Pairwise comparisons of the DQN algorithm under different sensor noise levels. Mean differences <inline-formula id="inf258">
<mml:math id="m284">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi mathvariant="normal">&#x394;</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>, 95% confidence intervals, Welch&#x2019;s <inline-formula id="inf259">
<mml:math id="m285">
<mml:mrow>
<mml:mi>p</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>-values, and Cohen&#x2019;s <inline-formula id="inf260">
<mml:math id="m286">
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> effect sizes are provided.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th align="left">Comparison</th>
<th align="center">Mean difference <inline-formula id="inf261">
<mml:math id="m287">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi mathvariant="normal">&#x394;</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>
</th>
<th align="center">95% CI of <inline-formula id="inf262">
<mml:math id="m288">
<mml:mrow>
<mml:mi mathvariant="normal">&#x394;</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>
</th>
<th align="center">
<inline-formula id="inf263">
<mml:math id="m289">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> (Welch)</th>
<th align="center">
<inline-formula id="inf264">
<mml:math id="m290">
<mml:mrow>
<mml:mi>p</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>-value</th>
<th align="center">Cohen&#x2019;s <inline-formula id="inf265">
<mml:math id="m291">
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>
</th>
<th align="center">Interpretation</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="left">SD &#x3d; 0.10 <inline-formula id="inf266">
<mml:math id="m292">
<mml:mrow>
<mml:mi>v</mml:mi>
<mml:mi>s</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> SD &#x3d; 0.05</td>
<td align="center">12.24</td>
<td align="center">(5.76, 18.72)</td>
<td align="center">3.73</td>
<td align="center">
<inline-formula id="inf267">
<mml:math id="m293">
<mml:mrow>
<mml:mn>2.6</mml:mn>
<mml:mo>&#xd7;</mml:mo>
<mml:mn>1</mml:mn>
<mml:msup>
<mml:mrow>
<mml:mn>0</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>4</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">0.53</td>
<td align="center">Significant, medium effect</td>
</tr>
<tr>
<td align="left">SD &#x3d; 0.10 <inline-formula id="inf268">
<mml:math id="m294">
<mml:mrow>
<mml:mi>v</mml:mi>
<mml:mi>s</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> SD &#x3d; 0.01</td>
<td align="center">12.54</td>
<td align="center">(6.12, 18.96)</td>
<td align="center">3.86</td>
<td align="center">
<inline-formula id="inf269">
<mml:math id="m295">
<mml:mrow>
<mml:mn>1.6</mml:mn>
<mml:mo>&#xd7;</mml:mo>
<mml:mn>1</mml:mn>
<mml:msup>
<mml:mrow>
<mml:mn>0</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>4</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">0.55</td>
<td align="center">Significant, medium effect</td>
</tr>
<tr>
<td align="left">SD &#x3d; 0.05 <inline-formula id="inf270">
<mml:math id="m296">
<mml:mrow>
<mml:mi>v</mml:mi>
<mml:mi>s</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> SD &#x3d; 0.01</td>
<td align="center">0.30</td>
<td align="center">(&#x2212;4.62, 5.22)</td>
<td align="center">0.12</td>
<td align="center">0.90</td>
<td align="center">0.02</td>
<td align="center">Not significant, negligible effect</td>
</tr>
</tbody>
</table>
</table-wrap>
<table-wrap id="T13" position="float">
<label>TABLE 13</label>
<caption>
<p>Pairwise comparisons of the DDQN-N algorithm under different sensor noise levels. Mean differences <inline-formula id="inf271">
<mml:math id="m297">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi mathvariant="normal">&#x394;</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>, 90%, 95%, and 99% confidence intervals, Welch&#x2019;s <inline-formula id="inf272">
<mml:math id="m298">
<mml:mrow>
<mml:mi>p</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>-values, Cohen&#x2019;s <inline-formula id="inf273">
<mml:math id="m299">
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> effect sizes, and interpretation are provided.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th align="left">Comparison</th>
<th align="center">
<inline-formula id="inf274">
<mml:math id="m300">
<mml:mrow>
<mml:mi mathvariant="normal">&#x394;</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>
</th>
<th align="center">90% CI</th>
<th align="center">95% CI</th>
<th align="center">99% CI</th>
<th align="center">
<inline-formula id="inf275">
<mml:math id="m301">
<mml:mrow>
<mml:mi>p</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>-value</th>
<th align="center">Cohen&#x2019;s <inline-formula id="inf276">
<mml:math id="m302">
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>
</th>
<th align="center">Interpretation</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="left">SD &#x3d; 0.10 <inline-formula id="inf277">
<mml:math id="m303">
<mml:mrow>
<mml:mi>v</mml:mi>
<mml:mi>s</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> SD &#x3d; 0.05</td>
<td align="center">4.33</td>
<td align="center">(1.02, 7.64)</td>
<td align="center">(0.39, 8.27)</td>
<td align="center">(&#x2212;0.87, 9.53)</td>
<td align="center">0.032</td>
<td align="center">0.31</td>
<td align="center">Significant at 95%, small effect</td>
</tr>
<tr>
<td align="left">SD &#x3d; 0.10 <inline-formula id="inf278">
<mml:math id="m304">
<mml:mrow>
<mml:mi>v</mml:mi>
<mml:mi>s</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> SD &#x3d; 0.01</td>
<td align="center">4.56</td>
<td align="center">(1.61, 7.51)</td>
<td align="center">(1.04, 8.08)</td>
<td align="center">(&#x2212;0.09, 9.21)</td>
<td align="center">0.011</td>
<td align="center">0.36</td>
<td align="center">Significant at 95%, small&#x2013;medium effect</td>
</tr>
<tr>
<td align="left">SD &#x3d; 0.05 <inline-formula id="inf279">
<mml:math id="m305">
<mml:mrow>
<mml:mi>v</mml:mi>
<mml:mi>s</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> SD &#x3d; 0.01</td>
<td align="center">0.23</td>
<td align="center">(&#x2212;2.44, 2.90)</td>
<td align="center">(&#x2212;2.95, 3.41)</td>
<td align="center">(&#x2212;3.97, 4.43)</td>
<td align="center">0.887</td>
<td align="center">0.02</td>
<td align="center">Not significant, negligible effect</td>
</tr>
</tbody>
</table>
</table-wrap>
<table-wrap id="T14" position="float">
<label>TABLE 14</label>
<caption>
<p>Performance with 90%, 95%, and 99% confidence intervals of the number of trials across algorithms against joint constraints. <inline-formula id="inf291">
<mml:math id="m317">
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> denotes the half-width of the CI.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th rowspan="2" align="left">Algorithm</th>
<th colspan="2" align="center">90%</th>
<th colspan="2" align="center">95%</th>
<th colspan="2" align="center">99%</th>
</tr>
<tr>
<th align="center">Mean <inline-formula id="inf292">
<mml:math id="m318">
<mml:mrow>
<mml:mo>&#xb1;</mml:mo>
<mml:mspace width="0.3333em"/>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>
</th>
<th align="center">CI</th>
<th align="center">Mean <inline-formula id="inf293">
<mml:math id="m319">
<mml:mrow>
<mml:mo>&#xb1;</mml:mo>
<mml:mspace width="0.3333em"/>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>
</th>
<th align="center">CI</th>
<th align="center">Mean <inline-formula id="inf294">
<mml:math id="m320">
<mml:mrow>
<mml:mo>&#xb1;</mml:mo>
<mml:mspace width="0.3333em"/>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>
</th>
<th align="center">CI</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="left">DQN, <inline-formula id="inf295">
<mml:math id="m321">
<mml:mrow>
<mml:mo stretchy="false">[</mml:mo>
<mml:mrow>
<mml:mi>&#x3c0;</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>6</mml:mn>
<mml:mo>,</mml:mo>
<mml:mi>&#x3c0;</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>3</mml:mn>
</mml:mrow>
<mml:mo stretchy="false">]</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">
<inline-formula id="inf296">
<mml:math id="m322">
<mml:mrow>
<mml:mn>23.96</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>4.32</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(19.64, 28.28)</td>
<td align="center">
<inline-formula id="inf297">
<mml:math id="m323">
<mml:mrow>
<mml:mn>23.96</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>5.16</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(18.8, 29.12)</td>
<td align="center">
<inline-formula id="inf298">
<mml:math id="m324">
<mml:mrow>
<mml:mn>23.96</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>6.83</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(17.13, 30.79)</td>
</tr>
<tr>
<td align="left">DQN, <inline-formula id="inf299">
<mml:math id="m325">
<mml:mrow>
<mml:mo stretchy="false">[</mml:mo>
<mml:mrow>
<mml:mi>&#x3c0;</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>3</mml:mn>
<mml:mo>,</mml:mo>
<mml:mi>&#x3c0;</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>2</mml:mn>
</mml:mrow>
<mml:mo stretchy="false">]</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">
<inline-formula id="inf300">
<mml:math id="m326">
<mml:mrow>
<mml:mn>15.77</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>3.35</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(12.42, 19.12)</td>
<td align="center">
<inline-formula id="inf301">
<mml:math id="m327">
<mml:mrow>
<mml:mn>15.77</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>4.0</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(11.77, 19.77)</td>
<td align="center">
<inline-formula id="inf302">
<mml:math id="m328">
<mml:mrow>
<mml:mn>15.77</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>5.3</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(10.47, 21.07)</td>
</tr>
<tr>
<td align="left">DDQN-N, <inline-formula id="inf303">
<mml:math id="m329">
<mml:mrow>
<mml:mo stretchy="false">[</mml:mo>
<mml:mrow>
<mml:mi>&#x3c0;</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>6</mml:mn>
<mml:mo>,</mml:mo>
<mml:mi>&#x3c0;</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>3</mml:mn>
</mml:mrow>
<mml:mo stretchy="false">]</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">
<inline-formula id="inf304">
<mml:math id="m330">
<mml:mrow>
<mml:mn>12.61</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>1.89</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(10.72, 14.5)</td>
<td align="center">
<inline-formula id="inf305">
<mml:math id="m331">
<mml:mrow>
<mml:mn>12.61</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>2.26</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(10.35, 14.87)</td>
<td align="center">
<inline-formula id="inf306">
<mml:math id="m332">
<mml:mrow>
<mml:mn>12.61</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>2.99</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(9.62, 15.6)</td>
</tr>
<tr>
<td align="left">DDQN-N, <inline-formula id="inf307">
<mml:math id="m333">
<mml:mrow>
<mml:mo stretchy="false">[</mml:mo>
<mml:mrow>
<mml:mi>&#x3c0;</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>3</mml:mn>
<mml:mo>,</mml:mo>
<mml:mi>&#x3c0;</mml:mi>
<mml:mo>/</mml:mo>
<mml:mn>2</mml:mn>
</mml:mrow>
<mml:mo stretchy="false">]</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">
<inline-formula id="inf308">
<mml:math id="m334">
<mml:mrow>
<mml:mn>10.74</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>1.64</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(9.1, 12.38)</td>
<td align="center">
<inline-formula id="inf309">
<mml:math id="m335">
<mml:mrow>
<mml:mn>10.74</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>1.96</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(8.78, 12.7)</td>
<td align="center">
<inline-formula id="inf310">
<mml:math id="m336">
<mml:mrow>
<mml:mn>10.74</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>2.59</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(8.15, 13.33)</td>
</tr>
</tbody>
</table>
</table-wrap>
<table-wrap id="T15" position="float">
<label>TABLE 15</label>
<caption>
<p>Pairwise comparison of DDQN-N and DQN algorithms under different joint ranges. Mean difference <inline-formula id="inf283">
<mml:math id="m309">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi mathvariant="normal">&#x394;</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>, 90%, 95%, and 99% confidence intervals, Welch&#x2019;s <inline-formula id="inf284">
<mml:math id="m310">
<mml:mrow>
<mml:mi>p</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>-value, Cohen&#x2019;s <inline-formula id="inf285">
<mml:math id="m311">
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>, and interpretation are provided.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th align="left">Comparison</th>
<th align="center">
<inline-formula id="inf286">
<mml:math id="m312">
<mml:mrow>
<mml:mi mathvariant="normal">&#x394;</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>
</th>
<th align="center">90% CI</th>
<th align="center">95% CI</th>
<th align="center">99% CI</th>
<th align="center">
<inline-formula id="inf287">
<mml:math id="m313">
<mml:mrow>
<mml:mi>p</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>-value</th>
<th align="center">Cohen&#x2019;s <inline-formula id="inf288">
<mml:math id="m314">
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>
</th>
<th align="center">Interpretation</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="left">DDQN-N [30&#xb0;&#x2013;60&#xb0;] <inline-formula id="inf289">
<mml:math id="m315">
<mml:mrow>
<mml:mi>v</mml:mi>
<mml:mi>s</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> [60&#xb0;&#x2013;90&#xb0;]</td>
<td align="center">1.87</td>
<td align="center">(&#x2212;0.62, 4.36)</td>
<td align="center">(&#x2212;1.10, 4.84)</td>
<td align="center">(&#x2212;2.05, 5.79)</td>
<td align="center">0.217</td>
<td align="center">0.18</td>
<td align="center">Not significant, small effect</td>
</tr>
<tr>
<td align="left">DQN [30&#xb0;&#x2013;60&#xb0;] <inline-formula id="inf290">
<mml:math id="m316">
<mml:mrow>
<mml:mi>v</mml:mi>
<mml:mi>s</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> [60&#xb0;&#x2013;90&#xb0;]</td>
<td align="center">8.19</td>
<td align="center">(2.75, 13.63)</td>
<td align="center">(1.70, 14.68)</td>
<td align="center">(&#x2212;0.38, 16.76)</td>
<td align="center">0.014</td>
<td align="center">0.35</td>
<td align="center">Significant at 95%, small&#x2013;medium effect</td>
</tr>
</tbody>
</table>
</table-wrap>
<table-wrap id="T16" position="float">
<label>TABLE 16</label>
<caption>
<p>Performance with 90%, 95%, and 99% confidence intervals of the number of trials across the DQN-MHA algorithm with different time windows. <inline-formula id="inf312">
<mml:math id="m338">
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> denotes the half-width of the CI.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th rowspan="2" align="left">Algorithm</th>
<th colspan="2" align="center">90%</th>
<th colspan="2" align="center">95%</th>
<th colspan="2" align="center">99%</th>
</tr>
<tr>
<th align="center">Mean <inline-formula id="inf313">
<mml:math id="m339">
<mml:mrow>
<mml:mo>&#xb1;</mml:mo>
<mml:mspace width="0.3333em"/>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>
</th>
<th align="center">CI</th>
<th align="center">Mean <inline-formula id="inf314">
<mml:math id="m340">
<mml:mrow>
<mml:mo>&#xb1;</mml:mo>
<mml:mspace width="0.3333em"/>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>
</th>
<th align="center">CI</th>
<th align="center">Mean <inline-formula id="inf315">
<mml:math id="m341">
<mml:mrow>
<mml:mo>&#xb1;</mml:mo>
<mml:mspace width="0.3333em"/>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>
</th>
<th align="center">CI</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="left">DQN-MHA, time window &#x3d; 4</td>
<td align="center">
<inline-formula id="inf316">
<mml:math id="m342">
<mml:mrow>
<mml:mn>17.51</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>3.73</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(13.78, 21.24)</td>
<td align="center">
<inline-formula id="inf317">
<mml:math id="m343">
<mml:mrow>
<mml:mn>17.51</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>4.45</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(13.06, 21.96)</td>
<td align="center">
<inline-formula id="inf318">
<mml:math id="m344">
<mml:mrow>
<mml:mn>17.51</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>5.89</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(11.62, 23.4)</td>
</tr>
<tr>
<td align="left">DQN-MHA, time window &#x3d; 8</td>
<td align="center">
<inline-formula id="inf319">
<mml:math id="m345">
<mml:mrow>
<mml:mn>16.01</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>1.8</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(14.21, 17.81)</td>
<td align="center">
<inline-formula id="inf320">
<mml:math id="m346">
<mml:mrow>
<mml:mn>16.01</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>2.15</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(13.86, 18.16)</td>
<td align="center">
<inline-formula id="inf321">
<mml:math id="m347">
<mml:mrow>
<mml:mn>16.01</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>2.84</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(13.17, 18.85)</td>
</tr>
<tr>
<td align="left">DQN-MHA, time window &#x3d; 16</td>
<td align="center">
<inline-formula id="inf322">
<mml:math id="m348">
<mml:mrow>
<mml:mn>15.08</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>1.62</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(13.46, 16.7)</td>
<td align="center">
<inline-formula id="inf323">
<mml:math id="m349">
<mml:mrow>
<mml:mn>15.08</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>1.94</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(13.14, 17.02)</td>
<td align="center">
<inline-formula id="inf324">
<mml:math id="m350">
<mml:mrow>
<mml:mn>15.08</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>2.57</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(12.51, 17.65)</td>
</tr>
<tr>
<td align="left">DQN-MHA, time window &#x3d; 32</td>
<td align="center">
<inline-formula id="inf325">
<mml:math id="m351">
<mml:mrow>
<mml:mn>9.25</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>2.4</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(6.85, 11.65)</td>
<td align="center">
<inline-formula id="inf326">
<mml:math id="m352">
<mml:mrow>
<mml:mn>9.25</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>2.86</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(6.39, 12.11)</td>
<td align="center">
<inline-formula id="inf327">
<mml:math id="m353">
<mml:mrow>
<mml:mn>9.25</mml:mn>
<mml:mo>&#xb1;</mml:mo>
<mml:mn>3.79</mml:mn>
</mml:mrow>
</mml:math>
</inline-formula>
</td>
<td align="center">(5.46, 13.04)</td>
</tr>
</tbody>
</table>
</table-wrap>
<table-wrap id="T17" position="float">
<label>TABLE 17</label>
<caption>
<p>Pairwise comparisons of the DQN-MHA algorithm under different time windows (TW &#x3d; 4, 8, 16, 32). Mean differences <inline-formula id="inf328">
<mml:math id="m354">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi mathvariant="normal">&#x394;</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>, 90%, 95%, and 99% confidence intervals, Welch&#x2019;s <inline-formula id="inf329">
<mml:math id="m355">
<mml:mrow>
<mml:mi>p</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>-values, Cohen&#x2019;s <inline-formula id="inf330">
<mml:math id="m356">
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula> effect sizes, and interpretation are provided.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th align="left">Comparison</th>
<th align="center">
<inline-formula id="inf331">
<mml:math id="m357">
<mml:mrow>
<mml:mi mathvariant="normal">&#x394;</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>
</th>
<th align="center">90% CI</th>
<th align="center">95% CI</th>
<th align="center">99% CI</th>
<th align="center">
<inline-formula id="inf332">
<mml:math id="m358">
<mml:mrow>
<mml:mi>p</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>-value</th>
<th align="center">Cohen&#x2019;s <inline-formula id="inf333">
<mml:math id="m359">
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:math>
</inline-formula>
</th>
<th align="center">Interpretation</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="left">DQN-MHA (TW &#x3d; 4) <inline-formula id="inf334">
<mml:math id="m360">
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> (TW &#x3d; 8)</td>
<td align="center">1.50</td>
<td align="center">(&#x2212;2.62, 5.62)</td>
<td align="center">(&#x2212;3.42, 6.42)</td>
<td align="center">(&#x2212;5.00, 8.00)</td>
<td align="center">0.548</td>
<td align="center">0.09</td>
<td align="center">Not significant, negligible effect</td>
</tr>
<tr>
<td align="left">DQN-MHA (TW &#x3d; 4) <inline-formula id="inf335">
<mml:math id="m361">
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> (TW &#x3d; 16)</td>
<td align="center">2.43</td>
<td align="center">(&#x2212;1.62, 6.48)</td>
<td align="center">(&#x2212;2.41, 7.27)</td>
<td align="center">(&#x2212;3.96, 8.82)</td>
<td align="center">0.323</td>
<td align="center">0.14</td>
<td align="center">Not significant, negligible effect</td>
</tr>
<tr>
<td align="left">DQN-MHA (TW &#x3d; 4) <inline-formula id="inf336">
<mml:math id="m362">
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> (TW &#x3d; 32)</td>
<td align="center">8.26</td>
<td align="center">(3.85, 12.67)</td>
<td align="center">(2.99, 13.53)</td>
<td align="center">(1.31, 15.21)</td>
<td align="center">0.002</td>
<td align="center">0.44</td>
<td align="center">Significant at all levels, medium effect</td>
</tr>
<tr>
<td align="left">DQN-MHA (TW &#x3d; 8) <inline-formula id="inf337">
<mml:math id="m363">
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> (TW &#x3d; 16)</td>
<td align="center">0.93</td>
<td align="center">(&#x2212;1.48, 3.34)</td>
<td align="center">(&#x2212;1.94, 3.80)</td>
<td align="center">(&#x2212;2.86, 4.72)</td>
<td align="center">0.524</td>
<td align="center">0.09</td>
<td align="center">Not significant, negligible effect</td>
</tr>
<tr>
<td align="left">DQN-MHA (TW &#x3d; 8) <inline-formula id="inf338">
<mml:math id="m364">
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> (TW &#x3d; 32)</td>
<td align="center">6.76</td>
<td align="center">(3.78, 9.74)</td>
<td align="center">(3.20, 10.32)</td>
<td align="center">(2.07, 11.45)</td>
<td align="center">0.0002</td>
<td align="center">0.53</td>
<td align="center">Significant at all levels, medium effect</td>
</tr>
<tr>
<td align="left">DQN-MHA (TW &#x3d; 16) <inline-formula id="inf339">
<mml:math id="m365">
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> (TW &#x3d; 32)</td>
<td align="center">5.83</td>
<td align="center">(2.95, 8.71)</td>
<td align="center">(2.39, 9.27)</td>
<td align="center">(1.29, 10.37)</td>
<td align="center">0.001</td>
<td align="center">0.47</td>
<td align="center">Significant at all levels, medium effect</td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
<sec id="s4-4">
<label>4.4</label>
<title>Limitations</title>
<p>Although the proposed architectures show good results in throwing tasks, they have several important limitations. First, using discrete action spaces constrains the task&#x2019;s performance. Discretizing joint angles makes learning more manageable but reduces precision, which can be problematic when highly accurate throwing is required.</p>
<p>Second, the methods depend on manually designed reward functions. These rewards were determined through trial and error and may not generalize effectively to other robots or tasks. The speed of learning and how quickly the model converges also depend heavily on how the state and reward functions are designed.</p>
<p>Third, although attention-based models such as DQN-MHA improve performance, they incur additional computational costs. Their complexity can limit real-time use on robots, particularly in resource-constrained environments. Finally, the models were trained in simplified environments. Their generalization to dynamic, real-world settings with more complex physics remains to be demonstrated.</p>
</sec>
</sec>
<sec id="s5">
<label>5</label>
<title>Conclusion and future work</title>
<p>This paper serves multiple purposes: it provides a detailed review of state-of-the-art deep reinforcement learning algorithms for robotic throwing and introduces two novel approaches to enhance deep Q-networks by integrating self-attention mechanisms. The proposed models demonstrate better performance than the standard DQN across all experiments. Although the new models outperform other algorithms in specific situations, they exhibit limitations in others. Notably, DQN with multi-head attention outperforms DQN with structured self-attention. The latter&#x2019;s complexity and its reliance on attention heads reduce its effectiveness for the throwing problem compared to the multi-head attention approach.</p>
<p>Combining various techniques with DQNs could prove valuable for more complex robotic applications. Transformer architectures may significantly improve the precision and adaptability of robotic manipulators performing throwing tasks. Advanced transformer mechanisms, such as multi-head attention, enable simultaneous consideration of critical factors, including object trajectory and manipulator positioning, thereby enhancing accuracy and efficiency.</p>
<p>Future work will focus on tackling throwing tasks with reinforcement learning algorithms designed for continuous action spaces, such as policy gradient and actor-critic methods, to improve performance under real-world constraints.</p>
<p>We also plan to test the proposed architectures in higher-fidelity simulators such as NVIDIA Isaac Sim, which will allow us to incorporate more realistic physics and dynamic scenarios. Additionally, we will explore transfer learning techniques to apply knowledge from one robotic system to related tasks, such as picking and placing, object catching, handing off, and sorting.</p>
<p>Although this work focused on evaluating the overall performance of different DQN-based architectures in a robotic throwing scenario, future investigations will include ablation studies to better understand the contribution of individual components such as attention mechanisms or prioritized replay buffers. Such an analysis would provide additional insights into the interpretability of the learned policies. Furthermore, statistical hypothesis testing, such as Welch&#x2019;s test, can be beneficial in more marginal cases and will be considered in future analyses.</p>
</sec>
</body>
<back>
<sec sec-type="data-availability" id="s6">
<title>Data availability statement</title>
<p>The original contributions presented in the study are included in the article/supplementary material; further inquiries can be directed to the corresponding author.</p>
</sec>
<sec sec-type="author-contributions" id="s7">
<title>Author contributions</title>
<p>MA: Conceptualization, Data curation, Formal Analysis, Investigation, Methodology, Project administration, Resources, Software, Supervision, Validation, Visualization, Writing &#x2013; original draft, Writing &#x2013; review and editing. MT: Conceptualization, Methodology, Resources, Supervision, Validation, Writing &#x2013; review and editing. AF: Formal Analysis, Funding acquisition, Project administration, Supervision, Writing &#x2013; review and editing. GC: Formal Analysis, Investigation, Methodology, Resources, Supervision, Validation, Writing &#x2013; review and editing.</p>
</sec>
<sec sec-type="COI-statement" id="s9">
<title>Conflict of interest</title>
<p>The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.</p>
</sec>
<sec sec-type="ai-statement" id="s10">
<title>Generative AI statement</title>
<p>The author(s) declare that no Generative AI was used in the creation of this manuscript.</p>
<p>Any alternative text (alt text) provided alongside figures in this article has been generated by Frontiers with the support of artificial intelligence and reasonable efforts have been made to ensure accuracy, including review by the authors wherever possible. If you identify any issues, please contact us.</p>
</sec>
<sec sec-type="disclaimer" id="s11">
<title>Publisher&#x2019;s note</title>
<p>All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.</p>
</sec>
<fn-group>
<fn fn-type="custom" custom-type="edited-by">
<p>
<bold>Edited by:</bold> <ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/147408/overview">Giovanni Iacca</ext-link>, University of Trento, Italy</p>
</fn>
<fn fn-type="custom" custom-type="reviewed-by">
<p>
<bold>Reviewed by:</bold> <ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/2996332/overview">Dler Salih Hasan</ext-link>, Salahaddin University, Iraq</p>
<p>
<ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/3025953/overview">Lara Toledo Cordeiro Ottoni</ext-link>, Federal Institute of Minas Gerais, Brazil</p>
<p>
<ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/3026208/overview">Flabio Mirelez-Delgado</ext-link>, Unidad Profesional Interdisciplinaria de Ingenier&#xed;a Zacatecas (IPN), Mexico</p>
</fn>
</fn-group>
<fn-group>
<fn id="fn1">
<label>1</label>
<p>The list of acronyms used in this paper is provided in <xref ref-type="table" rid="T1">Table 1</xref>.</p>
</fn>
<fn id="fn2">
<label>2</label>
<p>
<ext-link ext-link-type="uri" xlink:href="https://github.com/MhdNur9/DQN_Types">https://github.com/MhdNur9/DQN_Types</ext-link>
</p>
</fn>
</fn-group>
<ref-list>
<title>References</title>
<ref id="B1">
<mixed-citation publication-type="book">
<collab>AI-ML</collab> (<year>2023</year>). &#x201c;<article-title>Analytics</article-title>,&#x201d; in <source>Reinforcement learning: exploration vs exploitation tradeoff</source>.</mixed-citation>
</ref>
<ref id="B2">
<mixed-citation publication-type="book">
<person-group person-group-type="author">
<name>
<surname>Albu-Sch&#xe4;ffer</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Bicchi</surname>
<given-names>A.</given-names>
</name>
</person-group> (<year>2016</year>). &#x201c;<article-title>Actuators for soft robotics</article-title>,&#x201d; in <source>Handbook of robotics</source>. Editors <person-group person-group-type="editor">
<name>
<surname>Siciliano</surname>
<given-names>B.</given-names>
</name>
<name>
<surname>Khatib</surname>
<given-names>O.</given-names>
</name>
</person-group> (<publisher-name>Springer</publisher-name>), <fpage>243</fpage>&#x2013;<lpage>282</lpage>.</mixed-citation>
</ref>
<ref id="B3">
<mixed-citation publication-type="book">
<person-group person-group-type="author">
<name>
<surname>August</surname>
<given-names>W.</given-names>
</name>
<name>
<surname>Waeldele</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Hein</surname>
<given-names>B.</given-names>
</name>
<name>
<surname>Woern</surname>
<given-names>H.</given-names>
</name>
<name>
<surname>Wyeth</surname>
<given-names>G.</given-names>
</name>
</person-group> (<year>2010</year>). &#x201c;<article-title>Accurate object throwing by an industrial robot manipulator</article-title>,&#x201d; in <source>Proceedings of the Australasian Conference on robotics and automation 2010</source>, <volume>10</volume>. <publisher-loc>Brisbane, Australia</publisher-loc>, <fpage>74</fpage>&#x2013;<lpage>81</lpage>.</mixed-citation>
</ref>
<ref id="B4">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Ba</surname>
<given-names>J. L.</given-names>
</name>
<name>
<surname>Kiros</surname>
<given-names>J. R.</given-names>
</name>
<name>
<surname>Hinton</surname>
<given-names>G. E.</given-names>
</name>
</person-group> (<year>2016</year>). <article-title>Layer normalization</article-title>. <comment>
<italic>arXiv Preprint arXiv:1607.06450</italic>
</comment>
</mixed-citation>
</ref>
<ref id="B5">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Bianchi</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Antonelli</surname>
<given-names>M. G.</given-names>
</name>
<name>
<surname>Laschi</surname>
<given-names>C.</given-names>
</name>
<name>
<surname>Sabatini</surname>
<given-names>A. M.</given-names>
</name>
<name>
<surname>Falotico</surname>
<given-names>E.</given-names>
</name>
</person-group> (<year>2023</year>). <article-title>Softoss: learning to throw objects with a soft robot</article-title>. <source>IEEE Robotics and Automation Mag.</source> <fpage>2</fpage>&#x2013;<lpage>12</lpage>. <pub-id pub-id-type="doi">10.1109/MRA.2023.3310865</pub-id>
</mixed-citation>
</ref>
<ref id="B6">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Bombile</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Billard</surname>
<given-names>A.</given-names>
</name>
</person-group> (<year>2022</year>). <article-title>Dual-arm control for coordinated fast grabbing and tossing of an object: Proposing a new approach</article-title>. <source>IEEE Robotics Automation Mag.</source> <volume>29</volume>, <fpage>127</fpage>&#x2013;<lpage>138</lpage>. <pub-id pub-id-type="doi">10.1109/MRA.2022.3177355</pub-id>
</mixed-citation>
</ref>
<ref id="B7">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Bombile</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Billard</surname>
<given-names>A.</given-names>
</name>
</person-group> (<year>2023</year>). <article-title>Bimanual dynamic grabbing and tossing of objects onto a moving target</article-title>. <source>Robotics Aut. Syst.</source> <volume>167</volume>, <fpage>104481</fpage>. <pub-id pub-id-type="doi">10.1016/j.robot.2023.104481</pub-id>
</mixed-citation>
</ref>
<ref id="B8">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Britt</surname>
<given-names>P.</given-names>
</name>
</person-group> (<year>2020</year>). <article-title>How growing e-commerce demand is driving growth in mobile robotics</article-title>. <source>Robot. Bus. Rev.</source> <comment>Available online at: <ext-link ext-link-type="uri" xlink:href="https://www.therobotreport.com/wp-content/uploads/2019/08/RBR-Whitepaper-GeekPlus-Final.pdf">https://www.therobotreport.com/wp-content/uploads/2019/08/RBR-Whitepaper-GeekPlus-Final.pdf</ext-link>
</comment>.</mixed-citation>
</ref>
<ref id="B9">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Burridge</surname>
<given-names>R. R.</given-names>
</name>
<name>
<surname>Rizzi</surname>
<given-names>A. A.</given-names>
</name>
<name>
<surname>Koditschek</surname>
<given-names>D. E.</given-names>
</name>
</person-group> (<year>1995</year>). <article-title>Toward a dynamical pick and place</article-title>. <source>
<italic>Proc. 1995 IEEE/RSJ Int. Conf. Intelligent Robots Syst. Hum. Robot Interact. Coop. Robots</italic> (IEEE)</source> <volume>2</volume>, <fpage>292</fpage>&#x2013;<lpage>297</lpage>. <pub-id pub-id-type="doi">10.1109/iros.1995.526175</pub-id>
</mixed-citation>
</ref>
<ref id="B10">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Costa</surname>
<given-names>M. A.</given-names>
</name>
<name>
<surname>Wullt</surname>
<given-names>B.</given-names>
</name>
<name>
<surname>Norrlof</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Gunnarsson</surname>
<given-names>S.</given-names>
</name>
</person-group> (<year>2019</year>). <article-title>Failure detection in robotic arms using statistical modeling, machine learning and hybrid gradient boosting</article-title>. <source>Measurement</source> <volume>146</volume>, <fpage>425</fpage>&#x2013;<lpage>436</lpage>. <pub-id pub-id-type="doi">10.1016/j.measurement.2019.06.039</pub-id>
</mixed-citation>
</ref>
<ref id="B11">
<mixed-citation publication-type="book">
<person-group person-group-type="author">
<name>
<surname>Dong</surname>
<given-names>K.</given-names>
</name>
<name>
<surname>Pereida</surname>
<given-names>K.</given-names>
</name>
<name>
<surname>Shkurti</surname>
<given-names>F.</given-names>
</name>
<name>
<surname>Schoellig</surname>
<given-names>A. P.</given-names>
</name>
</person-group> (<year>2020</year>). &#x201c;<article-title>Catch the ball: accurate high-speed motions for mobile manipulators via inverse dynamics learning</article-title>,&#x201d; in <source>
<italic>2020 IEEE/RSJ International Conference on Intelligent Robots and Systems, IROS</italic> (IEEE)</source>, <fpage>6718</fpage>&#x2013;<lpage>6725</lpage>.</mixed-citation>
</ref>
<ref id="B12">
<mixed-citation publication-type="book">
<person-group person-group-type="author">
<name>
<surname>Frank</surname>
<given-names>H.</given-names>
</name>
<name>
<surname>Wellerdick-Wojtasik</surname>
<given-names>N.</given-names>
</name>
<name>
<surname>Hagebeuker</surname>
<given-names>B.</given-names>
</name>
<name>
<surname>Novak</surname>
<given-names>G.</given-names>
</name>
<name>
<surname>Mahlknecht</surname>
<given-names>S.</given-names>
</name>
</person-group> (<year>2006</year>). &#x201c;<article-title>Throwing objects&#x2013;a bio-inspired approach for the transportation of parts</article-title>,&#x201d; in <source>
<italic>2006 IEEE International Conference on Robotics and Biomimetics</italic> (IEEE)</source>, <fpage>91</fpage>&#x2013;<lpage>96</lpage>.</mixed-citation>
</ref>
<ref id="B13">
<mixed-citation publication-type="book">
<person-group person-group-type="author">
<name>
<surname>Gonzalez</surname>
<given-names>S. G.</given-names>
</name>
</person-group> (<year>2020</year>). <source>Real time Probabilistic models for robot trajectories</source>. <publisher-loc>Technische Universit&#xe4;t Darmstadt, Darmstadt, Germany</publisher-loc>. <comment>Ph.D. thesis</comment>.</mixed-citation>
</ref>
<ref id="B14">
<mixed-citation publication-type="web">
<person-group person-group-type="author">
<name>
<surname>Group</surname>
<given-names>M. R.</given-names>
</name>
</person-group> (<year>2024</year>). <article-title>Robotic systems - inverse kinematics</article-title>. <comment>Available online at: <ext-link ext-link-type="uri" xlink:href="https://motion.cs.illinois.edu/RoboticSystems/InverseKinematics.html">https://motion.cs.illinois.edu/RoboticSystems/InverseKinematics.html</ext-link>. Accessed on [. Accessed on [8/January/2024</comment>]</mixed-citation>
</ref>
<ref id="B15">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Hassan</surname>
<given-names>G.</given-names>
</name>
<name>
<surname>Gouttefarde</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Chemori</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Herv&#xe9;</surname>
<given-names>P.-E.</given-names>
</name>
<name>
<surname>El Rafei</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Francis</surname>
<given-names>C.</given-names>
</name>
<etal/>
</person-group> (<year>2022</year>). <article-title>Time-optimal pick-and-throw s-curve trajectories for fast parallel robots</article-title>. <source>IEEE/ASME Trans. Mechatronics</source> <volume>27</volume>, <fpage>4707</fpage>&#x2013;<lpage>4717</lpage>. <pub-id pub-id-type="doi">10.1109/tmech.2022.3164247</pub-id>
</mixed-citation>
</ref>
<ref id="B16">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Hausknecht</surname>
<given-names>M. J.</given-names>
</name>
<name>
<surname>Stone</surname>
<given-names>P.</given-names>
</name>
</person-group> (<year>2015</year>). <article-title>Deep recurrent q-learning for partially observable mdps</article-title>. <source>
<italic>Corr.</italic> abs/1507</source>, <fpage>06527</fpage>.</mixed-citation>
</ref>
<ref id="B17">
<mixed-citation publication-type="book">
<person-group person-group-type="author">
<name>
<surname>Homsi</surname>
<given-names>M. A.</given-names>
</name>
<name>
<surname>Trumi&#x107;</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Cirrincione</surname>
<given-names>G.</given-names>
</name>
<name>
<surname>Fagiolini</surname>
<given-names>A.</given-names>
</name>
</person-group> (<year>2023</year>). &#x201c;<article-title>AI-Based approach for throwing and Grasping objects from unknown positions by soft robot Upper Body manipulators</article-title>,&#x201d; in <source>Proceedings of the IEEE/RSJ International Workshop on Intelligent Robots and Systems (IROS)</source> (<publisher-loc>Detroit, MI, USA</publisher-loc>).</mixed-citation>
</ref>
<ref id="B18">
<mixed-citation publication-type="book">
<person-group person-group-type="author">
<name>
<surname>Hu</surname>
<given-names>N.-Z.</given-names>
</name>
<name>
<surname>Su</surname>
<given-names>C.-H. S.</given-names>
</name>
<name>
<surname>Gong</surname>
<given-names>C.-S. A.</given-names>
</name>
<name>
<surname>Lee</surname>
<given-names>C.-J.</given-names>
</name>
<name>
<surname>Chen</surname>
<given-names>Y.-S.</given-names>
</name>
<name>
<surname>Yang</surname>
<given-names>C.-H.</given-names>
</name>
<etal/>
</person-group> (<year>2019</year>). &#x201c;<article-title>Machine learning approach for robot diagnostic system</article-title>,&#x201d; in <source>IEEE Eurasia Conference on IOT</source>.</mixed-citation>
</ref>
<ref id="B19">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Kasaei</surname>
<given-names>H.</given-names>
</name>
<name>
<surname>Kasaei</surname>
<given-names>M.</given-names>
</name>
</person-group> (<year>2024</year>). <article-title>Throwing objects into a moving basket while avoiding obstacles</article-title>. <source>Unspecified</source>. <pub-id pub-id-type="doi">10.1109/ICRA48891.2023.10160215</pub-id>
</mixed-citation>
</ref>
<ref id="B20">
<mixed-citation publication-type="journal">
<collab>Keras</collab> (<year>2023</year>). <article-title>Attention layer</article-title>.</mixed-citation>
</ref>
<ref id="B21">
<mixed-citation publication-type="book">
<person-group person-group-type="author">
<name>
<surname>Kim</surname>
<given-names>J. H.</given-names>
</name>
<name>
<surname>Xiang</surname>
<given-names>Y.</given-names>
</name>
<name>
<surname>Bhatt</surname>
<given-names>R.</given-names>
</name>
<name>
<surname>Yang</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Arora</surname>
<given-names>J. S.</given-names>
</name>
<name>
<surname>Abdel-Malek</surname>
<given-names>K.</given-names>
</name>
</person-group> (<year>2008</year>). &#x201c;<article-title>Throwing motion generation of a biped human model</article-title>,&#x201d; in <source>
<italic>2008 2nd IEEE RAS and EMBS International Conference on Biomedical Robotics and Biomechatronics</italic> (IEEE)</source>, <fpage>587</fpage>&#x2013;<lpage>592</lpage>.</mixed-citation>
</ref>
<ref id="B22">
<mixed-citation publication-type="book">
<person-group person-group-type="author">
<name>
<surname>Lapan</surname>
<given-names>M.</given-names>
</name>
</person-group> (<year>2018</year>). <source>Deep reinforcement learning hands-on</source>. <publisher-name>Packt Publishing Birmingham</publisher-name>, <volume>6</volume>.</mixed-citation>
</ref>
<ref id="B23">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Learning</surname>
<given-names>R. R.</given-names>
</name>
</person-group> (<year>2025</year>). <article-title>Inverse kinematics tutorial</article-title>.</mixed-citation>
</ref>
<ref id="B24">
<mixed-citation publication-type="book">
<person-group person-group-type="author">
<name>
<surname>Li</surname>
<given-names>S. E.</given-names>
</name>
</person-group> (<year>2023</year>). <source>Reinforcement learning for sequential decision and optimal control</source>. <publisher-name>Springer</publisher-name>. <comment>Available online at: <ext-link ext-link-type="uri" xlink:href="https://libgen.li">https://libgen.li</ext-link>.</comment>
</mixed-citation>
</ref>
<ref id="B25">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Lin</surname>
<given-names>H.-I.</given-names>
</name>
<name>
<surname>Yu</surname>
<given-names>Z.</given-names>
</name>
<name>
<surname>Huang</surname>
<given-names>Y.-C.</given-names>
</name>
</person-group> (<year>2020</year>). <article-title>Ball tracking and trajectory prediction for table-tennis robots</article-title>. <source>Sensors</source> <volume>20</volume>, <fpage>333</fpage>. <pub-id pub-id-type="doi">10.3390/s20020333</pub-id>
<pub-id pub-id-type="pmid">31936032</pub-id>
</mixed-citation>
</ref>
<ref id="B26">
<mixed-citation publication-type="book">
<person-group person-group-type="author">
<name>
<surname>Liu</surname>
<given-names>Y.</given-names>
</name>
<name>
<surname>Nayak</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Billard</surname>
<given-names>A.</given-names>
</name>
</person-group> (<year>2022</year>). &#x201c;<article-title>A solution to adaptive mobile manipulator throwing</article-title>,&#x201d; in <source>2022 IEEE/RSJ International Conference on Intelligent Robots and Systems, IROS</source>, <fpage>1625</fpage>&#x2013;<lpage>1632</lpage>. <pub-id pub-id-type="doi">10.1109/IROS47612.2022.9981231</pub-id>
</mixed-citation>
</ref>
<ref id="B27">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Lynch</surname>
<given-names>K. M.</given-names>
</name>
<name>
<surname>Mason</surname>
<given-names>M. T.</given-names>
</name>
</person-group> (<year>1999</year>). <article-title>Dynamic nonprehensile manipulation: Controllability, planning, and experiments</article-title>. <source>Int. J. Robotics Res.</source> <volume>18</volume>, <fpage>64</fpage>&#x2013;<lpage>92</lpage>. <pub-id pub-id-type="doi">10.1177/027836499901800105</pub-id>
</mixed-citation>
</ref>
<ref id="B28">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Mason</surname>
<given-names>M. T.</given-names>
</name>
<name>
<surname>Lynch</surname>
<given-names>K. M.</given-names>
</name>
</person-group> (<year>1993</year>). <article-title>Dynamic manipulation</article-title>. <source>Proc. 1993 IEEE/RSJ Int. Conf. Intelligent Robots Syst.</source> <volume>1</volume>, <fpage>152</fpage>&#x2013;<lpage>159</lpage>. <pub-id pub-id-type="doi">10.1109/iros.1993.583093</pub-id>
</mixed-citation>
</ref>
<ref id="B29">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Mims</surname>
<given-names>C.</given-names>
</name>
</person-group> (<year>2020</year>). <article-title>As e-commerce booms, robots pick up human slack</article-title>. <source>Wall Str. J.</source>
</mixed-citation>
</ref>
<ref id="B30">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Mnih</surname>
<given-names>V.</given-names>
</name>
<name>
<surname>Kavukcuoglu</surname>
<given-names>K.</given-names>
</name>
<name>
<surname>Silver</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Graves</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Antonoglou</surname>
<given-names>I.</given-names>
</name>
<name>
<surname>Wierstra</surname>
<given-names>D.</given-names>
</name>
<etal/>
</person-group> (<year>2013</year>). <article-title>Playing atari with deep reinforcement learning</article-title>. <source>arXiv Prepr. arXiv:1312</source>. <pub-id pub-id-type="doi">10.48550/arXiv.1312.5602</pub-id>
</mixed-citation>
</ref>
<ref id="B31">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Mnih</surname>
<given-names>V.</given-names>
</name>
<name>
<surname>Kavukcuoglu</surname>
<given-names>K.</given-names>
</name>
<name>
<surname>Silver</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Rusu</surname>
<given-names>A. A.</given-names>
</name>
<name>
<surname>Veness</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Bellemare</surname>
<given-names>M. G.</given-names>
</name>
<etal/>
</person-group> (<year>2015</year>). <article-title>Human-level control through deep reinforcement learning</article-title>. <source>Nature</source> <volume>518</volume>, <fpage>529</fpage>&#x2013;<lpage>533</lpage>. <pub-id pub-id-type="doi">10.1038/nature14236</pub-id>
<pub-id pub-id-type="pmid">25719670</pub-id>
</mixed-citation>
</ref>
<ref id="B32">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Nair</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Srinivasan</surname>
<given-names>P.</given-names>
</name>
<name>
<surname>Blackwell</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Alcicek</surname>
<given-names>C.</given-names>
</name>
<name>
<surname>Fearon</surname>
<given-names>R.</given-names>
</name>
<name>
<surname>De Maria</surname>
<given-names>A.</given-names>
</name>
<etal/>
</person-group> (<year>2015</year>). <article-title>Massively parallel methods for deep reinforcement learning</article-title>. <comment>
<italic>arXiv Preprint arXiv:1507.04296</italic>
</comment>
</mixed-citation>
</ref>
<ref id="B33">
<mixed-citation publication-type="book">
<person-group person-group-type="author">
<name>
<surname>Raptopoulos</surname>
<given-names>F.</given-names>
</name>
<name>
<surname>Koskinopoulou</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Maniadakis</surname>
<given-names>M.</given-names>
</name>
</person-group> (<year>2020</year>). &#x201c;<article-title>Robotic pick-and-toss facilitates urban waste sorting</article-title>,&#x201d; in <source>2020 IEEE 16th International Conference on automation Science and engineering (CASE)</source> (<publisher-name>IEEE</publisher-name>), <fpage>1149</fpage>&#x2013;<lpage>1154</lpage>.</mixed-citation>
</ref>
<ref id="B34">
<mixed-citation publication-type="book">
<person-group person-group-type="author">
<name>
<surname>Satici</surname>
<given-names>A. C.</given-names>
</name>
<name>
<surname>Ruggiero</surname>
<given-names>F.</given-names>
</name>
<name>
<surname>Lippiello</surname>
<given-names>V.</given-names>
</name>
<name>
<surname>Siciliano</surname>
<given-names>B.</given-names>
</name>
</person-group> (<year>2016</year>). &#x201c;<article-title>A coordinate-free framework for robotic pizza tossing and catching</article-title>,&#x201d; in <source>2016 IEEE International Conference on robotics and automation, ICRA</source>, <fpage>3932</fpage>&#x2013;<lpage>3939</lpage>. <pub-id pub-id-type="doi">10.1109/ICRA.2016.7487582</pub-id>
</mixed-citation>
</ref>
<ref id="B35">
<mixed-citation publication-type="book">
<person-group person-group-type="author">
<name>
<surname>Satici</surname>
<given-names>A. C.</given-names>
</name>
<name>
<surname>Ruggiero</surname>
<given-names>F.</given-names>
</name>
<name>
<surname>Lippiello</surname>
<given-names>V.</given-names>
</name>
<name>
<surname>Siciliano</surname>
<given-names>B.</given-names>
</name>
</person-group> (<year>2022</year>). <source>A coordinate-free framework for robotic Pizza Tossing and catching</source>. <publisher-name>Springer</publisher-name>, <fpage>207</fpage>&#x2013;<lpage>227</lpage>.</mixed-citation>
</ref>
<ref id="B36">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Schill</surname>
<given-names>M. M.</given-names>
</name>
<name>
<surname>Buss</surname>
<given-names>M.</given-names>
</name>
</person-group> (<year>2018</year>). <article-title>Robust ballistic catching: a hybrid system stabilization problem</article-title>. <source>IEEE Trans. Robotics</source> <volume>34</volume>, <fpage>1502</fpage>&#x2013;<lpage>1517</lpage>. <pub-id pub-id-type="doi">10.1109/tro.2018.2868857</pub-id>
</mixed-citation>
</ref>
<ref id="B37">
<mixed-citation publication-type="book">
<person-group person-group-type="author">
<name>
<surname>Siciliano</surname>
<given-names>B.</given-names>
</name>
</person-group> (<year>2008</year>). &#x201c;<article-title>Kinematics</article-title>,&#x201d; in <source>Robotics: Modelling, planning, and control</source> (<publisher-name>Springer</publisher-name>).</mixed-citation>
</ref>
<ref id="B38">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Sivasamy</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Dev Anand</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Anitha Sheela</surname>
<given-names>K.</given-names>
</name>
</person-group> (<year>2019</year>). <article-title>Intelligence decision making of fault detection and fault tolerance method for industrial robotic manipulators</article-title>. <source>IJRTE</source>. <pub-id pub-id-type="doi">10.35940/ijrte.B1004.0782S319</pub-id>
</mixed-citation>
</ref>
<ref id="B39">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Sorokin</surname>
<given-names>I.</given-names>
</name>
<name>
<surname>Seleznev</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Pavlov</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Fedorov</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Ignateva</surname>
<given-names>A.</given-names>
</name>
</person-group> (<year>2015</year>). <article-title>Deep attention recurrent q-network</article-title>. <source>ArXiv</source>. <pub-id pub-id-type="doi">10.48550/arXiv.1512.01693</pub-id>
</mixed-citation>
</ref>
<ref id="B40">
<mixed-citation publication-type="book">
<person-group person-group-type="author">
<name>
<surname>Sutton</surname>
<given-names>R. S.</given-names>
</name>
<name>
<surname>Barto</surname>
<given-names>A. G.</given-names>
</name>
</person-group> (<year>2018</year>). <source>Reinforcement learning: an introduction</source>. <publisher-name>MIT Press</publisher-name>.</mixed-citation>
</ref>
<ref id="B41">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>van Hasselt</surname>
<given-names>H.</given-names>
</name>
<name>
<surname>Guez</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Silver</surname>
<given-names>D.</given-names>
</name>
</person-group> (<year>2015</year>). <article-title>Deep reinforcement learning with double q-learning</article-title>. <source>arXiv Prepr. arXiv:1509.06461</source>. <pub-id pub-id-type="doi">10.48550/arXiv.1509.06461</pub-id>
</mixed-citation>
</ref>
<ref id="B42">
<mixed-citation publication-type="book">
<person-group person-group-type="author">
<name>
<surname>Van Hasselt</surname>
<given-names>H.</given-names>
</name>
<name>
<surname>Guez</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Silver</surname>
<given-names>D.</given-names>
</name>
</person-group> (<year>2016</year>). &#x201c;<article-title>Deep reinforcement learning with double q-learning</article-title>,&#x201d;, <volume>2</volume>. <publisher-loc>Phoenix, AZ</publisher-loc>, <fpage>5</fpage>. <pub-id pub-id-type="doi">10.1609/aaai.v30i1.10295</pub-id>
</mixed-citation>
</ref>
<ref id="B43">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Vaswani</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Shazeer</surname>
<given-names>N.</given-names>
</name>
<name>
<surname>Parmar</surname>
<given-names>N.</given-names>
</name>
<name>
<surname>Uszkoreit</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Jones</surname>
<given-names>L.</given-names>
</name>
<name>
<surname>Gomez</surname>
<given-names>A. N.</given-names>
</name>
<etal/>
</person-group> (<year>2017</year>). <article-title>Attention is all you need</article-title>. <source>
<italic>Adv. Neural Inf. Process. Syst.</italic> (NeurIPS)</source> <volume>30</volume>. <pub-id pub-id-type="doi">10.48550/arXiv.1706.03762</pub-id>
</mixed-citation>
</ref>
<ref id="B44">
<mixed-citation publication-type="book">
<person-group person-group-type="author">
<name>
<surname>Watkins</surname>
<given-names>C. J.</given-names>
</name>
</person-group> (<year>1989</year>). <source>Learning from delayed rewards</source>. <publisher-loc>Cambridge</publisher-loc>: <publisher-name>King&#x2019;s College</publisher-name>. <comment>Ph.D. thesis</comment>.</mixed-citation>
</ref>
<ref id="B45">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Wiki</surname>
<given-names>R.</given-names>
</name>
</person-group> (<year>2024</year>). <article-title>Controlling the phantomx pincher robot arm</article-title>.</mixed-citation>
</ref>
<ref id="B46">
<mixed-citation publication-type="journal">
<collab>Wikipedia</collab> (<year>2023</year>). <article-title>Exploration-exploitation dilemma</article-title>.</mixed-citation>
</ref>
<ref id="B47">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Zeng</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Song</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Lee</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Rodriguez</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Funkhouser</surname>
<given-names>T.</given-names>
</name>
</person-group> (<year>2020</year>). <article-title>Tossingbot: learning to throw arbitrary objects with residual physics</article-title>. <source>IEEE Trans. Robotics</source> <volume>36</volume>, <fpage>1307</fpage>&#x2013;<lpage>1319</lpage>. <pub-id pub-id-type="doi">10.1109/tro.2020.2988642</pub-id>
</mixed-citation>
</ref>
<ref id="B48">
<mixed-citation publication-type="book">
<person-group person-group-type="author">
<name>
<surname>Zhang</surname>
<given-names>Y.</given-names>
</name>
<name>
<surname>Luo</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Hauser</surname>
<given-names>K.</given-names>
</name>
</person-group> (<year>2012</year>). &#x201c;<article-title>Sampling-based motion planning with dynamic intermediate state objectives: application to throwing</article-title>,&#x201d; in <source>
<italic>2012 IEEE International Conference on Robotics and automation</italic> (IEEE)</source>, <fpage>2551</fpage>&#x2013;<lpage>2556</lpage>.</mixed-citation>
</ref>
<ref id="B49">
<mixed-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Zhang</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Zhang</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Wang</surname>
<given-names>B.</given-names>
</name>
<name>
<surname>Habetler</surname>
<given-names>T. G.</given-names>
</name>
</person-group> (<year>2019</year>). <article-title>Machine learning and deep learning algorithms for bearing fault diagnostics &#x2013; a comprehensive review</article-title>. <source>Cornell Univ. arXiv:1901</source>, <fpage>08247v2</fpage>. <pub-id pub-id-type="doi">10.1109/ACCESS.2020.2972859</pub-id>
</mixed-citation>
</ref>
</ref-list>
</back>
</article>