def gen_features(state, id_team, id_player): Mystate = PlayerStateDeco(state, id_team, id_player) ball_pos = Mystate.ball_pos my_pos = Mystate.pos() my_goal = Mystate.my_goal his_goal = Mystate.his_goal """liste_copain=Mystate.get_copain_proche() (dist_cop_proche,idteam,idplayer)=liste_copain[1] #(dist_cop_loin,idteam,idplayer)=liste_copain[-1] liste_adv=Mystate.get_adv_proche() (dist_adv_proche,idteam,idplayer)=liste_adv[0] #(dist_adv_loin,idteam,idplayer)=liste_adv[-1] adv_autour=0 for (t1,t2,t3) in liste_adv: if(t1<15): adv_autour+=1 else: continue """ return [ ball_pos.distance(my_pos), ball_pos.distance(my_goal), ball_pos.distance(his_goal), his_goal.distance(my_pos), my_goal.distance(my_pos), ] # , dist_cop_proche, dist_adv_proche,adv_autour]
def gen_features(state,id_team,id_player): Mystate=PlayerStateDeco(state, id_team, id_player) ball_pos = Mystate.ball_pos my_pos = Mystate.pos() my_goal = Mystate.my_goal his_goal = Mystate.his_goal return [ball_pos.distance(my_pos),ball_pos.distance(my_goal),ball_pos.distance(his_goal),his_goal.distance(my_pos), my_goal.distance(my_pos)]
def compute_strategy(self, state, id_team, id_player): Mystate=PlayerStateDeco(state, id_team, id_player) return Mystate.fonceur()
def compute_strategy(self, state, id_team, id_player): Mystate=PlayerStateDeco(state, id_team, id_player) return Mystate.utilitaire()
def compute_strategy(self, state, id_team, id_player): Mystate = PlayerStateDeco(state, id_team, id_player) return Mystate.fonceur()
def compute_strategy(self, state, id_team, id_player): Mystate = PlayerStateDeco(state, id_team, id_player) return Mystate.utilitaire()
def compute_strategy(self,state,id_team,id_player): Mystate=PlayerStateDeco(state, id_team, id_player) return Mystate.jeupasse()+Mystate.demarque()