Shadow Defense Base#3450
Merged
zuperzane merged 47 commits intoUBC-Thunderbots:masterfrom Jul 19, 2025
Merged
Conversation
Co-authored-by: William Ha <60044853+williamckha@users.noreply.github.com>
Co-authored-by: William Ha <60044853+williamckha@users.noreply.github.com>
…e and turn it to a shadower
…er is always confident that someone has ball, also adding a simple test that is to be fixed
…e threshold for is near dribble
…t going to remove it for now and see if tests pass
itsarune
reviewed
Jun 22, 2025
src/software/ai/hl/stp/tactic/shadow_enemy/shadow_enemy_fsm.cpp
Outdated
Show resolved
Hide resolved
itsarune
reviewed
Jun 22, 2025
itsarune
reviewed
Jun 22, 2025
Contributor
itsarune
left a comment
There was a problem hiding this comment.
nice work! just have some code nits
Contributor
Author
|
@itsarune thank you for the nits 🙏 |
itsarune
reviewed
Jul 7, 2025
itsarune
reviewed
Jul 7, 2025
itsarune
reviewed
Jul 7, 2025
itsarune
reviewed
Jul 7, 2025
itsarune
reviewed
Jul 7, 2025
itsarune
reviewed
Jul 7, 2025
Comment on lines
+207
to
+219
| /* | ||
| * Go for ball is checking if the ball is within a certain angle | ||
| * of the net | ||
| * XX <-- Enemy that is not facing the net | ||
| * XX | ||
| * / O \<-- Ball | ||
| * / \ | ||
| * +----/----------\----+ | ||
| * | / \ | | ||
| * | / ++ \ | | ||
| * | / ++ <--\Goalie | ||
| *+----------------------+---------++---------+------------------+ | ||
| */ |
itsarune
reviewed
Jul 7, 2025
Comment on lines
+219
to
+221
| */ | ||
|
|
||
| if (go_for_ball) |
Contributor
There was a problem hiding this comment.
Suggested change
| */ | |
| if (go_for_ball) | |
| */ | |
| if (go_for_ball) |
itsarune
reviewed
Jul 7, 2025
itsarune
reviewed
Jul 7, 2025
src/software/ai/hl/stp/tactic/shadow_enemy/shadow_enemy_fsm_test.cpp
Outdated
Show resolved
Hide resolved
itsarune
reviewed
Jul 7, 2025
Contributor
itsarune
left a comment
There was a problem hiding this comment.
looks great! I left some more nits, but great work with the diagrams!
itsarune
reviewed
Jul 14, 2025
Co-authored-by: itsarune <42703774+itsarune@users.noreply.github.com>
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.
resolves #3357
Testing involves a py test added to defense test and a shadow fsm test
Resolved defense lack of aggressiveness
[x]New Tests
[x]New Tactic
[x ]Tested in real life by placing nonfunctionning robot with ball and watching the shadower take the ball, there was a change in logic though
making the shadower go for the enemy face rather than the ball and that hasnt been tested
TODO(or similar) statements should either be completed or associated with a github issueMaybe make another TODO that has to do with editing the function on line 15
in src/software/ai/hl/stp/play/defense/defense_play_fsm.cpp
It should make a better decision as to when to start acting like a shadower vs just always taking any passing defender and as soon as they're between the ball and the net acting like shadower. Maybe if it also had nobody to pass to or nowhere to go I'm not sure I could do that for this todo if that makes more sense tho.