Skip to content

Commit

Permalink
Now doesn't tries to collect non-excisting pads
Browse files Browse the repository at this point in the history
  • Loading branch information
NicEastvillage committed Aug 7, 2018
1 parent f4e6bcc commit 97e1083
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion beastbot/choices.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion rlbot.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 97e1083

Please sign in to comment.