当前位置: 首页>>代码示例>>Python>>正文


Python brain.Brain方法代码示例

本文整理汇总了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 
开发者ID:ActiveState,项目名称:neuroblast,代码行数:21,代码来源:gamestates.py

示例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 
开发者ID:wzpan,项目名称:dingdang-robot,代码行数:10,代码来源:conversation.py

示例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) 
开发者ID:jessy-project,项目名称:jessy,代码行数:8,代码来源:conversation.py

示例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) 
开发者ID:mattcurrycom,项目名称:jasper-modules,代码行数:9,代码来源:conversation.py

示例5: __init__

# 需要导入模块: import brain [as 别名]
# 或者: from brain import Brain [as 别名]
def __init__(self):
        self.brain = Brain() 
开发者ID:skcript,项目名称:colordream,代码行数:4,代码来源:__init__.py

示例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 
开发者ID:Master76,项目名称:snake-master,代码行数:11,代码来源:agent.py


注:本文中的brain.Brain方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。