<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Reinforcement Learning | Saikiran Juttu | Robotics Portfolio</title><link>https://juttu-s.github.io/saikiran_juttu.github.io/tags/reinforcement-learning/</link><atom:link href="https://juttu-s.github.io/saikiran_juttu.github.io/tags/reinforcement-learning/index.xml" rel="self" type="application/rss+xml"/><description>Reinforcement Learning</description><generator>Hugo Blox Builder (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Thu, 10 Apr 2025 00:00:00 +0000</lastBuildDate><image><url>https://juttu-s.github.io/saikiran_juttu.github.io/media/icon_hu7729264130191091259.png</url><title>Reinforcement Learning</title><link>https://juttu-s.github.io/saikiran_juttu.github.io/tags/reinforcement-learning/</link></image><item><title>Autonomous Race Driving with Action Mapping RL</title><link>https://juttu-s.github.io/saikiran_juttu.github.io/project/am-race-driving-rl/</link><pubDate>Thu, 10 Apr 2025 00:00:00 +0000</pubDate><guid>https://juttu-s.github.io/saikiran_juttu.github.io/project/am-race-driving-rl/</guid><description>&lt;h2 id="autonomous-race-driving-with-action-mapping-rl">Autonomous Race Driving with Action Mapping RL&lt;/h2>
&lt;p>This project evaluates the impact of &lt;strong>Action Mapping (AM)&lt;/strong> on &lt;strong>deep reinforcement learning (DRL)&lt;/strong> algorithms for high-speed autonomous race driving. The primary goal was to enforce &lt;strong>friction and vehicle dynamics constraints&lt;/strong> while ensuring agents could learn to complete laps efficiently and safely.&lt;/p>
&lt;p>We &lt;strong>extended the GitHub framework from the AM-RL paper&lt;/strong> (ISA Transactions 2024) that used TD3 + AM, and &lt;strong>re-implemented the actor-critic models using DDPG and SAC&lt;/strong> with Action Mapping. The experiments were conducted on &lt;strong>Track A&lt;/strong> in the custom race simulator.&lt;/p>
&lt;hr>
&lt;h2 id="objectives">Objectives&lt;/h2>
&lt;ul>
&lt;li>Understand and replicate the Action Mapping Reinforcement Learning (AM-RL) framework&lt;/li>
&lt;li>Implement DDPG and SAC as alternate agents within the same setup&lt;/li>
&lt;li>Compare lap time, constraint satisfaction, and learning stability across methods&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="simulation--state-design">Simulation &amp;amp; State Design&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>Environment:&lt;/strong> Custom Python-based simulator using bicycle model dynamics&lt;/li>
&lt;li>&lt;strong>Observations:&lt;/strong>
&lt;ul>
&lt;li>12 future curvature points from the centerline&lt;/li>
&lt;li>Velocity, yaw rate, orientation, steering angle, and track deviation&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;strong>Action Space:&lt;/strong> Virtual actions ∈ [−1, 1]² → throttle &amp;amp; steering angle&lt;/li>
&lt;li>&lt;strong>Constraints:&lt;/strong> Friction cone and lateral acceleration safety bounds&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="neural-networks">Neural Networks&lt;/h2>
&lt;h3 id="actor-networks">Actor Networks&lt;/h3>
&lt;ul>
&lt;li>Fully connected with 2 hidden layers (256–256 units)&lt;/li>
&lt;li>&lt;strong>Activation:&lt;/strong> ReLU (hidden), Tanh (output)&lt;/li>
&lt;li>&lt;strong>Output:&lt;/strong> Unconstrained actions (steering, throttle) passed to AM module&lt;/li>
&lt;/ul>
&lt;h3 id="critic-networks">Critic Networks&lt;/h3>
&lt;ul>
&lt;li>Two Q-functions for SAC (double critic)&lt;/li>
&lt;li>One Q-function for DDPG&lt;/li>
&lt;li>Each accepts state-action pair and outputs scalar Q-value&lt;/li>
&lt;/ul>
&lt;h3 id="loss-functions">Loss Functions&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>DDPG:&lt;/strong> MSE loss on predicted Q-values&lt;/li>
&lt;li>&lt;strong>SAC:&lt;/strong> Adds entropy regularization and automatic temperature tuning&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="action-mapping-am">Action Mapping (AM)&lt;/h2>
&lt;ul>
&lt;li>State-aware mapping transforms virtual actions to safe, real-world controls&lt;/li>
&lt;li>Implemented as a lookup-based mapping based on track geometry and physics&lt;/li>
&lt;li>Ensures compliance with dynamic tire-road constraints (Fₓ, Fᵧ within friction ellipse)&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="results-summary">Results Summary&lt;/h2>
&lt;h3 id="ddpg-with-action-mapping-am">DDPG with Action Mapping (AM)&lt;/h3>
&lt;ul>
&lt;li>Learned a stable and smooth racing policy&lt;/li>
&lt;li>Consistently finished laps on Track A&lt;/li>
&lt;li>&lt;strong>Lap 1 Time:&lt;/strong> 43.57s&lt;/li>
&lt;li>&lt;strong>Lap 2 Time:&lt;/strong> 41.7s&lt;/li>
&lt;li>Maintained safety constraints with no friction violations&lt;/li>
&lt;li>Approached TD3-level performance from literature&lt;/li>
&lt;/ul>
&lt;h3 id="td3-vs-ddpg-lap-comparison">TD3 vs DDPG Lap Comparison&lt;/h3>
&lt;p>Below is a side-by-side comparison of &lt;strong>TD3&lt;/strong> (left) and &lt;strong>DDPG&lt;/strong> (right) for both Lap 1 and Lap 2 on Track A. Color encodes speed (m/s).&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="TD3 vs DDPG Lap 1 &amp;amp; 2" srcset="
/saikiran_juttu.github.io/project/am-race-driving-rl/TD3_DDPG_hu11255701520106207767.webp 400w,
/saikiran_juttu.github.io/project/am-race-driving-rl/TD3_DDPG_hu16877567874459994854.webp 760w,
/saikiran_juttu.github.io/project/am-race-driving-rl/TD3_DDPG_hu9699183390352886908.webp 1200w"
src="https://juttu-s.github.io/saikiran_juttu.github.io/saikiran_juttu.github.io/project/am-race-driving-rl/TD3_DDPG_hu11255701520106207767.webp"
width="601"
height="760"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;p>&lt;em>Figure: Lap 1 and Lap 2 performance comparison — TD3 has tighter trajectories and better cornering speed than DDPG.&lt;/em>&lt;/p>
&lt;hr>
&lt;h3 id="sac-with-action-mapping-am">SAC with Action Mapping (AM)&lt;/h3>
&lt;ul>
&lt;li>Frequently failed to complete laps (DNF)&lt;/li>
&lt;li>Produced two common failure modes:
&lt;ul>
&lt;li>Prioritizing speed → unstable cornering and off-track behavior&lt;/li>
&lt;li>Prioritizing stability → very slow but accurate turns&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Final policies were inconsistent and fragile&lt;/li>
&lt;li>Highly sensitive to reward scaling and actor update frequency&lt;/li>
&lt;/ul>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="SAC Lap 1 Intermediate Failures" srcset="
/saikiran_juttu.github.io/project/am-race-driving-rl/SAC_hu7060679015506459835.webp 400w,
/saikiran_juttu.github.io/project/am-race-driving-rl/SAC_hu17451594598186353989.webp 760w,
/saikiran_juttu.github.io/project/am-race-driving-rl/SAC_hu100650002741892404.webp 1200w"
src="https://juttu-s.github.io/saikiran_juttu.github.io/saikiran_juttu.github.io/project/am-race-driving-rl/SAC_hu7060679015506459835.webp"
width="655"
height="377"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;p>&lt;em>Figure: SAC Lap 1 — Left: high speed, low stability; Right: better track alignment, very low velocity.&lt;/em>&lt;/p>
&lt;hr>
&lt;h2 id="key-comparison-table">Key Comparison Table&lt;/h2>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Metric&lt;/th>
&lt;th>TD3-AM (paper)&lt;/th>
&lt;th>DDPG-AM (ours)&lt;/th>
&lt;th>SAC-AM (ours)&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Best Lap Time (s)&lt;/td>
&lt;td>&lt;strong>36.94&lt;/strong>&lt;/td>
&lt;td>41.7&lt;/td>
&lt;td>DNF (unstable)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Constraint Violations&lt;/td>
&lt;td>0&lt;/td>
&lt;td>0&lt;/td>
&lt;td>Some (off-track)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Convergence Speed&lt;/td>
&lt;td>Fast&lt;/td>
&lt;td>Moderate&lt;/td>
&lt;td>Slow&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Stability&lt;/td>
&lt;td>High&lt;/td>
&lt;td>High&lt;/td>
&lt;td>Very Low&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;hr>
&lt;h2 id="resources">Resources&lt;/h2>
&lt;ul>
&lt;li>📄 &lt;a href="CS5180___Final_Report.pdf">Final Report PDF&lt;/a>&lt;/li>
&lt;li>🔗 &lt;a href="https://www.sciencedirect.com/science/article/pii/S0019057824002143?via%3Dihub" target="_blank" rel="noopener">Link to Original Paper&lt;/a>&lt;/li>
&lt;li>🔗 &lt;a href="https://github.com/s-bray/CS5180-Final_Project" target="_blank" rel="noopener">GitHub Repo&lt;/a>&lt;/li>
&lt;/ul>
&lt;hr>
&lt;p>This project demonstrates how &lt;strong>Action Mapping serves as a universal safety wrapper&lt;/strong> that can be applied across different DRL algorithms. Our experiments showed that DDPG performs competitively against TD3 in constrained driving, while SAC struggled to converge due to reward instability — emphasizing the importance of choosing the right policy architecture for safety-critical RL tasks.&lt;/p></description></item></channel></rss>