From c4ff7832ef349088400a6a48b3f07c0ad0060994 Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Fri, 15 Apr 2022 17:20:15 +0200 Subject: [PATCH] Less edge activation --- vacuumDecay.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vacuumDecay.py b/vacuumDecay.py index 930d78e..93f41bb 100644 --- a/vacuumDecay.py +++ b/vacuumDecay.py @@ -326,13 +326,13 @@ class Node(): return -1 return self.state.checkWin() - def _activateEdge(self): + def _activateEdge(self, dist=0): if not self.strongScoresAvaible(): self.universe.newOpen(self) else: for c in self.childs: - if c._cascadeMemory > 0.0001: - c._activateEdge() + if c._cascadeMemory > 0.001*dist or random.random()<0.01: + c._activateEdge(dist=dist+1) def __str__(self): s = []