本文整理匯總了Python中brain.Brain方法的典型用法代碼示例。如果您正苦於以下問題:Python brain.Brain方法的具體用法?Python brain.Brain怎麽用?Python brain.Brain使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類brain
的用法示例。
在下文中一共展示了brain.Brain方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
# 需要導入模塊: import brain [as 別名]
# 或者: from brain import Brain [as 別名]
def __init__(self, trainingMode):
if utils.trainedBrain:
self.brain = utils.trainedBrain
else:
self.brain = Brain()
self.enemyspeed = 16
self.enemyBullets = pygame.sprite.Group()
self.userBullets = pygame.sprite.Group()
self.userGroup = pygame.sprite.Group()
self.enemies = pygame.sprite.Group()
self.player = Player(self.userBullets)
self.enemy = Enemy(self.enemyBullets, self.brain,self.enemyspeed)
self.userGroup.add(self.player)
self.enemies.add(self.enemy)
self.player.lives = 3
self.score = 0
self.spawntimer = 0
self.spawnbreak = 8
self.trainingMode = trainingMode
示例2: __init__
# 需要導入模塊: import brain [as 別名]
# 或者: from brain import Brain [as 別名]
def __init__(self, persona, mic, profile):
self._logger = logging.getLogger(__name__)
self.persona = persona
self.mic = mic
self.profile = profile
self.brain = Brain(mic, profile)
self.notifier = Notifier(profile, self.brain)
self.wxbot = None
示例3: __init__
# 需要導入模塊: import brain [as 別名]
# 或者: from brain import Brain [as 別名]
def __init__(self, persona, mic, profile):
self._logger = logging.getLogger(__name__)
self.persona = persona
self.mic = mic
self.profile = profile
self.brain = Brain(mic, profile)
示例4: __init__
# 需要導入模塊: import brain [as 別名]
# 或者: from brain import Brain [as 別名]
def __init__(self, persona, mic, profile):
self._logger = logging.getLogger(__name__)
self.persona = persona
self.mic = mic
self.profile = profile
self.brain = Brain(mic, profile)
self.notifier = Notifier(profile)
示例5: __init__
# 需要導入模塊: import brain [as 別名]
# 或者: from brain import Brain [as 別名]
def __init__(self):
self.brain = Brain()
示例6: __init__
# 需要導入模塊: import brain [as 別名]
# 或者: from brain import Brain [as 別名]
def __init__(self, input_shape, action_count, steps=0, model_path=None, learning_rate=None):
if learning_rate is not None:
SET_LEARNING_RATE(learning_rate)
self.steps = steps
self.epsilon = MAX_EPSILON if steps == 0 else self.__calc_epsilon(steps)
self.brain = Brain(action_count, input_shape=input_shape, model_path=model_path)
self.memory = Memory(MEMORY_CAPACITY)
self.input_shape = input_shape
self.action_count = action_count