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
- 1
Evaluation results
- mean_reward on SpaceInvadersNoFrameskip-v4self-reported340.50 +/- 45.20