GT RoboCup SSL
Soccer software, robot firmware
gameplay.plays.offense.adaptive_formation.AdaptiveFormation Class Reference

Classes

class  State
 

Public Member Functions

def __init__ (self)
 
def score (cls)
 
def should_pass_from_dribble (self)
 
def should_shoot_from_dribble (self)
 
def should_clear_from_dribble (self)
 
def dribbler_has_ball (self)
 
def on_enter_collecting (self)
 
def on_exit_collecting (self)
 
def on_enter_dribbling (self)
 
def execute_dribbling (self)
 
def on_exit_dribbling (self)
 
def on_enter_shooting (self)
 
def on_exit_shooting (self)
 
def on_enter_clearing (self)
 
def on_exit_clearing (self)
 
def on_enter_passing (self)
 
def on_exit_passing (self)
 
- Public Member Functions inherited from gameplay.standard_play.StandardPlay
def __init__ (self, continuous)
 
def use_standard_defense (self)
 
def execute_running (self)
 
def handles_goalie (cls)
 
- Public Member Functions inherited from gameplay.play.Play
def __init__ (self, continuous)
 
def score (cls)
 Used to determine when to run a play Return float("inf") if the play cannot be used or a score (lower is better) used to select the best play. More...
 
def is_restart (cls)
 
def handles_goalie (cls)
 Override to opt-in to handling the Goalie By default, the root play allocates and runs the goalie behavior and the play handles the rest of the bots. More...
 
def run_during_stopped (cls)
 Override to allow a play to run during the stopped state This is reserved only for very special plays that need to run during the stopped state. More...
 
- Public Member Functions inherited from gameplay.composite_behavior.CompositeBehavior
def __init__
 
def add_subbehavior
 
def remove_subbehavior
 
def has_subbehavior_with_name
 
def has_subbehaviors (self)
 
def subbehavior_with_name
 
def subbehaviors_by_name (self)
 
def remove_all_subbehaviors (self)
 
def all_subbehaviors (self)
 Returns a list of all subbehaviors.
 
def all_subbehaviors_completed (self)
 
def spin (self)
 Override StateMachine.spin() so we can call spin() on subbehaviors.
 
def handle_subbehavior_exception (self, name, exception)
 Override point for exception handling this is called whenever a subbehavior throws an exception during spin() subclasses of CompositeBehavior can override this to perform custom actions, such as removing the offending subbehavior the default implementation logs the exception and re-raises it.
 
def role_requirements (self)
 returns a tree of role_requirements
 
def assign_roles (self, assignments)
 
def __str__ (self)
 
- Public Member Functions inherited from gameplay.behavior.Behavior
def __init__
 
def add_state (self, state, parent_state=None)
 
def is_done_running (self)
 
def terminate (self)
 Transitions the Behavior into a terminal state (either completed or cancelled)
 
def behavior_state (self)
 returns a state in Behavior.State that represents what the behaviors is doing use this instead of the property if you want to avoid dealing with custom subclass substates
 
def is_continuous (self)
 The Behavior's termination behavior noncontinuous: a behavior that accomplishes a specific task, then completes (example: shooting at the goal) continuous: a behavior that continually runs until told to stop (example: zone defense)
 
def __str__ (self)
 
def role_requirements (self)
 Returns a tree of RoleRequirements keyed by subbehavior reference name This is used by the dynamic role assignment system to intelligently select which robot will run which behavior.
 
def assign_roles (self, assignments)
 assignments is a tree of (RoleRequirements, OurRobot) tuples Same tree structure as the role_requirements() return value, but tuples instead of RoleRequirements as leaf nodes
 
- Public Member Functions inherited from gameplay.fsm.StateMachine
def __init__ (self, start_state)
 
def start_state (self)
 
def restart (self)
 Resets the FSM back into the start state.
 
def add_state (self, state, parent_state=None)
 Registers a new state (which can optionally be a substate of an existing state)
 
def spin (self)
 Runs the FSM checks transition conditions for all edges leading away from the current state if one evaluates to true, we transition to it if more than one evaluates to true, we throw a RuntimeError.
 
def add_transition
 
def transition (self, new_state)
 
def is_in_state (self, state)
 
def state_is_substate (self, state, possible_parent)
 
def corresponding_ancestor_state (self, ancestors)
 
def ancestors_of_state (self, state)
 
def as_graphviz (self)
 
def write_diagram_png
 
def state (self)
 

Public Attributes

 dribbler
 
 dribble_start_pt
 
 kick
 
 midfielders
 
 shot_chance
 
 pass_score
 
 prev_shot_chance
 
 prev_pass_score
 
 check_dribbling_timer
 
 check_dribbling_timer_cutoff
 
 kick_eval
 

Static Public Attributes

float DRIBBLE_TO_PASS_CUTOFF = 0.1
 
float DRIBBLE_TO_SHOOT_CUTOFF = 0.03
 
int MAX_DRIBBLE_DIST = 1 * .9
 
int MIN_PASS_DIST = .2
 
int CLEAR_FIELD_CUTOFF = constants.Field.Length * .2
 
int CLEAR_DISTANCE_CUTOFF = constants.Field.Length * .1
 
float INCREASING_CHANCE_CUTOFF = 0.05
 
tuple FIELD_POS_WEIGHTS = (0.01, 3, 0.02)
 
tuple PASSING_WEIGHTS = (2, 2, 15, 1)
 
tuple DRIBBLING_WEIGHTS = (4, 2, 15, 1)
 
tuple CHIP_FIELD_POS_WEIGHTS = (0.1, .2, 0.02)
 
tuple CHIP_PASS_WEIGHTS = (2, 10, 0, 10)
 
tuple NELDER_MEAD_ARGS
 
+ Inheritance diagram for gameplay.plays.offense.adaptive_formation.AdaptiveFormation:
+ Collaboration diagram for gameplay.plays.offense.adaptive_formation.AdaptiveFormation:

Member Data Documentation

◆ NELDER_MEAD_ARGS

tuple gameplay.plays.offense.adaptive_formation.AdaptiveFormation.NELDER_MEAD_ARGS
static
Initial value:
= (robocup.Point(0.5, 2), \
robocup.Point(0.01, 0.01), 1, 2, \
0.75, 0.5, 50, 1, 0.1)

The documentation for this class was generated from the following file: