コード例 #1
0
 def __init__(self, module, *args, **kwargs):
     RandomCapturePlayer.__init__(self, *args, **kwargs)
     self.module = module
     if self.greedySelection:
         self.temperature = 0.
コード例 #2
0
ファイル: nonsuicide.py プロジェクト: HKou/pybrain
 def getAction(self):
     p = self.game.getAcceptable(self.color)
     if len(p) > 0:            
         return [self.color, choice(p)]
     else:
         return RandomCapturePlayer.getAction(self)
コード例 #3
0
 def __init__(self, module, *args, **kwargs):
     RandomCapturePlayer.__init__(self, *args, **kwargs)
     self.module = module
     if self.greedySelection:
         self.temperature = 0.
コード例 #4
0
 def getAction(self):
     p = self.game.getAcceptable(self.color)
     if len(p) > 0:
         return [self.color, choice(p)]
     else:
         return RandomCapturePlayer.getAction(self)