Reinforcement Learning
stable-baselines3
SpaceInvadersNoFrameskip-v4
deep-rl-course
dqn
Eval Results (legacy)
Instructions to use luijait/dqn-SpaceInvadersNoFrameskip-v4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- stable-baselines3
How to use luijait/dqn-SpaceInvadersNoFrameskip-v4 with stable-baselines3:
from huggingface_sb3 import load_from_hub checkpoint = load_from_hub( repo_id="luijait/dqn-SpaceInvadersNoFrameskip-v4", filename="{MODEL FILENAME}.zip", ) - Notebooks
- Google Colab
- Kaggle
DQN Agent playing SpaceInvadersNoFrameskip-v4 ๐พ
This is a trained DQN agent playing SpaceInvadersNoFrameskip-v4. This model was trained as part of the Hugging Face Deep RL Course Unit 3.
Training Details
- Algorithm: Deep Q-Network (DQN)
- Environment: SpaceInvadersNoFrameskip-v4 (Atari)
- Library: Stable Baselines3
- Training timesteps: 1,000,000
- Evaluation: 340.50 +/- 45.20 (10 episodes)
Usage
from stable_baselines3 import DQN
from stable_baselines3.common.env_util import make_atari_env
from stable_baselines3.common.vec_env import VecFrameStack
# Create environment
env = make_atari_env('SpaceInvadersNoFrameskip-v4', n_envs=1)
env = VecFrameStack(env, n_stack=4)
# Load the model
model = DQN.load("dqn-SpaceInvadersNoFrameskip-v4", env=env)
# Enjoy trained agent
obs = env.reset()
for i in range(1000):
action, _states = model.predict(obs, deterministic=True)
obs, rewards, dones, info = env.step(action)
env.render()
This model achieves good performance on the SpaceInvaders Atari game, scoring well above the target score of 200 for the Deep RL Course Unit 3.
- Downloads last month
- -
Evaluation results
- mean_reward on SpaceInvadersNoFrameskip-v4self-reported340.50 +/- 45.20