Views
No views yet
1import pickle
2import gymnasium as gym
3from huggingface_hub import hf_hub_download
4
5# Download the model
6repo_id = "mo7hamed1x/q-Taxi-v3"
7filename = "q-learning.pkl"
8checkpoint = hf_hub_download(repo_id=repo_id, filename=filename)
9
10# Load the Q-Table
11with open(checkpoint, 'rb') as f:
12 q_table = pickle.load(f)
13
14# Create environment
15env = gym.make("Taxi-v3")
16state, info = env.reset()