rj_gameplay.tactic.clear_tactic

Module Contents

Classes

ClearerCost

A cost function for how to choose a robot that will clears

Clear

A passing tactic which captures then passes the ball

class rj_gameplay.tactic.clear_tactic.ClearerCost

Bases: stp.role.CostFn

A cost function for how to choose a robot that will clears

__call__(self, robot: stp.rc.Robot, prev_result: Optional[stp.role.RoleResult], world_state: stp.rc.WorldState) float
unassigned_cost_fn(self, prev_result: Optional[stp.role.RoleResult], world_state: stp.rc.WorldState) float
class rj_gameplay.tactic.clear_tactic.Clear(target_point: numpy.ndarray, kick_speed=3.0, chip=False)

Bases: stp.tactic.ITactic

A passing tactic which captures then passes the ball

compute_props(self)
create_request(self, **kwargs) stp.role.RoleRequest

Creates a sane default RoleRequest. :return: A list of size 1 of a sane default RoleRequest.

get_requests(self, world_state: stp.rc.WorldState, props) List[stp.tactic.RoleRequests]

Checks if we have the ball and returns the proper request :return: A list of size 2 of role requests

tick(self, world_state: stp.rc.WorldState, role_results: stp.tactic.RoleResults) List[stp.tactic.SkillEntry]
Returns

A list of size 1 or 2 skills depending on which roles are filled and state of aiming

TODO: Come up with better timings for starting receive

is_done(self, world_state: stp.rc.WorldState)