Skip to content

feat: add Fujimura sugihara model to SpaceControlModel#162

Open
tehbeh86 wants to merge 21 commits intofloodlight-sports:mainfrom
tehbeh86:fujimura_sugihara_model
Open

feat: add Fujimura sugihara model to SpaceControlModel#162
tehbeh86 wants to merge 21 commits intofloodlight-sports:mainfrom
tehbeh86:fujimura_sugihara_model

Conversation

@tehbeh86
Copy link

@tehbeh86 tehbeh86 commented Jun 13, 2025

This adds a motion-based space control model following Fujimura and Sugihara (2005), which introduces a velocity-dependent resistive force that limits acceleration and produces asymptotic speed behavior—yielding more realistic estimates of how quickly players can reach each point on the pitch.

Includes:

  • Support in SpaceControlModel via model="fujimura_sugihara"
  • Arrival time calculation based on kinematic equations
  • Unit tests and data quality checks for player count, frame count, pitch bounds, NaN handling, and square/hex meshes

⚠️ This PR depends on #159 (feat: add Taki-Hasegawa model to SpaceControlModel). Please merge that PR first, or review both together.

draabe and others added 19 commits September 10, 2024 20:20
build!: release 0.5.0
This implements a new space control model based on the approach by Taki and Hasegawa (2000),
as described in "Visualization of dominant region in team games and its application to teamwork analysis".
The model is integrated into `space.py` and enables the calculation of dominant regions
based on arrival time under directional acceleration constraints.
- Added data quality tests for the Euclidean model
- Introduced helper method for masked np.nanargmin
- Declared internal methods and added concise internal docstrings
- Changed out-of-pitch ValueError to UserWarning
- Added model identifier 'fujimura_sugihara' to supported models
- Implemented _calculate_shortest_times_fujimura_sugihara()
- Added helper method _stack_pos_vel() to reduce code duplication
…nd pitch bounds for fujimura_sugihara model
- Improved performance via vectorized exp(-αt) and norm reuse
- Applied validity masks and clamped delta to 90% of t
- Enhanced readability using symbolic math notation (φ, x₀, v₀, etc.)
- Fixed incorrect mesh point assignment due to overshooting Newton step
- Updated docstring and structure for clarity
…odel

- Prevents propagation of NaNs in time computation
- Ensures players with missing velocity are treated as starting from rest
- Fixes failing test_nan_horizontal_fujimura_sugihara
…e/hex mesh

- Added 4 tests for square mesh variant of the model
- Added 4 tests for hexagonal mesh variant
… NaNs

- Enforce vmax limit on player velocities for realistic time estimation
- Replace NaN velocities with 0.0 to ensure stable control calculation
- Replace magic numbers with named constants in Fujimura-Sugihara method
- Use descriptive variable names and section headers for better structure
- Limit Newton iteration to 3 steps for consistent and efficient convergence
- Extend class docstring to document the Fujimura-Sugihara model and parameters
@tehbeh86 tehbeh86 changed the title Fujimura sugihara model feat: add Fujimura sugihara model to SpaceControlModel Jun 13, 2025
tbusch86 added 2 commits June 18, 2025 13:20
- Use motion-based center estimate for better interval bounds
- Remove zero-distance override for on-spot players
- Ensure consistent use of capped velocities in all calculations
- Use motion-based center estimate for better interval bounds
- Remove zero-distance override for on-spot players
- Ensure consistent use of capped velocities in all calculations
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.

2 participants