Skip to content

Fix/defence algo#119

Draft
fred-huang122 wants to merge 9 commits into
mainfrom
fix/defence-algo
Draft

Fix/defence algo#119
fred-huang122 wants to merge 9 commits into
mainfrom
fix/defence-algo

Conversation

@fred-huang122
Copy link
Copy Markdown
Collaborator

@fred-huang122 fred-huang122 commented May 10, 2026

Adds updated defence positioning and goalkeeping logic, field-dimension-aware setup, and Fast Path Planning support. Also refreshes related strategy runner, simulator, and test coverage for custom field bounds and RSim/GRSim setup.

fred-huang122 and others added 7 commits March 29, 2026 04:36
Share shadow-geometry helpers between goalkeeping and defender positioning.
Use keeper-line and post limits adjusted for robot radius, account for ball and
robot radius in defender shadows, and dynamically choose the single defender's
coverage side.

Update goalkeep and defend_parameter tests for standard and custom field geometry.
Use setsid for pixi main tasks so Ctrl+C is not delivered twice to the Python child. Update StrategyRunner SIGINT handling so the first interrupt requests graceful shutdown, stops the Rich FPS display, and lets cleanup send stop commands; a later interrupt still force-quits.

Add regression coverage for SIGINT behavior and REAL-mode zero-velocity stop commands during shutdown.
Copy link
Copy Markdown
Collaborator Author

fred-huang122 commented May 10, 2026

Design discussion: game.ball is typed as optional because the system supports no-ball runs via exp_ball=False. For strategies that expect a ball, GameGater gives a runtime guarantee when exp_ball=True, but that guarantee is not represented in the Game type itself. This creates a mismatch between the runtime strategy contract and the static API shape.

So it creates a typing error if you don't have the if statement when coding in strategy:
'''
if ball:
ball = game.ball
'''

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.

1 participant