Skip to content

Commit e8971b3

Browse files
committed
fix dqn
1 parent 9969539 commit e8971b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

example/tutorial_frozenlake_dqn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def to_one_hot(i, n_classes=None):
8383
## Obtain maxQ' and set our target value for chosen action.
8484
maxQ1 = np.max(Q1)
8585
targetQ = allQ
86-
# targetQ[0, a[0]] = r + lambd * maxQ1
86+
targetQ[0, a[0]] = r + lambd * maxQ1
8787
# targetQ[0, a[0]] = targetQ[0, a[0]] + alpha * (r + lambd * maxQ1 - targetQ[0, a[0]])
8888
## Train network using target and predicted Q values
8989
_ = sess.run(train_op, {inputs : [to_one_hot(s, 16)], nextQ : targetQ})

0 commit comments

Comments
 (0)