From b6faca3d77a83c5476d129e223375b0e155f553d Mon Sep 17 00:00:00 2001 From: okellycode <33599895+okellycode@users.noreply.github.com> Date: Thu, 23 Nov 2017 17:48:12 +0800 Subject: [PATCH] bug fix --- deep_q_network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deep_q_network.py b/deep_q_network.py index 1294f96..f6a9ee8 100755 --- a/deep_q_network.py +++ b/deep_q_network.py @@ -123,7 +123,7 @@ def trainNetwork(s, readout, h_fc1, sess): if random.random() <= epsilon: print("----------Random Action----------") action_index = random.randrange(ACTIONS) - a_t[random.randrange(ACTIONS)] = 1 + a_t[action_index] = 1 else: action_index = np.argmax(readout_t) a_t[action_index] = 1