MohamedMaged262
commited on
Commit
•
01c9c37
1
Parent(s):
26ffe84
Upload 3 files
Browse files
Model_Testing.py
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gym
|
2 |
+
import pickle
|
3 |
+
import time
|
4 |
+
import numpy as np
|
5 |
+
|
6 |
+
# Load the saved model
|
7 |
+
with open("q_learning_model.pkl", "rb") as f:
|
8 |
+
model_data = pickle.load(f)
|
9 |
+
|
10 |
+
Q_table = model_data["Q_table"]
|
11 |
+
state_bins = model_data["state_bins"]
|
12 |
+
|
13 |
+
def discretize_state(state):
|
14 |
+
state_low = env.observation_space.low
|
15 |
+
state_high = env.observation_space.high
|
16 |
+
bins = [np.linspace(state_low[i], state_high[i], state_bins[i]) for i in range(len(state))]
|
17 |
+
state_indices = [np.digitize(state[i], bins[i]) - 1 for i in range(len(state))]
|
18 |
+
return tuple(state_indices)
|
19 |
+
|
20 |
+
env = gym.make("MountainCar-v0", render_mode="human")
|
21 |
+
|
22 |
+
test_episodes = 10
|
23 |
+
|
24 |
+
for episode in range(test_episodes):
|
25 |
+
state, _ = env.reset()
|
26 |
+
state = discretize_state(state)
|
27 |
+
done = False
|
28 |
+
total_reward = 0
|
29 |
+
|
30 |
+
print(f"Testing Episode {episode + 1}")
|
31 |
+
|
32 |
+
while not done:
|
33 |
+
action = np.argmax(Q_table[state])
|
34 |
+
next_state, reward, done, truncated, _ = env.step(action)
|
35 |
+
state = discretize_state(next_state)
|
36 |
+
total_reward += reward
|
37 |
+
|
38 |
+
|
39 |
+
env.render()
|
40 |
+
time.sleep(0.03)
|
41 |
+
|
42 |
+
print(f"Total reward for Episode {episode + 1}: {total_reward}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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cells": [
|
3 |
+
{
|
4 |
+
"cell_type": "code",
|
5 |
+
"execution_count": null,
|
6 |
+
"metadata": {},
|
7 |
+
"outputs": [
|
8 |
+
{
|
9 |
+
"name": "stdout",
|
10 |
+
"output_type": "stream",
|
11 |
+
"text": [
|
12 |
+
"Initial State: (0, 0)\n"
|
13 |
+
]
|
14 |
+
}
|
15 |
+
],
|
16 |
+
"source": [
|
17 |
+
"import numpy as np\n",
|
18 |
+
"\n",
|
19 |
+
"class Gridworld:\n",
|
20 |
+
" def __init__(self):\n",
|
21 |
+
" self.grid_size = 5\n",
|
22 |
+
" self.start_state = (0, 0)\n",
|
23 |
+
" self.goal_state = (4, 4)\n",
|
24 |
+
" self.obstacles = [(2, 2), (3, 3)]\n",
|
25 |
+
" self.state = self.start_state\n",
|
26 |
+
"\n",
|
27 |
+
" def reset(self):\n",
|
28 |
+
" self.state = self.start_state\n",
|
29 |
+
" return self.state\n",
|
30 |
+
"\n",
|
31 |
+
" def step(self, action):\n",
|
32 |
+
" actions = {\n",
|
33 |
+
" 0: (-1, 0), \n",
|
34 |
+
" 1: (1, 0), \n",
|
35 |
+
" 2: (0, -1), \n",
|
36 |
+
" 3: (0, 1) \n",
|
37 |
+
" }\n",
|
38 |
+
" next_state = (self.state[0] + actions[action][0],\n",
|
39 |
+
" self.state[1] + actions[action][1])\n",
|
40 |
+
"\n",
|
41 |
+
" if 0 <= next_state[0] < self.grid_size and 0 <= next_state[1] < self.grid_size:\n",
|
42 |
+
" self.state = next_state\n",
|
43 |
+
"\n",
|
44 |
+
" if self.state == self.goal_state:\n",
|
45 |
+
" return self.state, 100, True \n",
|
46 |
+
" elif self.state in self.obstacles:\n",
|
47 |
+
" return self.state, -10, False \n",
|
48 |
+
" else:\n",
|
49 |
+
" return self.state, -1, False \n",
|
50 |
+
"\n",
|
51 |
+
"env = Gridworld()\n",
|
52 |
+
"print(\"Initial State:\", env.reset())\n"
|
53 |
+
]
|
54 |
+
},
|
55 |
+
{
|
56 |
+
"cell_type": "code",
|
57 |
+
"execution_count": null,
|
58 |
+
"metadata": {},
|
59 |
+
"outputs": [],
|
60 |
+
"source": [
|
61 |
+
"# Q-Learning parameters\n",
|
62 |
+
"episodes = 500\n",
|
63 |
+
"alpha = 0.1 \n",
|
64 |
+
"gamma = 0.9 \n",
|
65 |
+
"epsilon = 0.2 \n",
|
66 |
+
"actions = [0, 1, 2, 3]\n",
|
67 |
+
"\n",
|
68 |
+
"# Initialize Q-table\n",
|
69 |
+
"Q_table = np.zeros((5, 5, len(actions)))\n",
|
70 |
+
"\n",
|
71 |
+
"# Q-Learning function\n",
|
72 |
+
"def train_gridworld(env):\n",
|
73 |
+
" for episode in range(episodes):\n",
|
74 |
+
" state = env.reset()\n",
|
75 |
+
" done = False\n",
|
76 |
+
"\n",
|
77 |
+
" while not done:\n",
|
78 |
+
" # Epsilon-greedy action selection\n",
|
79 |
+
" if np.random.uniform(0, 1) < epsilon:\n",
|
80 |
+
" action = np.random.choice(actions)\n",
|
81 |
+
" else:\n",
|
82 |
+
" action = np.argmax(Q_table[state[0], state[1], :])\n",
|
83 |
+
"\n",
|
84 |
+
" # Take action\n",
|
85 |
+
" next_state, reward, done = env.step(action)\n",
|
86 |
+
"\n",
|
87 |
+
" # Update Q-value\n",
|
88 |
+
" Q_table[state[0], state[1], action] = Q_table[state[0], state[1], action] + \\\n",
|
89 |
+
" alpha * (reward + gamma * np.max(Q_table[next_state[0], next_state[1], :]) -\n",
|
90 |
+
" Q_table[state[0], state[1], action])\n",
|
91 |
+
"\n",
|
92 |
+
" state = next_state\n",
|
93 |
+
"\n",
|
94 |
+
"train_gridworld(env)\n"
|
95 |
+
]
|
96 |
+
},
|
97 |
+
{
|
98 |
+
"cell_type": "code",
|
99 |
+
"execution_count": null,
|
100 |
+
"metadata": {},
|
101 |
+
"outputs": [
|
102 |
+
{
|
103 |
+
"name": "stdout",
|
104 |
+
"output_type": "stream",
|
105 |
+
"text": [
|
106 |
+
"['↓', '↓', '↓', '↓', '↓']\n",
|
107 |
+
"['→', '↓', '→', '→', '↓']\n",
|
108 |
+
"['→', '↓', '←', '→', '↓']\n",
|
109 |
+
"['→', '→', '↓', '→', '↓']\n",
|
110 |
+
"['→', '→', '→', '→', '↑']\n"
|
111 |
+
]
|
112 |
+
}
|
113 |
+
],
|
114 |
+
"source": [
|
115 |
+
"policy = np.argmax(Q_table, axis=2)\n",
|
116 |
+
"actions_mapping = {0: '↑', 1: '↓', 2: '←', 3: '→'}\n",
|
117 |
+
"\n",
|
118 |
+
"for row in policy:\n",
|
119 |
+
" print([actions_mapping[action] for action in row])\n"
|
120 |
+
]
|
121 |
+
},
|
122 |
+
{
|
123 |
+
"cell_type": "code",
|
124 |
+
"execution_count": null,
|
125 |
+
"metadata": {},
|
126 |
+
"outputs": [
|
127 |
+
{
|
128 |
+
"name": "stdout",
|
129 |
+
"output_type": "stream",
|
130 |
+
"text": [
|
131 |
+
"State space: Box([-1.2 -0.07], [0.6 0.07], (2,), float32)\n",
|
132 |
+
"Action space: Discrete(3)\n"
|
133 |
+
]
|
134 |
+
},
|
135 |
+
{
|
136 |
+
"data": {
|
137 |
+
"text/plain": [
|
138 |
+
"array([[[255, 255, 255],\n",
|
139 |
+
" [255, 255, 255],\n",
|
140 |
+
" [255, 255, 255],\n",
|
141 |
+
" ...,\n",
|
142 |
+
" [255, 255, 255],\n",
|
143 |
+
" [255, 255, 255],\n",
|
144 |
+
" [255, 255, 255]],\n",
|
145 |
+
"\n",
|
146 |
+
" [[255, 255, 255],\n",
|
147 |
+
" [255, 255, 255],\n",
|
148 |
+
" [255, 255, 255],\n",
|
149 |
+
" ...,\n",
|
150 |
+
" [255, 255, 255],\n",
|
151 |
+
" [255, 255, 255],\n",
|
152 |
+
" [255, 255, 255]],\n",
|
153 |
+
"\n",
|
154 |
+
" [[255, 255, 255],\n",
|
155 |
+
" [255, 255, 255],\n",
|
156 |
+
" [255, 255, 255],\n",
|
157 |
+
" ...,\n",
|
158 |
+
" [255, 255, 255],\n",
|
159 |
+
" [255, 255, 255],\n",
|
160 |
+
" [255, 255, 255]],\n",
|
161 |
+
"\n",
|
162 |
+
" ...,\n",
|
163 |
+
"\n",
|
164 |
+
" [[255, 255, 255],\n",
|
165 |
+
" [255, 255, 255],\n",
|
166 |
+
" [255, 255, 255],\n",
|
167 |
+
" ...,\n",
|
168 |
+
" [255, 255, 255],\n",
|
169 |
+
" [255, 255, 255],\n",
|
170 |
+
" [255, 255, 255]],\n",
|
171 |
+
"\n",
|
172 |
+
" [[255, 255, 255],\n",
|
173 |
+
" [255, 255, 255],\n",
|
174 |
+
" [255, 255, 255],\n",
|
175 |
+
" ...,\n",
|
176 |
+
" [255, 255, 255],\n",
|
177 |
+
" [255, 255, 255],\n",
|
178 |
+
" [255, 255, 255]],\n",
|
179 |
+
"\n",
|
180 |
+
" [[255, 255, 255],\n",
|
181 |
+
" [255, 255, 255],\n",
|
182 |
+
" [255, 255, 255],\n",
|
183 |
+
" ...,\n",
|
184 |
+
" [255, 255, 255],\n",
|
185 |
+
" [255, 255, 255],\n",
|
186 |
+
" [255, 255, 255]]], dtype=uint8)"
|
187 |
+
]
|
188 |
+
},
|
189 |
+
"execution_count": 4,
|
190 |
+
"metadata": {},
|
191 |
+
"output_type": "execute_result"
|
192 |
+
}
|
193 |
+
],
|
194 |
+
"source": [
|
195 |
+
"import gym\n",
|
196 |
+
"import matplotlib.pyplot as plt\n",
|
197 |
+
"\n",
|
198 |
+
"env = gym.make(\"MountainCar-v0\", render_mode=\"rgb_array\")\n",
|
199 |
+
"\n",
|
200 |
+
"print(\"State space:\", env.observation_space)\n",
|
201 |
+
"print(\"Action space:\", env.action_space)\n",
|
202 |
+
"\n",
|
203 |
+
"state = env.reset()\n",
|
204 |
+
"env.render()\n"
|
205 |
+
]
|
206 |
+
},
|
207 |
+
{
|
208 |
+
"cell_type": "code",
|
209 |
+
"execution_count": null,
|
210 |
+
"metadata": {},
|
211 |
+
"outputs": [
|
212 |
+
{
|
213 |
+
"name": "stderr",
|
214 |
+
"output_type": "stream",
|
215 |
+
"text": [
|
216 |
+
"C:\\Users\\moham\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\gym\\utils\\passive_env_checker.py:233: DeprecationWarning: `np.bool8` is a deprecated alias for `np.bool_`. (Deprecated NumPy 1.24)\n",
|
217 |
+
" if not isinstance(terminated, (bool, np.bool8)):\n"
|
218 |
+
]
|
219 |
+
},
|
220 |
+
{
|
221 |
+
"name": "stdout",
|
222 |
+
"output_type": "stream",
|
223 |
+
"text": [
|
224 |
+
"Model saved as 'q_learning_model.pkl'\n"
|
225 |
+
]
|
226 |
+
}
|
227 |
+
],
|
228 |
+
"source": [
|
229 |
+
"import pickle\n",
|
230 |
+
"\n",
|
231 |
+
"state_bins = [20, 20]\n",
|
232 |
+
"action_space = env.action_space.n\n",
|
233 |
+
"Q_table = np.random.uniform(low=-1, high=1, size=(state_bins[0], state_bins[1], action_space))\n",
|
234 |
+
"\n",
|
235 |
+
"def discretize_state(state):\n",
|
236 |
+
" state_low = env.observation_space.low\n",
|
237 |
+
" state_high = env.observation_space.high\n",
|
238 |
+
" bins = [np.linspace(state_low[i], state_high[i], state_bins[i]) for i in range(len(state))]\n",
|
239 |
+
" state_indices = [np.digitize(state[i], bins[i]) - 1 for i in range(len(state))]\n",
|
240 |
+
" return tuple(state_indices)\n",
|
241 |
+
"\n",
|
242 |
+
"# Initialize Q-learning parameters\n",
|
243 |
+
"alpha = 0.1\n",
|
244 |
+
"gamma = 0.99\n",
|
245 |
+
"epsilon = 0.2\n",
|
246 |
+
"episodes = 5000\n",
|
247 |
+
"epsilon_decay = 0.995\n",
|
248 |
+
"\n",
|
249 |
+
"total_rewards = []\n",
|
250 |
+
"\n",
|
251 |
+
"# Train the agent\n",
|
252 |
+
"for episode in range(episodes):\n",
|
253 |
+
" state, _ = env.reset()\n",
|
254 |
+
" state = discretize_state(state)\n",
|
255 |
+
" done = False\n",
|
256 |
+
" total_reward = 0\n",
|
257 |
+
"\n",
|
258 |
+
" while not done:\n",
|
259 |
+
" # Epsilon-greedy action selection\n",
|
260 |
+
" if np.random.uniform(0, 1) < epsilon:\n",
|
261 |
+
" action = np.random.choice(action_space)\n",
|
262 |
+
" else:\n",
|
263 |
+
" action = np.argmax(Q_table[state])\n",
|
264 |
+
"\n",
|
265 |
+
" # Take action\n",
|
266 |
+
" next_state, reward, done, _, _ = env.step(action)\n",
|
267 |
+
" next_state = discretize_state(next_state)\n",
|
268 |
+
" total_reward += reward\n",
|
269 |
+
"\n",
|
270 |
+
" # Update Q-value\n",
|
271 |
+
" Q_table[state + (action,)] += alpha * (\n",
|
272 |
+
" reward + gamma * np.max(Q_table[next_state]) - Q_table[state + (action,)]\n",
|
273 |
+
" )\n",
|
274 |
+
" state = next_state\n",
|
275 |
+
"\n",
|
276 |
+
" # Decay epsilon\n",
|
277 |
+
" epsilon = max(0.01, epsilon * epsilon_decay)\n",
|
278 |
+
"\n",
|
279 |
+
" total_rewards.append(total_reward)\n",
|
280 |
+
"\n",
|
281 |
+
"# Save the model as a .pkl file\n",
|
282 |
+
"model_data = {\n",
|
283 |
+
" \"Q_table\": Q_table,\n",
|
284 |
+
" \"state_bins\": state_bins,\n",
|
285 |
+
" \"alpha\": alpha,\n",
|
286 |
+
" \"gamma\": gamma,\n",
|
287 |
+
" \"epsilon_decay\": epsilon_decay,\n",
|
288 |
+
"}\n",
|
289 |
+
"with open(\"q_learning_model.pkl\", \"wb\") as f:\n",
|
290 |
+
" pickle.dump(model_data, f)\n",
|
291 |
+
"\n",
|
292 |
+
"print(\"Model saved as 'q_learning_model.pkl'\")\n"
|
293 |
+
]
|
294 |
+
},
|
295 |
+
{
|
296 |
+
"cell_type": "code",
|
297 |
+
"execution_count": null,
|
298 |
+
"metadata": {},
|
299 |
+
"outputs": [
|
300 |
+
{
|
301 |
+
"name": "stdout",
|
302 |
+
"output_type": "stream",
|
303 |
+
"text": [
|
304 |
+
"Total reward: -140.0\n"
|
305 |
+
]
|
306 |
+
},
|
307 |
+
{
|
308 |
+
"data": {
|
309 |
+
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAgMAAAFeCAYAAAAYIxzjAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8g+/7EAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAwIklEQVR4nO3dd3RU5aL+8Wdm0iYBISGBACGhSEsAAQExtEBUWgARBRG4ENRrQVHxqNdyztF7LcfjAbGB7dAEBARFOkoQEAuIgDSDtAASIKEkkDqTmf37wwM/C2qASXYm+/tZK2u5AjPzLJlkP/Put9gMwzAEAAAsy252AAAAYC7KAAAAFkcZAADA4igDAABYHGUAAACLowwAAGBxlAEAACyOMgAAgMVRBgAAsDjKAAAAFkcZAADA4igDAABYHGUAAACLowwAAGBx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+QOosAzD0H333ac+ffooOTmZWwNABUUZ8EM2m00REREaMmSI9uzZo88//1wej8fsWMAvFBQUaPTo0WrcuLG6d+8uh8NhdiQAv4OlhX7uwIED5+/FtmvXjk9eqBByc3M1b948Va9eXQMGDFBQUJDZkQD8AUYG/FyDBg10yy23aNGiRfriiy/MjgOooKBAixYtUmhoqHr27EkRAPwAZaASaNasmYYOHarJkydr8eLFZseBhXm9Xs2ePVtut1t9+/bVFVdcYXYkAKVAGagkmjdvrscff1ybNm3ipEOYwuv1atq0acrLy9OQIUNUvXp1syMBKCXOJqgkbDabEhISZBiGli5dquDgYDVu3Fh2O30PZa+wsFBvvfWWdu7cqUmTJikwMNDsSAAuAleKSsRms6lly5bq1q2bFi1apL179zJCgDJXUFCgZcuWqbCwUP/85z8pAoAfYjVBJfXVV19p1apVuuGGG3TNNdeYHQeVlMvl0ooVK3T8+HH179+fg4cAP8XIQCV17bXXql+/fho/frzS0tLMjoNKyDAMffzxxzp48KAGDBhAEQD8GCMDlZhhGNq2bZs++OADDR8+XE2bNmUfAvhESUmJ3n//fR06dEgPPvigwsLCzI4E4DJQBio5wzC0ZcsWrVy5UgMHDlSTJk2YVIjLkp+fr9dff105OTl65pln2EcAqAS4KlRyNptNbdu2VVJSkj7++GNt377d7EjwY3l5efr444/l9Xr18MMPUwSASoKRAQvZsmWLli1bprZt26p3795mx4GfcblcmjVrliSpb9++qlmzpsmJAPgK+wxYSOvWreV0OvXPf/5ThmGoT58+ZkeCH3n55ZcVHR2tAQMGsKEQUMkwMmAxhmFo9+7deueddzRgwAB17tyZOQT4Q0VFRXr22WeVkJCgQYMGcWsAqIQoAxZkGIYOHTqkd999Vz169FC3bt0oBLig06dP67nnnlNCQoKGDx/OhkJAJUUZsLDMzEy9/fbbatGihW6++Waz46ACMQxDx44d08yZMxUeHq5bbrlF1apVMzsWgDJCGbC4nJwcvffeeyoqKtK9997LenFIkg4ePKhXXnlFvXr1UlJSErcGgEqOMmBxhmGooKBAc+fO1eHDh/X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rWrYmJizI7k9zwejzZv3qx169Zp3759GjZsmDp16mR2LAB+jDKAMmUYhg4dOqQlS5Zo79696tSpk/r168d2xpfowIEDmjt3rlwul1q3bq3OnTtz0iCAy0YZQLkoKCjQjh07tGrVKqWnp2vs2LFq166d2bH8RmFhoaZOnaqNGzeqf//+uuaaa1SnTh3mYgDwCcoAyo1hGCoqKtLu3bs1YcIE1a1bV3fccYdiY2OZZHgBXq9XLpdLGzZs0IQJE1S/fn3dddddatKkiQICAsyOB6ASoQyg3J0rBQsWLNCMGTPUt29f9ezZU7GxsQoNDTU7num8Xq9OnDihXbt2aenSpcrPz9f999+vZs2aSRKlCYDPUQZgqu3bt+vTTz/V8ePHFRcXpzZt2qhly5aWPRExMzNTGzZs0Jdffqn8/HwNGjRInTt3Zo4FgDJFGUCFcOjQIX399dfatWuXTp06pZ49e6pXr15yOBxmRysXmZmZWrhwoTIyMlS7dm01adJEbdu2ZeMgAOWCMoAKw+PxKDs7W2lpadq0aZN27NihUaNGqW/fvqpWrZqkyjFE/vMfuf379+u1117TgQMHlJKSosTERMXGxqpq1aomJgRgNZQBVDgej0dut1snTpzQ22+/rY0bN6pp06a67777VLt2bYWEhPjlBLpzcyWKioq0detWvffeezp8+LB69eqlYcOGqUaNGkykBGAKygAqvMzMTL3++uv65ptv1KpVK7Vv317NmjVTeHi46tatW6GLwbktmo8dO6Zjx47p008/1caNGxUbG6uhQ4eqU6dOFTo/AGugDMBvuN1ubdy4UV9//bWysrKUlZWl5s2bq3nz5mrcuLHi4uLkdDrNjilJOnnypLZv364DBw4oOztbeXl5ys/PV7169dStWze1adPG7IgAcB5lAH7n3NK7LVu2nC8Fx44dU15enpxOp5KSktSqVSvFxMSUy6duwzDkdru1detWpaena+vWrSooKFB+fr4aN26stm3bqlGjRmrQoIGCg4O5DQCgwqEMwK+dO7DnzJkzOnHihObOnav8/Hzt379fubm5io+P1xVXXKEePXqoadOmql279i+W6ZX2wvzzHxOXy6Vdu3Zpz5492rVrl3bu3Kk9e/YoNjb2/Kf+evXqyel0qnr16kwGBFDhUQZQaRiGIY/HI8Mw5PV6lZubq++++06zZ8+Wy+XS0aNHdfLkSYWHh6u4uFgJCQmqWbOmqlSpoipVquj48eOKjo5WUFCQ3G633G63du7cqaCgIBUVFSkrK0vHjx9Xbm6u6tWrp/bt2yshIUEJCQlq0qSJgoKCZLfbZbfbZbPZGAEA4DcoA7AUl8ul48eP6+uvv1ZAQIA8Ho/y8/OVl5en3bt3KyIiQtWqVVNgYKACAgJ07NgxNWjQQA0bNlRUVJSioqJUvXr18xd8AKgMKAMAAFic3ewAAADAXJQBAAAsjjIAAIDFUQYAALA4ygAAABZHGQAAwOIoAwAAWBxlAAAAi6MMAABgcZQBAAAsjjIAAIDFUQYAALA4ygAAABZHGQAAwOIoAwAAWBxlAAAAi6MMAABgcZQBAAAsjjIAAIDFUQYAALA4ygAAABZHGQAAwOIoAwAAWBxlAAAAi6MMAABgcZQBAAAsjjIAAIDFUQYAALA4ygAAABZHGQAAwOIoAwAAWBxlAAAAi6MMAABgcZQBAAAsjjIAAIDFUQYAALC4/weJ1hqyIXcPWwAAAABJRU5ErkJggg==",
|
310 |
+
"text/plain": [
|
311 |
+
"<Figure size 640x480 with 1 Axes>"
|
312 |
+
]
|
313 |
+
},
|
314 |
+
"metadata": {},
|
315 |
+
"output_type": "display_data"
|
316 |
+
}
|
317 |
+
],
|
318 |
+
"source": [
|
319 |
+
"from IPython.display import display, clear_output\n",
|
320 |
+
"import time\n",
|
321 |
+
"\n",
|
322 |
+
"# Initialize environment\n",
|
323 |
+
"state, _ = env.reset()\n",
|
324 |
+
"state = discretize_state(state)\n",
|
325 |
+
"done = False\n",
|
326 |
+
"total_reward = 0\n",
|
327 |
+
"\n",
|
328 |
+
"# Test the policy\n",
|
329 |
+
"while not done:\n",
|
330 |
+
" action = np.argmax(Q_table[state])\n",
|
331 |
+
" next_state, reward, done, truncated, _ = env.step(action)\n",
|
332 |
+
" state = discretize_state(next_state)\n",
|
333 |
+
" total_reward += reward\n",
|
334 |
+
"\n",
|
335 |
+
" # Render frame\n",
|
336 |
+
" frame = env.render()\n",
|
337 |
+
" plt.imshow(frame)\n",
|
338 |
+
" plt.axis(\"off\")\n",
|
339 |
+
" display(plt.gcf())\n",
|
340 |
+
" clear_output(wait=True)\n",
|
341 |
+
" time.sleep(0.3) \n",
|
342 |
+
"\n",
|
343 |
+
"print(\"Total reward:\", total_reward)\n",
|
344 |
+
"env.close()\n"
|
345 |
+
]
|
346 |
+
}
|
347 |
+
],
|
348 |
+
"metadata": {
|
349 |
+
"kernelspec": {
|
350 |
+
"display_name": "Python 3",
|
351 |
+
"language": "python",
|
352 |
+
"name": "python3"
|
353 |
+
},
|
354 |
+
"language_info": {
|
355 |
+
"codemirror_mode": {
|
356 |
+
"name": "ipython",
|
357 |
+
"version": 3
|
358 |
+
},
|
359 |
+
"file_extension": ".py",
|
360 |
+
"mimetype": "text/x-python",
|
361 |
+
"name": "python",
|
362 |
+
"nbconvert_exporter": "python",
|
363 |
+
"pygments_lexer": "ipython3",
|
364 |
+
"version": "3.11.9"
|
365 |
+
}
|
366 |
+
},
|
367 |
+
"nbformat": 4,
|
368 |
+
"nbformat_minor": 2
|
369 |
+
}
|
q_learning_model.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:44a37cd6c4ac1ae53e49607479efdc35c6fdd0318009c4e9d2822c29ffcd10f6
|
3 |
+
size 9848
|