Skip to content

Commit

Permalink
Exclude niekdt bot's, throws a big stack trace:
Browse files Browse the repository at this point in the history
base-1  | Traceback (most recent call last):
base-1  |   File /root/coding-challenge-racer/tournament.py, line 101, in <module>
base-1  |     main(**vars(args))
base-1  |   File /root/coding-challenge-racer/tournament.py, line 34, in main
base-1  |     rows = single_game(track)
base-1  |   File /root/coding-challenge-racer/tournament.py, line 60, in single_game
base-1  |     game_state = GameState(track)
base-1  |   File /root/coding-challenge-racer/racer/game_state.py, line 23, in __init__
base-1  |     self.initialize_bots()
base-1  |   File /root/coding-challenge-racer/racer/game_state.py, line 29, in initialize_bots
base-1  |     bot = Bot(deepcopy(self.track))
base-1  |   File /root/coding-challenge-racer/racer/bots/niekdt/bot.py, line 42, in __init__
base-1  |     self.path = BsPath(waypoints=self.track.lines, n_rounds=N_ROUNDS, res=RES)
base-1  |   File /root/coding-challenge-racer/racer/bots/niekdt/pathing.py, line 125, in __init__
base-1  |     super().__init__(**kwargs)
base-1  |   File /root/coding-challenge-racer/racer/bots/niekdt/pathing.py, line 36, in __init__
base-1  |     self.max_speeds = np.array([max_corner_speed(round(r)) for r in self.radii])
base-1  |   File /root/coding-challenge-racer/racer/bots/niekdt/pathing.py, line 36, in <listcomp>
base-1  |     self.max_speeds = np.array([max_corner_speed(round(r)) for r in self.radii])
base-1  |   File /root/coding-challenge-racer/racer/bots/niekdt/physics.py, line 88, in max_corner_speed
base-1  |     result = minimize(objective, np.array(300), bounds=((100.0, 750.0),))
base-1  |   File /usr/lib/python3/dist-packages/scipy/optimize/_minimize.py, line 681, in minimize
base-1  |     res = _minimize_lbfgsb(fun, x0, args, jac, bounds,
base-1  |   File /usr/lib/python3/dist-packages/scipy/optimize/_lbfgsb_py.py, line 308, in _minimize_lbfgsb
base-1  |     sf = _prepare_scalar_function(fun, x0, jac=jac, args=args, epsilon=eps,
base-1  |   File /usr/lib/python3/dist-packages/scipy/optimize/_optimize.py, line 263, in _prepare_scalar_function
base-1  |     sf = ScalarFunction(fun, x0, args, grad, hess,
base-1  |   File /usr/lib/python3/dist-packages/scipy/optimize/_differentiable_functions.py, line 158, in __init__
base-1  |     self._update_fun()
base-1  |   File /usr/lib/python3/dist-packages/scipy/optimize/_differentiable_functions.py, line 251, in _update_fun
base-1  |     self._update_fun_impl()
base-1  |   File /usr/lib/python3/dist-packages/scipy/optimize/_differentiable_functions.py, line 155, in update_fun
base-1  |     self.f = fun_wrapped(self.x)
base-1  |   File /usr/lib/python3/dist-packages/scipy/optimize/_differentiable_functions.py, line 137, in fun_wrapped
base-1  |     fx = fun(np.copy(x), *args)
base-1  |   File /root/coding-challenge-racer/racer/bots/niekdt/physics.py, line 80, in objective
base-1  |     velocity = Vector2.from_polar((speed[0], 0))
base-1  | TypeError: descriptor 'from_polar' for 'pygame.math.Vector2' objects doesn't apply to a 'tuple' object
  • Loading branch information
LoyVanBeek authored and Rayman committed Dec 20, 2024
1 parent e14f3a8 commit bc3d06b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions racer/bots/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from .mahmoud import ComplicatedBot
from .matthijsfh import MatthijsRacer
from .mukunda import AutoSoori
from .niekdt import MinVerstappen
# from .niekdt import MinVerstappen
from .paul import PaulBot
from .rayman import RoadRunner, RoadSprinter
from .rein.bot import ReinzorBot
Expand All @@ -38,7 +38,7 @@
PaulBot,
RoadRunner,
ShadowFax,
MinVerstappen,
# MinVerstappen, # Throws a massive stack trace from physics.py line 80: TypeError: descriptor 'from_polar' for 'pygame.math.Vector2' objects doesn't apply to a 'tuple' object
RoadSprinter,

# These bots are excluded because they use the unmodified default template
Expand Down

0 comments on commit bc3d06b

Please sign in to comment.