<commit_before>import composite_behavior
import evaluation
import behavior
import constants
import robocup
import main
import enum
import math
import skills.move


# This tactic builds a wall a certain distance from point A, blocking point B.
class Wall(composite_behavior.CompositeBehavior):
    class State(enum.Enum):
        defense_wall = 1
        shot = 2
        scramble = 3

    def __init__(
            self,
            num_defenders=3,  # number of defenders we're making the wall with (default 3)
            curvature=0,  # 'curvature' (in radians) of the wall 
            mark_point=None,  # what point we are defending against (default is ball)
            defender_point=robocup.Point(
                0, 0),  # what point we are defending (default is goal)
            defender_spacing=3.5,  # number of robot radii between the centers of the defenders in the wall
            dist_from_mark=1,  # distance from the mark point we want to build the wall
            defender_priorities=[20, 19, 18, 17, 16]
    ):  # default defense priorities                       
        super().__init__(continuous=True)

        is_ball_free = lambda: main.ball().vel.mag() < 1 and min([(main.ball(
        ).pos - rob.pos).mag() for rob in main.system_state(
        ).their_robots]) > min([(main.ball().pos - rob.pos).mag()
                                for rob in main.system_state().our_robots])

        self.mark_moved = False
        self.active_defenders = num_defenders
        self.number_of_defenders = num_defenders
        self.curvature = 1 * curvature<commit_msg>revert changes to wall<commit_after>import composite_behavior
import evaluation
import behavior
import constants
import robocup
import main
import enum
import math
import skills.move


## This tactic builds a wall a certain distance from point A, blocking point B.
class Wall(composite_behavior.CompositeBehavior):
    class State(enum.Enum):
        defense_wall = 1
        shot = 2
        scramble = 3

    def __init__(
            self,
            num_defenders=3,  # number of defenders we're making the wall with (default 3)
            curvature=.3,  # 'curvature' (in radians) of the wall 
            mark_point=None,  # what point we are defending against (default is ball)
            defender_point=robocup.Point(
                0, 0),  # what point we are defending (default is goal)
            defender_spacing=2.5,  # number of robot radii between the centers of the defenders in the wall
            dist_from_mark=.75,  # distance from the mark point we want to build the wall
            defender_priorities=[20, 19, 18, 17, 16]
    ):  # default defense priorities                       
        super().__init__(continuous=True)

        is_ball_free = lambda: main.ball().vel.mag() < 1 and min([(main.ball(
        ).pos - rob.pos).mag() for rob in main.system_state(
        ).their_robots]) > min([(main.ball().pos - rob.pos).mag()
                                for rob in main.system_state().our_robots])

        self.mark_moved = False
        self.active_defenders = num_defenders
        self.number_of_defenders = num_defenders
        self.curvature = 1 * curvature
{'fraction_non_alphanumeric': 0.08116577875274208, 'fraction_numerical': 0.01472892510184895, 'mean_word_length': 2.3319415448851775, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1340903', 'n_tokens_mistral': 944, 'n_tokens_neox': 870, 'n_words': 296}