Skip to content

Commit 70a08d4

Browse files
committed
fix image
1 parent 52ffa96 commit 70a08d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contents/1_command_line_reinforcement_learning/treasure_on_right.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def choose_action(state, q_table):
3737
if (np.random.uniform() > EPSILON) or (state_actions.all() == 0): # act non-greedy or state-action have no value
3838
action_name = np.random.choice(ACTIONS)
3939
else: # act greedy
40-
action_name = state_actions.argmax()
40+
action_name = state_actions.idxmax() # replace argmax to idxmax as argmax means a different function in newer version of pandas
4141
return action_name
4242

4343

0 commit comments

Comments
 (0)