Skip to content

Bot enhancements#95

Merged
alcachofass merged 1 commit into
alcachofass:mainfrom
br33zy59:enhanced-bot-tweaks
Jun 28, 2026
Merged

Bot enhancements#95
alcachofass merged 1 commit into
alcachofass:mainfrom
br33zy59:enhanced-bot-tweaks

Conversation

@br33zy59

@br33zy59 br33zy59 commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

"Vague title, annoyingly detailed description" - edition

  • Flattened enhanced bot skill. All enhanced bots are equally capable regardless of designated skill (0-5) level. This simplifies development, and re-introducing skill spread later should be trivial AFTER new bot behaviour is determined.
  • Bot's aim target now lerps predictively between think intervals. Prevents saw-tooth aiming issues and draws hitscan shots onto target better.
  • Generalized the gauntlet charge abandonment to other close-quarters situations, so bots don't get stuck in a death spiral with one another.
  • Generalized combat break-off so bots don't keep aim on enemy last-seen-position for long periods.
  • Fixed some weapon selection behaviour so bots don't continuously favour the machinegun in so many situations
  • Improved railgun leading and movement compensation/anticipation

Item preferences & positioning

Split item tracking targets into hierarchical preference instead of random selection of goal. Bots will now prioritize the more important item respawn (e.g. MH over RA) if they're coming up at similar times). Bots will also split off primary goal to reach a secondary item they track if they happen to be walking near it and it's available. They'll also divert briefly during the primary trip if they need health/shards/ammo. Bot positioning - Framework for module and initial behaviour tweak - Bots will prefer high pathing towards goals over low ground

Enhanced Bots - Item tracking

Item tracking/seeking and detours

Bots will track to major items when they believe they will respawn soon. They will make small detours to pick up other items if they are passing close by and the items are spawned.

  • Nerfed flick rails to be less accurate and less instantaneous.
  • Bots now re-evaluate their tracked items each time they spawn (initial join, death etc) and not at game start/connect. So bots in queue don't hold goals and playing bots will re-assess their choices as the match progresses.
  • Bots hold at more sensible distances when weilding shotgun/plasma (not try and close to zero like gauntlet)
  • Bots favour RL more when roaming, heavily disfavour GL
  • Bots should now spam last-seen locations for opponents (doorways etc) for a while after losing sight of target
  • Various gates and guards against looping and frozen movements
  • Bots more reactive to opponent item pickups in 1v1 situations
  • Moderate refactor to rip enhanced functions out of dmq3 and into their own more appropriate files.

Enhanced bot improvements

  • Bots now factor weapon loadout into assessment of their own stack. Disincentivises engagement when poorly equipped
  • Implemented slow shot adjustment for rapid-fire weapons. If bot's MG/LG leading is ahead of behind target, bot will periodically notice this and adjust
  • Loosened the 'don't walk off a ledge' logic so it doesn't lock the bot up so often when they're somewhere they can only exit by ledge fall
  • Upped initial combat reaction time of bot so they pre-fire less severely when they first spot an enemy
  • Bot re-evaluates stack on itself and enemy mid-fight, and can decide to break off if it's losing hard. Will also evaluate if it loses sight of enemy for a moment, and take the opportunity to bail if it makes sense.

Refactor bot_enhanced

Phased refactor of bot_enhanced code:

Phase 1

  • Fixed up elements of enhanced bot code that were not properly gated behind bot_enhanced 1 (vanilla bots were still running some enhanced routines pointlessly)
  • Cached cvar gates per think tick to avoid lots of unnecessary reads
  • Some expensive routines are now gated by context e.g. route elevation checks only run if bot has an active goal commit, not during combat or open roaming
  • Reduced duplicate AAS travel time queries by caching results

Phase 2

  • Merged ai_bot_events.c into ai_bot_tactics.c
  • Merged ai_bot_move_util.c into ai_bot_move_harness.c
  • Slimmed down ai_bot_dmnet.c by collapsing passthrough wrappers

Phase 3
Readability. Merged items and item timing into ai_bot_items.c Phase 4 - Flattened over-functionization

  • Collapsed nine near-identical functions (BotEnhanced_Get*) into one internal helper
  • Removed BotEnhanced_*Active() chains and collapsed them all into BotEnhanced_IsActive()
  • Consolidated ledge/hold into combat intent Phase 5 - Flatted feature cvars into bot_enhanced and bot_enhanced_debug
  • All sub-cvars are now gone/irrelevant

