當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。