Physics-based lunar lander simulation with Deep Q-Network and neural network introspection

Timeline
2024
Category
Deep Reinforcement Learning
Platform
Desktop
Overview
A physics-based lunar lander simulation and training environment built with C++ that combines Box2D physics simulation, SFML rendering, and Dear ImGui for visualization. The project implements a Deep Q-Network (DQN) agent with neural network introspection capabilities to learn optimal landing policies through reinforcement learning.
Key Features
- Realistic Physics: Box2D physics engine for accurate spacecraft dynamics and collision detection
- Deep Q-Network: Neural network-based RL agent learning optimal landing strategies
- Neural Network Introspection: Activation heatmaps and gradient flow visualization for understanding agent decisions
- Interactive Dashboard: 13+ real-time visualizations including training metrics, reward breakdowns, and safe landing envelopes
- Dual Training Modes: Visual training with interactive controls and headless mode for faster training
Technical Implementation
The system integrates Box2D for physics simulation, SFML for rendering, and Dear ImGui for the comprehensive dashboard interface. The DQN implementation includes experience replay and target networks for stable learning, with extensive metrics tracking to understand agent learning dynamics and network behavior.
Impact
This project demonstrates the power of combining deep learning with reinforcement learning for complex control tasks. The neural network introspection features provide unique insights into how the agent learns and makes decisions in real-time.