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


Python Simulation.simulateOld方法代码示例

本文整理汇总了Python中Simulation.simulateOld方法的典型用法代码示例。如果您正苦于以下问题:Python Simulation.simulateOld方法的具体用法?Python Simulation.simulateOld怎么用?Python Simulation.simulateOld使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Simulation的用法示例。


在下文中一共展示了Simulation.simulateOld方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: handlePerformedActionShow

# 需要导入模块: import Simulation [as 别名]
# 或者: from Simulation import simulateOld [as 别名]
def handlePerformedActionShow(words, writeFile):
    global opponentName
    global numBoardCards
    global preflopBets
    global postflopBets
    global turnBets
    global riverBets
    global boardCards
    global d

    if(words[5] == opponentName):
        opponentHand = []
        for card in words[1:5]:
            opponentHand.append(parseCard(card))
        preflopRating = Pokerini.pokeriniLookup(opponentHand, d)
        writeFile.write(str(preflopRating)+","+','.join(preflopBets))
        writeFile.write('\n')
        if(numBoardCards >= 3):
            postflopRanking = Simulation.simulateOld(opponentHand, boardCards[0:3], 3, 100)
            writeFile.write(str(postflopRanking)+","+','.join(postflopBets))
            writeFile.write('\n')
        if(numBoardCards >= 4):
            turnRanking = Simulation.simulateOld(opponentHand, boardCards[0:4], 4, 100)
            writeFile.write(str(turnRanking)+","+','.join(turnBets))
            writeFile.write('\n')
        if(numBoardCards == 5):
            riverRanking = Simulation.simulateOld(opponentHand, boardCards[0:5], 5, 100)
            writeFile.write(str(riverRanking)+","+','.join(riverBets))
            writeFile.write('\n')
开发者ID:majolo,项目名称:Pokerbots-IAP-2016,代码行数:31,代码来源:extractBetVWinchance.py

示例2: updateHandRanking

# 需要导入模块: import Simulation [as 别名]
# 或者: from Simulation import simulateOld [as 别名]
 def updateHandRanking(self):
     if(self.cardsChanged == True):
         if(self.numBoardCards == 0): #preflop
             self.pokeriniRank = Pokerini.pokeriniLookup(self.myHand, pokeriniDict)
             self.calculatePreflopBetLimit()
         if(self.numBoardCards >= 3):#postflop
             #self.simulationWinChance = Simulation.simulate(self.myHand, self.boardCards, self.numBoardCards, 200, handEvalDict, translationDict)
             self.simulationWinChance = Simulation.simulateOld(self.myHand, self.boardCards, self.numBoardCards, self.numSimulations)
     self.cardsChanged = False
开发者ID:majolo,项目名称:Pokerbots-IAP-2016,代码行数:11,代码来源:Player.py


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