From 3434416c6130cbb6fa1d7f49d3eeb1b0ec85d70c Mon Sep 17 00:00:00 2001 From: Felipe Marcelino Date: Sat, 15 Sep 2018 14:02:52 -0300 Subject: [PATCH] Fix the indexes left and right child inside get leaf in SumTree --- ...om (+ double DQNs and Prioritized Experience Replay).ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dueling Double DQN with PER and fixed-q targets/Dueling Deep Q Learning with Doom (+ double DQNs and Prioritized Experience Replay).ipynb b/Dueling Double DQN with PER and fixed-q targets/Dueling Deep Q Learning with Doom (+ double DQNs and Prioritized Experience Replay).ipynb index e4001bf..aea24d2 100644 --- a/Dueling Double DQN with PER and fixed-q targets/Dueling Deep Q Learning with Doom (+ double DQNs and Prioritized Experience Replay).ipynb +++ b/Dueling Double DQN with PER and fixed-q targets/Dueling Deep Q Learning with Doom (+ double DQNs and Prioritized Experience Replay).ipynb @@ -665,8 +665,8 @@ " parent_index = 0\n", " \n", " while True: # the while loop is faster than the method in the reference code\n", - " left_child_index = 2 * parent_index + 1\n", - " right_child_index = left_child_index + 1\n", + " right_child_index = 2 * parent_index + 1\n", + " left_child_index = left_child_index + 1\n", " \n", " # If we reach bottom, end the search\n", " if left_child_index >= len(self.tree):\n",