Less edge activation
This commit is contained in:
+3
-3
@@ -326,13 +326,13 @@ class Node():
|
|||||||
return -1
|
return -1
|
||||||
return self.state.checkWin()
|
return self.state.checkWin()
|
||||||
|
|
||||||
def _activateEdge(self):
|
def _activateEdge(self, dist=0):
|
||||||
if not self.strongScoresAvaible():
|
if not self.strongScoresAvaible():
|
||||||
self.universe.newOpen(self)
|
self.universe.newOpen(self)
|
||||||
else:
|
else:
|
||||||
for c in self.childs:
|
for c in self.childs:
|
||||||
if c._cascadeMemory > 0.0001:
|
if c._cascadeMemory > 0.001*dist or random.random()<0.01:
|
||||||
c._activateEdge()
|
c._activateEdge(dist=dist+1)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
s = []
|
s = []
|
||||||
|
|||||||
Reference in New Issue
Block a user