Closed LC-John closed 5 years ago
Thanks @LC-John for your notice. However, I believe this does not produce any problem. In Python 3, the variables created within the list comprehension will be distinct from the loop iteration variable even though they have the same name. ex:
for i in range(5):
print(i,[i*i for i in range(2*i+1)])
will print: 0 [0] 1 [0, 1, 4] 2 [0, 1, 4, 9, 16] 3 [0, 1, 4, 9, 16, 25, 36] 4 [0, 1, 4, 9, 16, 25, 36, 49, 64]
In attack method, the iteration index "i" is used when generating "childs", which I believe may cause some iteration bugs... `for i in range(self.max_iters):
print(i)