Skip to content
This repository was archived by the owner on May 18, 2023. It is now read-only.

Commit 2dd917c

Browse files
committed
unhashable type: 'list'
1 parent 47652c3 commit 2dd917c

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed
5 Bytes
Binary file not shown.

Project4/nim/nim.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def update_q_value(self, state, action, old_q, reward, future_rewards):
118118
`alpha` is the learning rate, and `new value estimate`
119119
is the sum of the current reward and estimated future rewards.
120120
"""
121-
self.q[state, action] = old_q + self.alpha * (reward + future_rewards - old_q)
121+
self.q[(tuple(state), tuple(action))] = old_q + self.alpha * (reward + future_rewards - old_q)
122122

123123
def best_future_reward(self, state):
124124
"""

0 commit comments

Comments
 (0)