Downloads · 30 days
0
Vishand03/q-Taxi-v3
q-Taxi-v3 is a reinforcement learning model from Vishand03. 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 q-learning.
This is a trained Q-Learning agent for the Taxi-v3 environment using tabular Q-learning.
Downloads · 30 days
0
Access
Public
Updated Oct 17, 2025
Repo size
152 KB
Likes
0
Public
Click a slice to open those files.
.mp4168 KB · 86%
From the Hugging Face model README
This is a trained Q-Learning agent for the Taxi-v3 environment using tabular Q-learning.
Vishand S (@Vishand03)

import gymnasium as gym
import numpy as np
import pickle
from huggingface_hub import hf_hub_download
# -------------------------
# Load Q-table from Hugging Face
# -------------------------
q_table_path = hf_hub_download("Vishand03/q-Taxi-v3", "q-learning.pkl")
with open(q_table_path, "rb") as f:
Qtable = pickle.load(f)
# -------------------------
# Create Taxi Environment
# -------------------------
env = gym.make("Taxi-v3", render_mode="human")
state, _ = env.reset()
terminated, truncated = False, False
# -------------------------
# Run one episode
# -------------------------
total_reward = 0
while not terminated and not truncated:
action = np.argmax(Qtable[state])
state, reward, terminated, truncated, _ = env.step(action)
total_reward += reward
print(f"Episode finished with total reward: {total_reward}")