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


Python Game.playGame方法代码示例

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


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

示例1: _play_6_game_Types

# 需要导入模块: from Game import Game [as 别名]
# 或者: from Game.Game import playGame [as 别名]
 def _play_6_game_Types(self,player_1_type,player_2_type):
     players = [Player(player_1_type,player_number=0),Player(player_2_type,player_number=1)]   
     game = Game(players)
     
     game_results = []
     game_results.append(game.playGame(game_type=0))
     game_results.append(game.playGame(game_type=1))
     game_results.append(game.playGame(game_type=2))
     # Repeat the beta game for better statistical accuracy
     for _ in range(0,30):
         game_results.append(game.playGame(game_type=3))
         game_results.append(game.playGame(game_type=4))
         game_results.append(game.playGame(game_type=5))
     self._add_data_to_csv(game_results,game)
开发者ID:ryan-dd,项目名称:prisoners-dilemma-simulator,代码行数:16,代码来源:Simulator.py

示例2: main

# 需要导入模块: from Game import Game [as 别名]
# 或者: from Game.Game import playGame [as 别名]
def main():
    game = Game()
    print('main')
    game.playGame()
开发者ID:carloserodriguez2000,项目名称:RockSpockOOGame,代码行数:6,代码来源:test.py

示例3: open

# 需要导入模块: from Game import Game [as 别名]
# 或者: from Game.Game import playGame [as 别名]
import numpy.random as random
from Game import Game

report = open('output.o', 'w')

data = {}

size = 50
while size < 60:

        size += 10
        data[size] = []
        for i in range(0, 5):

                density = 1
                if  0.1 * size > 7:
                        density = 7.0 / (density * 0.1)

                limit = 0.2 
                g = Game(size, density, limit, 0.3, 0.1)
                steps = g.playGame()
                data[size].append(steps)

report.write(str(data))

report.close()

开发者ID:hooshmandshr,项目名称:Curation_Game,代码行数:28,代码来源:Simulate_ConstantDegree.py

示例4: Game

# 需要导入模块: from Game import Game [as 别名]
# 或者: from Game.Game import playGame [as 别名]
import numpy.random as random
from Game import Game


g = Game()
g.playGame()
#g.pureNash()

'''
print "Intrinsic content values:"
print g.Value
print '\n'

print "Potential Gain of publishing contents:"
g.updateGain
print g.Gain
print '\n'


R = g.readers()
P = g.publishers()
C = g.contents()

print "Edges:"
print g.Graph.edges()
print '\n'

print "Contents:\t" + str(g.contents())
print "Publishers:\t" + str(g.publishers())
print "Readers:\t" + str(g.readers())
开发者ID:hooshmandshr,项目名称:Curation_Game,代码行数:32,代码来源:Simulate.py


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