本文整理汇总了Python中soccersimulator.BaseStrategy.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python BaseStrategy.__init__方法的具体用法?Python BaseStrategy.__init__怎么用?Python BaseStrategy.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类soccersimulator.BaseStrategy
的用法示例。
在下文中一共展示了BaseStrategy.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from soccersimulator import BaseStrategy [as 别名]
# 或者: from soccersimulator.BaseStrategy import __init__ [as 别名]
def __init__(self):
BaseStrategy.__init__(self, "QStrategy")
try:
f=open('dico.pkl','rb')
self.qlearn=cPickle.load(f)
f.close()
except IOError:
self.qlearn=None
示例2: __init__
# 需要导入模块: from soccersimulator import BaseStrategy [as 别名]
# 或者: from soccersimulator.BaseStrategy import __init__ [as 别名]
def __init__(self,state,id_team,id_player):
AS.__init__(self,"PassStrategy")
self.state=state
self.id_team=id_team
self.id_player=id_player
if id_team==1:
self._autre=2
elif id_team==2:
self._autre=1
self.moi=self.config=state.player(id_team,id_player)
self.ma_position=self.moi.position
self.ma_vitesse=self.moi.vitesse
self.can_shoot=0
示例3: __init__
# 需要导入模块: from soccersimulator import BaseStrategy [as 别名]
# 或者: from soccersimulator.BaseStrategy import __init__ [as 别名]
def __init__(self,id_team,id_player,state,clever):
AS.__init__(self,"goal_one_to_one")
self.va_au_goal=1
self.id_team=id_team
self.id_player=id_player
self.player=0
if id_team==1:
self.goal=GOAL1
self.sens=T2_SENS
self.autre=2
elif id_team==2:
self.goal=GOAL2
self.sens=T2_SENS
self.autre=1
self.clever=clever
self.config=state.player(id_team,id_player)
self.state=state
self.ball=state.ball.position
self.goal_zone=self.goal + V2D(ZONE_GOAL*self.sens,0)
self.autre_player=state.player(self.autre,self.player)
示例4: __init__
# 需要导入模块: from soccersimulator import BaseStrategy [as 别名]
# 或者: from soccersimulator.BaseStrategy import __init__ [as 别名]
def __init__(self):
AS.__init__(self, "Fonceur")
示例5: __init__
# 需要导入模块: from soccersimulator import BaseStrategy [as 别名]
# 或者: from soccersimulator.BaseStrategy import __init__ [as 别名]
def __init__(self):
BaseStrategy.__init__(self,"Defenseur")
示例6: __init__
# 需要导入模块: from soccersimulator import BaseStrategy [as 别名]
# 或者: from soccersimulator.BaseStrategy import __init__ [as 别名]
def __init__(self,tree,dic,gen_feat):
BaseStrategy.__init__(self,"Tree Strategy")
self.dic = dic
self.tree = tree
self.gen_feat= gen_feat
示例7: __init__
# 需要导入模块: from soccersimulator import BaseStrategy [as 别名]
# 或者: from soccersimulator.BaseStrategy import __init__ [as 别名]
def __init__(self):
BaseStrategy.__init__(self, "Drible")
示例8: __init__
# 需要导入模块: from soccersimulator import BaseStrategy [as 别名]
# 或者: from soccersimulator.BaseStrategy import __init__ [as 别名]
def __init__(self,name="ma strategie"):
BaseStrategy.__init__(self,name)
示例9: __init__
# 需要导入模块: from soccersimulator import BaseStrategy [as 别名]
# 或者: from soccersimulator.BaseStrategy import __init__ [as 别名]
def __init__(self):
AS.__init__(self,"ia")
示例10: __init__
# 需要导入模块: from soccersimulator import BaseStrategy [as 别名]
# 或者: from soccersimulator.BaseStrategy import __init__ [as 别名]
def __init__(self):
BaseStrategy.__init__(self,"Campeur")
示例11: __init__
# 需要导入模块: from soccersimulator import BaseStrategy [as 别名]
# 或者: from soccersimulator.BaseStrategy import __init__ [as 别名]
def __init__(self,comportement):
BaseStrategy.__init__(self,comportement.__name__)
self.comportement = comportement
示例12: __init__
# 需要导入模块: from soccersimulator import BaseStrategy [as 别名]
# 或者: from soccersimulator.BaseStrategy import __init__ [as 别名]
def __init__(self):
BaseStrategy.__init__(self, "")
示例13: __init__
# 需要导入模块: from soccersimulator import BaseStrategy [as 别名]
# 或者: from soccersimulator.BaseStrategy import __init__ [as 别名]
def __init__(self,fichier):
BaseStrategy.__init__(self,"Monte_Carlo")
#on initialise L'IA avec le dictionnaire stoquer dans dico_apprentissage
self.dico = ouvre_dico(fichier)
示例14: __init__
# 需要导入模块: from soccersimulator import BaseStrategy [as 别名]
# 或者: from soccersimulator.BaseStrategy import __init__ [as 别名]
def __init__(self, decid):
BaseStrategy.__init__(self,decid.__name__)
self.decideur = decid
self.info = dict()
示例15: __init__
# 需要导入模块: from soccersimulator import BaseStrategy [as 别名]
# 或者: from soccersimulator.BaseStrategy import __init__ [as 别名]
def __init__(self, sous_strat):
BaseStrategy.__init__(self, sous_strat.__name__)
self.strat = sous_strat