本文整理汇总了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)
示例2: main
# 需要导入模块: from Game import Game [as 别名]
# 或者: from Game.Game import playGame [as 别名]
def main():
game = Game()
print('main')
game.playGame()
示例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()
示例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())