-
Notifications
You must be signed in to change notification settings - Fork 20
Bots slow down if far ahead of teammates #1538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bots slow down if far ahead of teammates #1538
Conversation
|
Requires the bot spreadout and retreat behaviors to be merged in before this PR is viable, because as is this will cause bots to clump together into an amorphous blob: bot_slow_down_for_teammates_poc.mp4 |
dafc207 to
675dea1
Compare
|
|
||
|
|
||
| //--------------------------------------------------------------------------------------------- | ||
| QueryResultType CNEOBotSeekAndDestroy::ShouldAim(const CNEOBot* me, const bool bWepHasClip) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed to allow CNEOBotSeekAndDestroy::ShouldWalk to instantiate the abstract class.
I decided to revert my original experiment with aiming to slow down since walking already was enough to let teammates catch up with the recent related bot updates.
|
With the other bot updates for path spread-out and retreating merged, the pacing looks more natural in my opinion: bot_spread_retreat_slowpace_combined_clip.mp4 |
| if (flTeammateSqDistToGhost < flMySqDistToGhost) | ||
| { | ||
| // Maybe I can catch up to my teammate up ahead | ||
| return ANSWER_UNDEFINED; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if I'm reading this correctly then only one bot per team can ever be walking at a time because they are close to the objective. Perhaps an early return here only if any team mate is closer to the objective than "me" by some tweakable value, that way some number of bots closest to the ghost can all walk at once.
If you wanted to add something like that you would probably also need to count how many alive bots are within that tolerance where a bot is considered to be the same distance from the ghost as "me", so in the case where all the bots on a team are close together they don't all walk.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How many bots should be slowing down is also a good design question. In experimenting with CTG tactics in another branch, I'm wondering if slowing down any of the bots is a generally optimal strategy. For example, if the ghost was spawned closer to one team, it could make sense to just try to rush, but on the other team the same approach would lead to getting picked off one by one. I think it might be a good idea to let this PR wait until we decide on a default bot strategy for CTG, so that we have some behavior to compare with before and after this tweak.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess one potential heuristic we could try when the other PRs slot into place is whether we should have teams that are closer to the objective should rush, but the other team that is calculated to be farther should engage in this logic of slowing down, so they can attack together in force.
Also, while this patch currently only has 1 bot slow down for the second up front bot on the team, perhaps we could calculate a ratio of how lopsided team counts are, so teams that are evenly stacked will have fewer bots slowing down than teams that are greatly outnumbered by the other team.
Description
Leverages the walk intention interface to slow down the travel speed of bots to allow their teammates to catch up when approaching the CTG objective.
Toolchain
Linked Issues
(Requires the above PRs to be accepted before, as currently bots in a team will clump together which presents a friendly fire and splash damage risk.)