Bot enhancements#95
Merged
Merged
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
"Vague title, annoyingly detailed description" - edition
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.
Enhanced bot improvements
Refactor bot_enhanced
Phased refactor of bot_enhanced code:
Phase 1
Phase 2
Phase 3
Readability. Merged items and item timing into ai_bot_items.c Phase 4 - Flattened over-functionization