From 97e10838431ca88afab4f95b84467b826fd5f0d5 Mon Sep 17 00:00:00 2001 From: NicEastvillage Date: Tue, 7 Aug 2018 19:45:46 +0200 Subject: [PATCH] Now doesn't tries to collect non-excisting pads --- beastbot/choices.py | 4 +++- rlbot.cfg | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/beastbot/choices.py b/beastbot/choices.py index 210eb4c..be207ad 100644 --- a/beastbot/choices.py +++ b/beastbot/choices.py @@ -166,6 +166,8 @@ class CollectBoost: def __init__(self, agent): boost_choices = [] for i, pad in enumerate(agent.get_field_info().boost_pads): + if i >= agent.get_field_info().num_boosts: + break boost_choices.append(SpecificBoostPad(pad, i)) self.collect_boost_system = rlu.UtilitySystem(boost_choices, 0) @@ -176,7 +178,7 @@ def utility(self, data): boost01 = float(data.car.boost / 100.0) boost01 = 1 - easing.smooth_stop(4, boost01) - best_boost = self.collect_boost_system.evaluate(data) + # best_boost = self.collect_boost_system.evaluate(data) return easing.fix(boost01) diff --git a/rlbot.cfg b/rlbot.cfg index 482258d..19b4223 100644 --- a/rlbot.cfg +++ b/rlbot.cfg @@ -19,7 +19,7 @@ num_participants = 2 # Accepted values are "Soccer", "Hoops", "Dropshot", "Hockey", "Rumble" game_mode = Soccer # What game mode the game should load into. Too many to list. -game_map = Mannfield +game_map = DFHStadium # Automatically skip replays after a goal. skip_replays = False # Skip the kickoff countdown