Lone bots deploy detpack ambush at ghost - #1795
Conversation
|
The easiest way to test the behavior for me was honestly to give all players GiveDet in neo_player.cpp, and to set up a game with 2 players. You can either watch the two bots try to plant the det on the ghost, or you can use |
d719ba9 to
c9d1a81
Compare
|
In verifying a code review pass, I realized that there was a defect with the case where bots do not have a detpack and are waiting, which I didn't notice because it was boring to watch the wait behavior. I think I need to take this behavior to the drawing board and test out some potential restructuring of the behavior. |
c9d1a81 to
2b20828
Compare
Related to what I mentioned, part of the issue with testing was that it was extremely boring to watch 2 bots wait each other out and then get destroyed when one decided to break the stalemate by picking up the ghost. Before there was a bug with the bots constantly dropping their weapon when they didn't have the detpack that wasn't noticed because it was too boring to watch that scenario. In this update, I ended up implementing a rudimentary exploration behavior where bots keep track of what NavAreas they have seen and try to search for enemies. The hope is that this behavior is more interesting to watch than seeing a bot inevitably fail to cap the ghost. The tradeoff is that bots now will never attempt to capture the ghost if the are a sole survivor, so that we don't have to review a lot of ghost capture decision making code in this PR. The general logic flow is something like this:
The flow is intentionally relatively one directional so that it's easier to understand and also avoids some circular transitions that happened with earlier iterations of this code. Helpful testing script: Then observe bot fights in cases of 1v1, 2v2, 1v2. |
2b20828 to
4451c5d
Compare
4451c5d to
0fb069c
Compare
0fb069c to
bbeb4ad
Compare
bbeb4ad to
2c916fc
Compare
2c916fc to
f479575
Compare
f479575 to
77744f8
Compare
|
Fixed merge conflict by accepting all new incoming files in CMakelists.txt |
77744f8 to
5b94e3c
Compare
5b94e3c to
b68a6da
Compare
|
I decided to pare down the scope of the changes to just the bot exploration behavior around the ghost, into this PR: #2001 The idea is to review that enemy search behavior first, without having to worry about the detpack deploying and sound detection behavior. If PR #2001 gets merged in, then I'll rebase and clean up this PR to review the detpack logic. One can see what was excised from PR #1795 by looking at this commit: 88169cc |
f38efae to
28419ef
Compare
|
I pared down the scope of this review by removing a number of the sound detection changes that this PR previously had, to focus on just the detpack deployment and trigger behavior. To test, one can force the bots all be Recon class as well as reducing the inter-round timers with the following script: and setting the number of bots to 2. One can also drop in as a player and make some large noises around an enemy detpack, if the detpack avoidance behavior in the deploying behavior causes the bots not to reach inside the blast radius. |
28419ef to
0f7ecd0
Compare
1d466ec to
381ff93
Compare
AdamTadeusz
left a comment
There was a problem hiding this comment.
I notice that bots re-path very frequently when going to an ambush position, which often causes them to run back and forth in front of the ghost, is this intentional?
…or their goal Also need to increase area limit of area search to explore larger maps.
381ff93 to
5cff841
Compare
Only follow short recompute pattern with paths that are short and without additional path requirements
Description
Consolidated bot ambush logic into its own behavior class and added the ability for bots to plant detpacks in such scenarios.
Toolchain