πŸ‘Ύ DQN Agent on SpaceInvadersNoFrameskip-v4

This repository contains a trained Deep Q-Network (DQN) agent that plays the SpaceInvadersNoFrameskip-v4 environment using the Stable-Baselines3 library (github.com in Bing).


πŸ“Š Model Card

Model Name: dqn-SpaceInvadersNoFrameskip-v4
Environment: SpaceInvadersNoFrameskip-v4
Algorithm: DQN (Deep Q-Network)
Performance Metric:

  • Mean Reward: 565.50 Β± 114.03
  • Verification: Not yet independently verified

πŸš€ Usage

from stable_baselines3 import DQN
from huggingface_sb3 import load_from_hub
import gym

# Load the trained DQN model
model = load_from_hub(
    repo_id="KraTUZen/dqn-SpaceInvadersNoFrameskip-v4",
    filename="dqn.pkl"
)

# Initialize environment
env = gym.make(model["env_id"])

🧠 Notes

  • The agent is trained using DQN, a value-based deep reinforcement learning algorithm.
  • The environment is SpaceInvadersNoFrameskip-v4, a classic Atari game where the agent must shoot down alien invaders.
  • The serialized Q-network is stored in dqn.pkl.

πŸ“‚ Repository Structure

  • dqn.pkl β†’ Trained Q-network weights
  • README.md β†’ Documentation and usage guide

βœ… Results

  • The agent learns to maximize score by shooting invaders while avoiding losing lives.
  • Demonstrates stable convergence using DQN, balancing exploration and exploitation.

πŸ”Ž Environment Overview

  • Observation Space: Pixel-based visual input (Atari frames)
  • Action Space: Discrete (move left, move right, fire)
  • Objective: Survive and maximize score by destroying invaders
  • Reward: Positive reward for hitting invaders, penalties for losing lives

πŸ“š Learning Highlights

  • Algorithm: DQN (Deep Q-Network)
  • Update Rule: Q-learning with experience replay and target networks
  • Strengths: Handles high-dimensional visual input effectively
  • Limitations: Sensitive to hyperparameter tuning and replay buffer size
Downloads last month
12
Video Preview
loading

Evaluation results

  • mean_reward on SpaceInvadersNoFrameskip-v4
    self-reported
    565.50 +/- 114.03