- Flattened enhanced bot skill. All enhanced bots are equally capable regardless of designated skill (0-5) level. This simplifies development, and re-introducing skill spread later should be trivial AFTER new bot behaviour is determined.
- Bot's aim target now lerps predictively between think intervals. Prevents saw-tooth aiming issues and draws hitscan shots onto target better.
- Generalized the gauntlet charge abandonment to other close-quarters situations, so bots don't get stuck in a death spiral with one another.
- Generalized combat break-off so bots don't keep aim on enemy last-seen-position for long periods.
- Fixed some weapon selection behaviour so bots don't continuously favour the machinegun in so many situations
- Improved railgun leading and movement compensation/anticipation

Item preferences & positioning

Split item tracking targets into hierarchical preference instead of random selection of goal.
Bots will now prioritize the more important item respawn (e.g. MH over RA) if they're coming up at similar times).
Bots will also split off primary goal to reach a secondary item they track if they happen to be walking near it and it's available.
They'll also divert briefly during the primary trip if they need health/shards/ammo.
Bot positioning - Framework for module and initial behaviour tweak - Bots will prefer high pathing towards goals over low ground

Enhanced Bots - Item tracking

Item tracking/seeking and detours

Bots will track to major items when they believe they will respawn soon. They will make small detours to pick up other items if they are passing close by and the items are spawned.

- Nerfed flick rails to be less accurate and less instantaneous.
- Bots now re-evaluate their tracked items each time they spawn (initial join, death etc) and not at game start/connect. So bots in queue don't hold goals and playing bots will re-assess their choices as the match progresses.
- Bots hold at more sensible distances when weilding shotgun/plasma (not try and close to zero like gauntlet)
- Bots favour RL more when roaming, heavily disfavour GL
- Bots should now spam last-seen locations for opponents (doorways etc) for a while after losing sight of target
- Various gates and guards against looping and frozen movements
- Bots more reactive to opponent item pickups in 1v1 situations
- Moderate refactor to rip enhanced functions out of dmq3 and into their own more appropriate files.

Enhanced bot improvements

- Bots now factor weapon loadout into assessment of their own stack. Disincentivises engagement when poorly equipped
- Implemented slow shot adjustment for rapid-fire weapons. If bot's MG/LG leading is ahead of behind target, bot will periodically notice this and adjust
- Loosened the 'don't walk off a ledge' logic so it doesn't lock the bot up so often when they're somewhere they can only exit by ledge fall
- Upped initial combat reaction time of bot so they pre-fire less severely when they first spot an enemy
- Bot re-evaluates stack on itself and enemy mid-fight, and can decide to break off if it's losing hard. Will also evaluate if it loses sight of enemy for a moment, and take the opportunity to bail if it makes sense.

Refactor bot_enhanced

Phased refactor of bot_enhanced code:
Phase 1:
- Fixed up elements of enhanced bot code that were not properly gated behind bot_enhanced 1 (vanilla bots were still running some enhanced routines pointlessly)
- Cached cvar gates per think tick to avoid lots of unnecessary reads
- Some expensive routines are now gated by context e.g. route elevation checks only run if bot has an active goal commit, not during combat or open roaming
- Reduced duplicate AAS travel time queries by caching results
Phase 2:
- Merged ai_bot_events.c into ai_bot_tactics.c
- Merged ai_bot_move_util.c into ai_bot_move_harness.c
- Slimmed down ai_bot_dmnet.c by collapsing passthrough wrappers
Phase 3 - Readability. Merged items and item timing into ai_bot_items.c
Phase 4 - Flattened over-functionization
- Collapsed nine near-identical functions (BotEnhanced_Get*) into one internal helper
- Removed BotEnhanced_*Active() chains and collapsed them all into BotEnhanced_IsActive()
- Consolidated ledge/hold into combat intent
Phase 5 - Flatted feature cvars into bot_enhanced and bot_enhanced_debug
- All sub-cvars are now gone/irrelevant
@alcachofass alcachofass merged commit c6f637a into alcachofass:main Jun 28, 2026
1 check passed
@br33zy59 br33zy59 deleted the enhanced-bot-tweaks branch July 2, 2026 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants