parent
57bca16f94
commit
6237cc0d52
@ -150,6 +150,7 @@ class DQNPolicy(BasePolicy):
|
|||||||
# add eps to act
|
# add eps to act
|
||||||
if eps is None:
|
if eps is None:
|
||||||
eps = self.eps
|
eps = self.eps
|
||||||
|
if not np.isclose(eps, 0):
|
||||||
for i in range(len(q)):
|
for i in range(len(q)):
|
||||||
if np.random.rand() < eps:
|
if np.random.rand() < eps:
|
||||||
act[i] = np.random.randint(q.shape[1])
|
act[i] = np.random.randint(q.shape[1])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user