Skip to content

Bot AI improvements

terencehill requested to merge terencehill/bot_ai into master

Summary

  • grouped small health/armor: avoid multiple costly calls of path finding code that selects one of the closest item of the group by telling the bot to head directly to the farthest item as soon as bot picks the first item up
  • Improve bot's ability to walk obstacles up:
    • check obstacles in the bot's desired direction rather than in the actual movement direction (velocity) which is not correct when bot turns or gets hit by an enemy
    • don't check for obstacles further than bot's final goal or teleporter
  • Improve chase of enemies:
    • keep track of enemies in the air (blaster-jumping around)
    • try to keep waypoint route as long as possible, as it is safer and faster (bot can bunnyhop)
    • optimizations for CPU cost
  • CTF: Optimize rating of items
  • CTF: Fix bot wasting a lot of CPU cycles standing on their base with the enemy's flag
  • Make bots slightly more responsive by optimizing bots queue for assigning a frame to find a new goal
  • Make bots slightly more dumb by increasing chances that they find a new goal near a waypoint in order to reduce CPU cost of path finding (avoids searching and testing with tracewalk all the nearest waypoints)
  • Bots now can properly use jetpack
  • Bots now really leave important items to human teammates (unless they are already really close to them)
  • Bots are now aware of items that can be reached by a standard jumppad trajectory
  • Lots of minor optimizations and fixes

See branch history for more details, commits labeled with "Bot AI" are the meaningful changes.

Depends on !442 (merged)

Edited by terencehill

Merge request reports

Loading