Beispiel #1
0
 def test_tree_policy(self):
     data = [(31.16,105),(52.89,153),(113.05,285),
             (6.87,44),(100.89,259),(16.5,70),(22.05,84)]
     v0 = Node(7)
     v0.update= 1000
     for i in range(7):
         child = Node(7)
         child.val, child.update = data[i]
         child.parent = v0
         v0.children[i] = child
     v0.unvisited = 0
     v_l = self.M.tree_policy(v0, self.G)
     eq_(v0.children[1], v_l.parent)    # best child is children[1]