Skip to content
Snippets Groups Projects
Commit 9f6fe7d4 authored by Wen Yao Jin's avatar Wen Yao Jin
Browse files

go

parent ffde13e1
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -30,7 +30,7 @@ class RandomAgent():
pass
class qLearningAgent:
def __init__(self, mat, TD_lambda = 0.9, alpha = 0.5, gamma = 0.8, epsilon = 0.01):
def __init__(self, mat, TD_lambda = 0.8, alpha = 0.005, gamma = 0.8, epsilon = 0.01):
self.state_per_tile = 10
self.alpha = alpha
self.gamma = gamma
......@@ -117,7 +117,7 @@ class qLearningAgent:
v = tr.get(ind,np.zeros(len(Action)))
v[self._action_index] += 1
tr[ind] = v
# print(self.trace[0])
print(self.trace[0])
# print(np.sum(self.trace,axis=1))
pass
......
......@@ -11,7 +11,7 @@ import pickle
import time
TRAIN = 20000
TRAIN = 100000
SIZE = 500
GRID_LEN = 4
GRID_PADDING = 10
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment