team-remember-to-hydrate / battlecode23-team-remember-to-hydrate

GNU Affero General Public License v3.0
1 stars 0 forks source link

Give bots static boolean attribute 'prefersClockwise' #45

Open mklapp2 opened 1 year ago

mklapp2 commented 1 year ago

Goal: Implement a static boolean attribute 'prefersClockwise' for use in navigation.

Description: Some of our methods for movement/pathfinding have a default behavior of being clockwise or anti-clockwise. We should formally set this behavior to be consistent for a bot and these methods should change to include some dependence on 'preferClockwise' for determining what direction to go in. Then, in some special cases, we may want to toggle this from true to false.

Examples where it is useful: If a bot is navigating and reaches an obstacle, it probably has a default behavior to follow the obstacle until it can bypass it. If that obstacle is a wall connected to the map edge, it would be helpful if the bot shifts its behavior to switch what direction it defaults to.

Potential Improvements to this Feature: Have 2 attributes, one is preferClockwiseToGoal and the other is preferClockwiseToHome. I think there are reasonably expected scenarios where one direction in a journey is better clockwise and the other is better anti-clockwise.