π LunarLander-v3 DQN Autonomous Landing Agent
This repository contains a fully trained Double DQN with Dueling Architecture agent for the LunarLander-v3 environment in Gymnasium.
- Developer / Creator: white100big
- Algorithm: Double Dueling Deep Q-Network (DQN)
- Environment: Gymnasium LunarLander-v3
- Target Solved Score: 200.0+
- Evaluation Score: 271.25 (100% Landing Success Rate over test evaluations)
π 1,000 Episodes Training Performance
Result: Successfully solved
LunarLander-v3with a 100-episode moving average reward of 259.09 (exceeding the standard 200.0 threshold) and a 100% landing success rate upon evaluation.
π Training Specifications
| Parameter | Value |
|---|---|
| Total Episodes | 1,000 |
| Epsilon Schedule | 1.0 (100%) β 0.05 (5%) Exponential Decay |
| Discount Factor ($\gamma$) | 0.99 |
| Replay Buffer Size | 100,000 |
| Batch Size | 64 |
| Loss Function | Smooth L1 (Huber Loss) |
| Target Network Update | Soft Update ($ au = 0.005$) |
| State Dimension | 8 |
| Action Space | Discrete(4) |
π οΈ How to Use & Evaluate
1. Requirements
pip install torch "gymnasium[box2d]" swig
2. Download from Hugging Face
from huggingface_hub import hf_hub_download
model_path = hf_hub_download(
repo_id="white100big/LunarLander-v3-DQN",
filename="best_lunarlander_dqn.pth"
)
print("Downloaded to:", model_path)
3. Run Autonomous Landing Simulation
import gymnasium as gym
from dqn_agent import DQNAgent
env = gym.make("LunarLander-v3", render_mode="human")
agent = DQNAgent(state_size=8, action_size=4)
agent.load("best_lunarlander_dqn.pth")
state, _ = env.reset()
done = False
total_reward = 0
while not done:
action = agent.act(state, eps=0.0) # Pure exploitation
state, reward, terminated, truncated, _ = env.step(action)
done = terminated or truncated
total_reward += reward
print(f"Final Landing Score: {total_reward:.2f}")
env.close()
- Downloads last month
- 25
Evaluation results
- Mean Evaluation Reward on LunarLander-v3self-reported271.250
- Landing Success Rate (%) on LunarLander-v3self-reported100.000
