<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Gaurang Ghadi on Medium]]></title>
        <description><![CDATA[Stories by Gaurang Ghadi on Medium]]></description>
        <link>https://medium.com/@GaurangGhadi?source=rss-1fc88d4e13d8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*6iS3rv2PRd-CWZXFCBytpQ.jpeg</url>
            <title>Stories by Gaurang Ghadi on Medium</title>
            <link>https://medium.com/@GaurangGhadi?source=rss-1fc88d4e13d8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 03:30:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@GaurangGhadi/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[5 Things I Wish I Knew Before Building Autonomous Systems]]></title>
            <link>https://medium.com/@GaurangGhadi/5-things-i-wish-i-knew-before-building-autonomous-systems-a6aca177faf6?source=rss-1fc88d4e13d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/a6aca177faf6</guid>
            <category><![CDATA[robotics]]></category>
            <category><![CDATA[reinforcement-learning]]></category>
            <category><![CDATA[autonomy]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Gaurang Ghadi]]></dc:creator>
            <pubDate>Sun, 03 May 2026 00:36:26 GMT</pubDate>
            <atom:updated>2026-05-03T00:38:53.367Z</atom:updated>
            <content:encoded><![CDATA[<p>I’m not going to explain what a robot is. If you’re here, you already know. You’ve probably broken something expensive. Had the moment where sim looks perfect and hardware immediately does something insane. Read a paper, understood it, implemented it, watched it not work.</p><p><em>This is for that person.</em></p><h3>1. Your reward function means nothing to the agent</h3><p>I had an agent that was supposed to prioritize certain high-value entities. The reward seemed obvious — penalize delay for everyone, weight the important ones higher.</p><p>The agent learned to simply cycle quickly and treat everyone equally. Technically accurate in light of what I wrote. It only stated “delay bad.” It never stated “this thing waiting is an emergency.”</p><p>The fix: make the weight aggressive enough that the agent actually <em>feels</em> the difference. A tiny multiplier has no effect on actual behaviour and seems fine in your reward curves. You must be nearly unreasonably explicit.</p><p>You already know about reward hacking conceptually. But there’s a difference between knowing it and watching your agent nail your objective while ignoring your actual goal. That’s when it lands.</p><p>Before you run anything, consider how you can get a good reward without accomplishing what you desire. If you can find them at your desk, the agent finds them in the first hundred episodes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*yCpZGLcZXFOz46lAlViliQ.png" /><figcaption><strong><em>Reward Weight Comparison</em></strong></figcaption></figure><h3>2. The sim-to-real gap is always wider than you think</h3><p><em>No exceptions. I don’t care how good your simulator is.</em></p><p>Spent weeks on a policy that looked clean in sim — smooth trajectories, handles perturbations, passes all evals. Put it on hardware. Oscillated and crashed immediately.</p><p>Not because the RL was wrong, but because the simulator lied. Real motors have latency. Real rotors create airflow nobody modeled. Real IMU noise isn’t Gaussian. The sim didn’t contain any of that.</p><p>Domain randomization helps — randomize mass, drag, motor delay, sensor noise. Not because you’ll sample the real values, but because you’re training the policy to be robust rather than brittle. Beyond that, it’s just calibration. The sim is a starting point. The faster you accept that, the faster you stop being surprised.</p><h3>3. If you can’t debug it in 10 minutes, it’s too much of a black box</h3><p><em>End-to-end learning is exciting. Camera to motor output, no intermediate representations. I get it.</em></p><p>But when it breaks , and it will , you have will have no information. Within 10 million parameters, something made the incorrect decision. I wish you luck.</p><p>The <strong>perception → planning → control</strong> pipeline feels less glamorous. It’s also the reason you can make repairs. Something goes wrong: was it overlooked by perception? Did planning ignore it? Did control not work as intended? Each of the three subsystems and three questions is examinable. You locate the bug.</p><p><em>Modularity isn’t a compromise. It’s what lets you sleep.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/1*d6DPMjyChscHgk3W3bJ_7A.png" /><figcaption><strong><em>modular pipeline vs end-to-end black box</em></strong></figcaption></figure><h3>4. Fancier algorithms aren’t always better</h3><p>Ran DQN, Linear Q-Learning, and Linear SARSA against each other recently. Expected DQN to win — neural network, replay buffer, the “<em>modern</em>” thing.</p><p>Wasn’t that clean. DQN had a high variance between runs and was sensitive to hyperparameters. Linear methods were boring, they were always low variance, competitive, and consistent.</p><p>Simpler methods were better for that problem. Not because DQN is bad, but because the extra capacity wasn’t buying anything. You’re paying the instability tax for nothing.</p><p>Nobody actually says this because deep RL is the ultimate goal of RL courses. However, the advice to “<strong>use the simplest thing that works</strong>” is undervalued. Linear methods are quick, stable, and easy to understand. If they’re good enough for your problem, they’re better than DQN for your problem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*fA2xzR8FJKkfuOIzqrJ6Bw.png" /><figcaption><strong><em>DQN vs Linear Q vs SARSA comparison</em></strong></figcaption></figure><h3>5. Black-boxing algorithms will eventually blow up in your face</h3><p><em>There’s always a deadline. The library is right there. You can copy-paste an example and have something running in ten minutes. I’ve done it too.</em></p><p>But the first time something subtle goes wrong, you need to know what the algorithm is actually doing.</p><p>I was stuck with a policy. Loss fine, entropy decreasing, returns not improving. Worked on hyperparameters for two days. Nothing helped. Eventually I actually looked at what the algorithm was computing inside, the numbers it was using to decide how much to update , and they were wildly off. They were thousands of times bigger than they should’ve been. Each update was so big it was basically random. The model wasn’t learning, it was just thrashing.</p><p>The fix was one line of code. Scale those numbers down before using them. That’s it.</p><p>I would’ve found it in ten minutes if I’d understood what the algorithm was doing instead of just adjusting the parameters on top of it. The settings don’t tell you anything when the problem is underneath them.</p><p>You don’t need to go deep on the math right away. But at minimum, understand what each component of the algorithm is doing and why. That’s the only thing that really helps when something breaks.</p><p><em>Everything here, resulted from something breaking and having to figure out why. Not a course, not a paper. Just time spent with a system that didn’t work.</em></p><p><strong>That’s pretty much the whole job.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a6aca177faf6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>