Downloads · 30 days
0
Basem1166/TD3-LunarLander-v3
TD3-LunarLander-v3 is a reinforcement learning model from Basem1166. Use it for the reinforcement learning task on the model card, and read the license before you ship it in a product. It is set up for reinforcement-learning.
This is a trained TD3 (Twin Delayed Deep Deterministic Policy Gradient) agent for the LunarLander-v3 environment.
Downloads · 30 days
0
Access
Public
Updated Dec 9, 2025
Repo size
3.3 MB
Likes
0
Public
Click a slice to open those files.
.pth3.3 MB · 54%
From the Hugging Face model README
This is a trained TD3 (Twin Delayed Deep Deterministic Policy Gradient) agent for the LunarLander-v3 environment.
import torch
from td3_agent import TD3Agent
import gymnasium as gym
# Load model
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model = torch.load("pytorch_model.pth", map_location=device)
# Create agent and environment
env = gym.make("LunarLander-v3")
agent = TD3Agent(obs_dim=8, action_dim=4, max_action=1.0, hyperparameters={}, device=device)
agent.actor.load_state_dict(model['actor_state_dict'])
# Test agent
state, _ = env.reset()
while True:
action = agent.select_action(state, eval_mode=True)
state, reward, terminated, truncated, _ = env.step(action)
if terminated or truncated:
break
Trained by Basem Elgalfy as part of Assignment 4 in Reinforcement Learning.