🏎️ Tesla Roadster Flip-Landing // D3QN Mission Control
“Tesla Roadster Flip-Landing // D3QN Mission Control: Autonomous 180° Inversion Recovery & Falcon-Style ASDS Touchdown Telemetry | HWIHWA LAB
Autonomous attitude recovery and soft drone-ship touchdown from a 180° upside-down inverted drop using cold-gas RCS thrusters & Dueling Double Deep Q-Network (D3QN).🌐 English Documentation | 🇰🇷 한국어 매뉴얼 | 🛸 Interactive 3D Cockpit”
Developed by Hwihwa Lab · AI × Automation × Aesthetics ✨
🚀 Mission Briefing & Aerospace Challenge
1. 🏎️ The Mission: 180° Inverted Ballistic Recovery
- The Vision: Inspired by SpaceX Falcon 9’s iconic boostback/entry flip maneuvers and Tesla’s Starman Roadster cruising through deep space, this project challenges an autonomous AI flight controller to recover a Tesla Roadster dropped upside-down ($180^\circ$ pitch) at an altitude of 12 meters.
- The Objective: Execute an acrobatic mid-air attitude inversion, stabilize chaotic angular momentum using cold-gas RCS thrusters, ignite the main retro-rocket, and perform a precision soft landing on the center deck of an Autonomous Spaceport Drone Ship (ASDS).
- The D3QN Strategy: Leveraging off-policy value decomposition (Dueling Double DQN), the agent learns a robust, cautious control policy prioritizing maximum flight safety, hovering trajectory damping, and a 100.0% zero-failure butter touchdown.
2. 🌪️ The 3 Extreme Aerodynamic Hurdles
- Nonlinear Angular Momentum: Released with an initial downward velocity ($v_y = -0.5\text{ m/s}$) while completely inverted, the 2-ton vehicle experiences rapid rotational acceleration ($\omega > \pm 3.0\text{ rad/s}$). Any miscalculated RCS pulse can induce an unrecoverable flat spin.
- Time-Critical Decision Window: With gravity pulling the vehicle downward, the agent has fewer than 10 seconds to invert, eliminate lateral drift, and arrest vertical velocity before impact.
- Q-Value Overestimation Risk: Extreme rotational state transitions easily cause catastrophic Q-value explosion in conventional Q-networks, demanding dueling state-value separation ($V(s)$ and $A(s, a)$) and Polyak soft target updates ($\tau = 0.001$).
3. 🎯 Strict Touchdown Success Criteria
To earn a certified touchdown, the vehicle must satisfy three non-negotiable physical constraints simultaneously upon contact:
- Pad Centering Radius: $|x| \le 0.4\text{ m}$ from drone-ship center (deviation beyond 1.2m results in ocean splashdown).
- Attitude Alignment: Vehicle pitch $|\theta| \le 5.0^\circ$ (exceeding $12^\circ$ leads to catastrophic deck rollover).
- Impact Velocity: Touchdown vertical speed $v_y \ge -1.4\text{ m/s}$ (exceeding structural shock limit causes instant chassis destruction; optimal butter touchdown is $\ge -0.85\text{ m/s}$).
📊 Benchmark Achievements
| Metric | Benchmark Achievement | Physical Meaning |
|---|---|---|
| 180° Inversion Landing Rate | 100.0% (50 / 50) | Perfect touchdown rate from completely inverted drop |
| Peak Mean Evaluation Reward | +340.26 points | High-precision center pad & 3-stage butter bonus |
| Terminal Touchdown Velocity | -0.81 m/s | Butter smooth deceleration (Well within 1.4 m/s limit) |
| Attitude Alignment | -5.2° (Optimal) | Horizontal wheel alignment with drone-ship pad |
| Time-to-Touchdown | 9.6 seconds (~290 steps) | Time-optimal ballistic descent without hovering exploit |
180° INVERSION FLIP-LANDING FLIGHT PROFILE
=====================================================================================================
ALTITUDE (Y)
▲
12m │ [T+0.0s] 🏎️🔻 INVERTED DROP : Released 180° upside-down at 12m height (vy = -0.5 m/s)
│ │
9m │ ▼ [T+2.4s] COLD-GAS RCS BURST : High-torque RCS pulse (Action 1/3) snaps 180° ➔ 90°
│ │
6m │ ▼ [T+5.1s] ATTITUDE LOCK (0°) : Vehicle leveled horizontally; Main thruster ignites
│ │
2m │ ▼ [T+7.8s] TERMINAL DECELERATION : Descent velocity choked to -0.8 m/s (|x| ≤ 0.4m)
│ │
0m └───[T+9.6s]─▼───────────────────────────────────────────────────────────────────────────────► TIME
🏆 BUTTER TOUCHDOWN : Precision pad touchdown on Starship ASDS Drone-Ship (+340.26 Pts)
=====================================================================================================
⚔️ Dual-Engine Comparison: D3QN vs PPO
Both agents were trained on the exact same 250,000-step curriculum budget under identical 6-DoF aerodynamic physics. Their learned behavioral policies showcase a classic deep RL control dichotomy:
| Evaluation Dimension | 🧠 D3QN (Value-Based) | 🎯 PPO (Actor-Critic) |
|---|---|---|
| Optimization Paradigm | Off-Policy Q-Learning with Experience Replay | On-Policy Policy Gradient (PPO-Clip) |
| Tactical Personality | Cautious & Hovering (Score-Maximizer) | Agile & Aggressive (Time-Optimal) |
| Descent Duration | ~9.6s (290 steps) | ~6.7s (133 steps) |
| 180° Inversion Landing Rate | 100.0% (50 / 50) | 98.0% (49 / 50) |
| Mean Evaluation Reward | +340.26 pts (accumulated via floating) | +300.34 pts |
| Touchdown Impact Speed | -0.81 m/s | -0.73 m/s |
| Best Mission Scenario | Maximum stability, fault-tolerant low-wind landing | Fuel-constrained, time-critical descent |
Tip: You can dynamically switch between D3QN and PPO in real time using the Interactive 3D Cockpit or inspect the twin PPO Model Hub.
🌟 Core Algorithmic Architecture
+---------------------------+
| 8D State Observation s |
+-------------+-------------+
|
[Feature Backbone]
Linear(8->128) + LayerNorm
Linear(128->128) + LayerNorm
|
+----------------------+----------------------+
| |
[Value Stream V(s)] [Advantage Stream A(s, a)]
Linear(128->64) -> 1 Linear(128->64) -> 4
| |
+----------------------+----------------------+
|
Q(s, a) = V(s) + (A(s, a) - mean(A))
1. Dueling Double DQN (D3QN) with Polyak Soft Updates
- Dueling Decomposition: Separates state value $V(s)$ from action advantage $A(s, a)$ to suppress Q-value overestimation during sharp 180° angular rotations.
- Double DQN Value Estimation: Decouples action selection (online network) from target Q-value computation (target network).
- Polyak Soft Target Updates: Smooth target synchronization with $\tau = 0.001$.
2. Triple Butter Landing Bonus & Anti-Hovering Guard
- Anti-Hovering Timeout Penalty: Harsh $-100.0$ penalty on episode timeout eliminates procrastination traps where the vehicle hovers indefinitely.
- Descent Guidance Reward: Incentivizes downward vertical velocity ($-0.2 \ge v_y \ge -1.4\text{ m/s}$).
- Triple Butter Bonus: Up to $+100.0$ bonus points for landing within $\pm 0.4\text{m}$ of center, within $4.5^\circ$ of horizontal, and at landing velocity $\le 0.7\text{ m/s}$.
🖥️ 3-Column Cyber-Aerospace Cockpit
Engineered as a zero-scroll, high-density aerospace flight telemetry dashboard (100vh fitted):
+---------------------------------------------------------------------------------------------------+
| 🔴 TESLA ROADSTER FLIP-LANDING // D3QN MISSION CONTROL [STATUS: ONLINE] |
| Autonomous 180° Inversion Recovery & Falcon-Style ASDS Touchdown Telemetry | HWIHWA LAB |
+---------------------------------+---------------------------------+-------------------------------+
| 👈 FLIGHT HUD & GYRO | 🛸 CENTER: 180° FLIP VIEWPORT | 👉 D3QN NEURAL CLUSTER |
| - 360° Circular Pitch Ring | - Cyberpunk Starship Drone-ship | - 4-Action Q-Value Equalizer |
| - Live Oscilloscope Telemetry | - Midnight Red Roadster Sprite | - Autopilot vs Manual Toggle |
| - Touchdown Evaluation Rank | - Flip Arc Ghost Trail | - Interactive Force Push |
| - RCS Cold-Gas Pressure Gauges | - Real-time Thruster Flame | - Tesla Yoke Flight Cockpit |
+---------------------------------+---------------------------------+-------------------------------+
🎮 Spaces & Web Cockpit Interactive Features
The standalone desktop cockpit and Hugging Face Spaces web app deliver a zero-latency, hardware-accelerated telemetry experience:
- 🕹️ Tesla Yoke Flight Controller: Toggle seamlessly between Autopilot (D3QN) and Manual Flight using keyboard controls (
W/↑Main Thruster,A/←RCS Left,D/→RCS Right). - 💥 Interactive Force Push & Turbulence: Dynamically disturb the vehicle in mid-air (
👈 PUSH L,🌪️ SPIN,👉 PUSH R) to test the D3QN agent's real-time attitude stabilization and recovery. - 🌪️ ASDS Droneship Wind Dynamics: Real-time atmospheric cross-wind simulation with 4 presets (
🍃 Calm 0.0 m/s,💨 Breeze +0.4 m/s,🌬️ Cross -0.45 m/s,🌪️ Storm +0.85 m/s). - ⏱️ Time-Warp Engine: Precision playback control from 0.25x Cinematic Slow-Motion up to 2.0x warp to inspect ballistic inversion physics frame-by-frame.
- 🔊 0 KB Procedural Web Audio Engine: Zero external audio assets—pure HTML5 Web Audio API synthesizing live Falcon-style rocket rumble and high-frequency cold-gas RCS thruster hisses.
- 🎨 Tesla Roadster Paint Shop: Instant vehicle recoloring across 4 factory finishes (Midnight Red, Pearl White, Deep Blue, Cyber Silver).
📂 Repository Contents
best_model.pth: Pretrained PyTorch Dueling Double DQN neural network weights (+340.26 peak reward).config.json: Model architecture, 8D state normalization, and 4D discrete action specifications.roadster_env.py: Gymnasium-compatible 180° inverted ballistic flight simulator environment.dqn_agent.py: Complete PyTorch source code forDuelingQNetworkandRoadsterAgent.evaluate.py: Standalone CLI benchmark verification script (python evaluate.py --episodes 10).README.md: English documentation with ASCII flight profile timeline.README_KR.md: Full Korean comprehensive mission manual and aerodynamic physics guide.LICENSE: MIT License.
🚀 Quick Start Guide
1. Standalone CLI Benchmark Verification (Zero GUI)
# Verify 100% touchdown rate across 10 inverted drops
python evaluate.py --episodes 10
2. Run Locally (FastAPI + WebSocket Cockpit)
# Install dependencies
pip install -r requirements.txt
# Launch mission dashboard
python run.py
Open http://localhost:7860 in any web browser.
3. One-Click Deployment to Hugging Face (Spaces & Model Hub)
Deploy directly to Hugging Face Model Hub and Spaces with zero manual configuration:
# Deploy both Model Hub (Weights) and Spaces (Interactive Docker Web Deck) in Private mode
python deploy_to_hf.py --private
# Deploy publicly with your HF token
python deploy_to_hf.py --token hf_your_token
# Target only the Spaces live web cockpit
python deploy_to_hf.py --target space
# Target only the Model Hub weights repository
python deploy_to_hf.py --target model
- Live Spaces Web App: https://huggingface.co/spaces/hwihwalab/tesla-roadster-flip-landing
- Model Hub Repository: https://huggingface.co/hwihwalab/tesla-roadster-flip-landing-d3qn
👤 About Hwihwa Lab
“AI × Automation × Aesthetics — Crafting tools you'll love ✨”
Hwihwa Lab is an independent AI research & engineering studio dedicated to blending practical on-device intelligence, autonomous operations, and refined aesthetics. We engineer resilient systems that free solopreneurs and indie creators from operational overhead—giving people their time and creative joy back.
🔬 Core Research & Engineering Pillars
- Zero-Cost Edge Operations: Private, on-device AI pipelines for autonomous business workflows without ongoing cloud API overhead.
- Autonomous Decision OS & Micro-ERP: Deterministic, prefrontal-cortex-style reasoning architectures designed to orchestrate daily business decisions and operations.
- Embodied AI & Domain-Specific Robotics: Simulation-driven reinforcement learning, physical control brains, and specialized domain data engineering for real-world service environments.
- Interactive Creative Aesthetics: Fusing functional automation with refined visual craft and modern design philosophy to build delightful tools.
🌐 Connect & Aerospace RL Ecosystem
- Research Studio: 🤗 Hugging Face (@hwihwalab) · 🐙 GitHub (@Hwihwa-Lab)
- 🚀 Autonomous Flight & Landing Control Lineup:
- 🌕 Phase 1 · Classical Soft Landing: lunarlander-v3-d3qn (D3QN baseline for vertical gravitational descent)
- 🏎️ Phase 2 · Acrobatic Inversion Recovery (D3QN): tesla-roadster-flip-landing-d3qn (Current Model) (100% touchdown rate with cautious attitude control)
- 🎯 Phase 2 · Acrobatic Inversion Recovery (PPO): tesla-roadster-flip-landing-ppo (98% touchdown rate with ultra-fast agile ballistic descent)
- 🛸 Dual-Engine Interactive Cockpit: tesla-roadster-flip-landing (Real-time in-browser 60fps comparison deck)
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
Trained and deployed with Roadster Flip Mission Control by Hwihwa Lab (@hwihwalab)