rj_gameplay.play_selector
Module Contents
Classes
Enum for representing the possession of the ball. |
|
Enum for representing where the ball is on the field. |
|
Class that represents all the heuristic information needed by the decision |
|
Play selector that returns a play and situation based on world state |
Attributes
- rj_gameplay.play_selector.POSSESS_MIN_DIST = 0.15
- rj_gameplay.play_selector.MIN_PASS_SPEED = 0.9
- rj_gameplay.play_selector.MIN_NEAR_BALL_DIST = 0.35
- class rj_gameplay.play_selector.BallPos(*args, **kwds)
Bases:
enum.Enum
Enum for representing the possession of the ball.
- OUR_BALL = 1
- FREE_BALL = 2
- THEIR_BALL = 3
- CONTEST_BALL = 4
- class rj_gameplay.play_selector.FieldLoc(*args, **kwds)
Bases:
enum.Enum
Enum for representing where the ball is on the field.
- DEFEND_SIDE = 1
- MIDFIELD = 2
- ATTACK_SIDE = 3
- class rj_gameplay.play_selector.HeuristicInformation(world_state: stp.rc.WorldState, game_info: stp.rc.GameInfo)
Class that represents all the heuristic information needed by the decision tree situation analyzer.
- __slots__ = ['ball_pos', 'field_loc', 'is_pileup']
- is_pileup: bool
- static __calc_field_loc(world_state: stp.rc.WorldState, game_info: stp.rc.GameInfo) FieldLoc
Computes the current location of the ball. :param world_state: :param game_info: :return: The current FieldLoc.
- static __calc_ball_poss(world_state: stp.rc.WorldState, game_info: stp.rc.GameInfo) BallPos
Computes the current ball possession. :param world_state: :param game_info: :return: The current BallPos.
- static __calc_pileup(world_state: stp.rc.WorldState, game_info: stp.rc.GameInfo) bool
Computes whether there is a pileup or not. :param world_state: :param game_info: :return: The current BallPos.
- class rj_gameplay.play_selector.PlaySelector
Bases:
stp.situation.IPlaySelector
Play selector that returns a play and situation based on world state (see select method)
- select(world_state: stp.rc.WorldState) Tuple[stp.situation.ISituation | None, stp.play.IPlay]
Returns the best situation and play for the current world state based on a hardcoded decision tree. :param world_state: The current state of the world. :param game_info: The information about the state of the game. :return: The best situation for the current world state.
- static __analyze_restart(world_state: stp.rc.WorldState, heuristics: HeuristicInformation) stp.situation.ISituation
- __repr__()
returns the string with the current situation.