-
Notifications
You must be signed in to change notification settings - Fork 113
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
Shadow Defense Base #3450
Conversation
Co-authored-by: William Ha <[email protected]>
Co-authored-by: William Ha <[email protected]>
…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
src/software/ai/hl/stp/tactic/shadow_enemy/shadow_enemy_fsm.cpp
Outdated
Show resolved
Hide resolved
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.
nice work! just have some code nits
@itsarune thank you for the nits 🙏 |
src/software/ai/hl/stp/tactic/shadow_enemy/shadow_enemy_fsm.cpp
Outdated
Show resolved
Hide resolved
/* | ||
* 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 | ||
*+----------------------+---------++---------+------------------+ | ||
*/ |
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.
nice!
*/ | ||
|
||
if (go_for_ball) |
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.
*/ | |
if (go_for_ball) | |
*/ | |
if (go_for_ball) |
src/software/ai/hl/stp/tactic/shadow_enemy/shadow_enemy_fsm_test.cpp
Outdated
Show resolved
Hide resolved
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.
looks great! I left some more nits, but great work with the diagrams!
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.
all good, one tiny nit
Co-authored-by: itsarune <[email protected]>
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.
LGTM ⚽ ⚽
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.
Awesome work 💯
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.