Exemplo n.º 1
0
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]
Exemplo n.º 2
0
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)]
Exemplo n.º 3
0
 def compute_strategy(self, state, id_team, id_player):
     Mystate=PlayerStateDeco(state, id_team, id_player)
     return Mystate.fonceur()
Exemplo n.º 4
0
 def compute_strategy(self, state, id_team, id_player):
     Mystate=PlayerStateDeco(state, id_team, id_player)
     return Mystate.utilitaire()
Exemplo n.º 5
0
 def compute_strategy(self, state, id_team, id_player):
     Mystate = PlayerStateDeco(state, id_team, id_player)
     return Mystate.fonceur()
Exemplo n.º 6
0
 def compute_strategy(self, state, id_team, id_player):
     Mystate = PlayerStateDeco(state, id_team, id_player)
     return Mystate.utilitaire()
Exemplo n.º 7
0
	def compute_strategy(self,state,id_team,id_player):
		Mystate=PlayerStateDeco(state, id_team, id_player)
		return Mystate.jeupasse()+Mystate.demarque()