本文整理汇总了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