Skip to content

Shadow Defense Base #3450

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

Merged
merged 47 commits into from
Jul 19, 2025
Merged

Shadow Defense Base #3450

merged 47 commits into from
Jul 19, 2025

Conversation

zuperzane
Copy link
Contributor

@zuperzane zuperzane commented Mar 15, 2025

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

  • [Pretty sure ] Remove all commented out code
  • [Believe so ] Remove extra print statements: for example, those just used for testing
  • [I think so ] Resolve all TODO's: All TODO (or similar) statements should either be completed or associated with a github issue

Maybe 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.

Copy link
Contributor

@itsarune itsarune left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work! just have some code nits

@zuperzane
Copy link
Contributor Author

@itsarune thank you for the nits 🙏

@zuperzane zuperzane requested a review from itsarune June 30, 2025 07:52
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
*+----------------------+---------++---------+------------------+
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

Comment on lines +219 to +221
*/

if (go_for_ball)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
*/
if (go_for_ball)
*/
if (go_for_ball)

Copy link
Contributor

@itsarune itsarune left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great! I left some more nits, but great work with the diagrams!

@zuperzane zuperzane requested a review from itsarune July 8, 2025 23:31
Copy link
Contributor

@itsarune itsarune left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all good, one tiny nit

@zuperzane zuperzane requested a review from itsarune July 17, 2025 19:14
Copy link
Contributor

@itsarune itsarune left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ⚽ ⚽

Copy link
Contributor

@williamckha williamckha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work 💯

@zuperzane zuperzane merged commit da152fa into UBC-Thunderbots:master Jul 19, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement a new ShadowEnemyTactic
4 participants