RoboCupULaval / StrategyAI

Robocup ULaval's artificial intelligence software (team ULtron)
http://www.robocupulaval.com
MIT License
23 stars 22 forks source link

We no longer switch to a defensive strategy when the ball is in our side #552

Closed PhiBabin closed 5 years ago

PhiBabin commented 5 years ago

Previously, the autoplay directly switch from offensive to a defensive strategy when the ball was immobile and was our half of the field. The problem is that sometime we have a robot super close to the ball and no enemy near it, thus we don't to switch to a defensive strategy immediately. I added a check that we can stay in offensive if and only if we have the closest robot to the ball and no enemy robot near it.