Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def inject_botimus_into_exercises(exercises):
for exercise in exercises:
exercise.match_config.player_configs = [
PlayerConfig.bot_config(
Path(__file__).absolute().parent.parent / 'botimus.cfg', Team.BLUE
)
def make_match_config_with_my_bot() -> MatchConfig:
# Makes a config which only has our bot in it for now.
# For more defails: https://youtu.be/uGFmOZCpel8?t=375
match_config = make_empty_match_config()
match_config.player_configs = [
PlayerConfig.bot_config(
Path(__file__).absolute().parent.parent / 'src' / 'bot.cfg',
Team.BLUE
),
]
return match_config
def make_default_playlist(on_briefing):
exercises = rl_importer.make_default_playlist()
for exercise in exercises:
exercise.match_config.player_configs = [
PlayerConfig.bot_config(
Path(__file__).absolute().parent.parent / 'agents' / 'levi_training_agent' / 'levi_training_agent.cfg',
Team.BLUE
),
]
exercise.grader = CarBallGoalGrader(exercise.grader.graders[1].max_duration_seconds)
exercise.match_config.mutators.boost_amount = "Unlimited"
exercise.on_briefing = MethodType(on_briefing, exercise)
return exercises
def __init__(self, grader: Grader):
exercise_name = str(self.__class__.__name__)
super().__init__(exercise_name, grader)
self.rng: SeededRandomNumberGenerator = None
self.match_config.player_configs = [
PlayerConfig.bot_config(
Path(__file__).absolute().parent.parent / self.bot_cfg_filename, Team.BLUE
)