1123 use pathfinding in actual bot behavior#1129
Merged
Nico-Sanchez merged 32 commits intomainfrom Apr 15, 2025
Merged
Conversation
8d6a2f9 to
96f112b
Compare
7a093fd to
0f03a51
Compare
Contributor
Author
|
converted to draft until #1136 gets merged |
412a89c to
cd66994
Compare
added 20 commits
April 3, 2025 17:10
it was bugged and never entered the tracking state. Fixing it brought more errors Imma debug
this is to make bots a bit less aggresive
ae46d35 to
a7850ce
Compare
Nico-Sanchez
requested changes
Apr 9, 2025
Collaborator
Nico-Sanchez
left a comment
There was a problem hiding this comment.
Let's run some loadtests with current main and this branch before proceeding.
Contributor
Author
Did the loadtests! Thanks for suggesting them. Results here: https://www.notion.so/lambdaclass/Loadtests-bots-with-pathfinding-10-04-2025-1d0b9462471380e086f1fc5071eac2ce |
Nico-Sanchez
approved these changes
Apr 15, 2025
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.
Motivation
On #1112 and #1119 we introduced a pathfinding module and used it on bot behavior but under a flag but we were not using it for anything relevant.
Closes #1123
Summary of changes
On this PR we remove the pathfinding flag and restore the pre-existing bot behavior (
:move,track,attack) but consuming the pathfinding module instead of naively moving towards a direction.Besides this, I noticed a bug by which the bot was never entering the
:tracking_playerstate, this was because it was using the attack distance instead of the track distance.Note
Dashing won't be used when tracking the player or moving for now as it adds complexity to pathfinding and path following. I openned an issue to re-introduce it but with another intention > #1137
Note
The bot state machine states are instant, we don't differenciate things to do when entering / exiting a state or behaviors to keep over the duration of a state (for example, when we attack we should wait at least until the character finished casting the attack before attempting to add new input > #1159. This is something the unity client already does). Also the back is not performing any validations regarding this, so it's possible for the bots to instantly cast multiple abilities which shouldn't be possible and also is not possible for the unity client > #1160
How to test it?
Start the backend locally. Either on the web client or on Unity (selecting localhost as the server), run a new game. Check that now bots can actually chase you down, though now they can attack (like before the pathfinding PoC changes).
Checklist