Skip to content

Commit

Permalink
minor changes to Iron
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexsandr0x committed Feb 26, 2021
1 parent 18e13ba commit 284ed30
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions entities/coach/MuricyCoach.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ def __init__(self, match):
self.constraints = [
#estratégia - função eleitora - robot_id
(strategy.larc2020.GoalKeeper(self.match), self.elect_goalkeeper, 0),
(strategy.larc2020.Attacker(self.match), self.elect_attacker, 0),
(strategy.larc2020.MidFielder(self.match), self.elect_midfielder, 0)
(strategy.larc2020.Attacker(self.match, ctr_kwargs={'l': 0.175}), self.elect_attacker, 0),
(strategy.larc2020.MidFielder(self.match, ctr_kwargs={'l': 0.175}), self.elect_midfielder, 0)
]

self.avoid_strategy = strategy.iron2021.Avoid(self.match)
Expand Down
6 changes: 3 additions & 3 deletions strategy/larc2020/Attacker.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ def point_in_rect(point,rect):
return False

class Attacker(Strategy):
def __init__(self, match, plot_field=False, name="attacker"):
super().__init__(match, name)
def __init__(self, match, plot_field=False, name="attacker", ctr_kwargs={'l': 0.185}):
super().__init__(match, name, controller_kwargs=ctr_kwargs)

"""
Ambiente para rascunhar novas estrategias com
Expand Down Expand Up @@ -509,7 +509,7 @@ def decide(self):
que preferir e no final atribua algum dos comportamentos a variavel behaviour
"""
ball = [self.match.ball.x, self.match.ball.y]
of_goal_area = [1.30, 0.30, 0.30, 0.70]
of_goal_area = [1.30, 0.30, 0.20, 0.70]
goal_area = [-0.05, 0.30, 0.20, 0.70]

min_angle_ball_to_goal = -math.atan2((self.match.ball.y - 0.55), (self.match.ball.x - 0.75*2))
Expand Down
4 changes: 2 additions & 2 deletions strategy/larc2020/GoalKeeper.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ def proj_goaline(pos_ball, speed_ball):
return res

class GoalKeeper(Strategy):
def __init__(self, match, plot_field=False):
def __init__(self, match, plot_field=False, ctr_kwargs={'l': 0.185}):
super().__init__(
match, "goalkeeper")
match, "goalkeeper", controller_kwargs=ctr_kwargs)

"""
Essa estrategia descreve a um goleiro base, simples, que
Expand Down
4 changes: 2 additions & 2 deletions strategy/larc2020/MidFielder.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ def point_in_rect(point,rect):
return False

class MidFielder(Strategy):
def __init__(self, match, plot_field=False):
super().__init__(match, "midfielder")
def __init__(self, match, plot_field=False, ctr_kwargs={'l': 0.185}):
super().__init__(match, "midfielder", controller_kwargs=ctr_kwargs)

"""
Essa estrategia descreve a um goleiro base, simples, que
Expand Down

0 comments on commit 284ed30

Please sign in to comment.