Expand description
The analysis-graph runtime: a dependency DAG of AnalysisNodes that turn
raw replay frames into derived state, gameplay events, and stats.
§How it works
Each node implements AnalysisNode: it declares the upstream state it
needs via dependencies, reads that state
through an AnalysisStateContext each frame in
evaluate, and exposes its own typed
state for downstream nodes. Source nodes read the
per-frame FrameInput; higher-level nodes build
on their outputs. The graph topologically resolves dependencies, so adding a
node automatically pulls in everything it needs.
Most nodes are thin wrappers around a calculator (see crate::stats);
the node handles graph plumbing while the calculator holds the detection
logic.
§Building a graph
AnalysisGraph::new+with_node/push_nodeto assemble nodes by hand.graph_with_builtin_analysis_nodes/graph_with_all_analysis_nodesto build from the built-in registry by name.collect_builtin_analysis_graph_for_replayto build and run a graph over a replay in one call.
The names accepted by the registry are listed in
[BUILTIN_ANALYSIS_NODE_NAMES] (with aliases in
[BUILTIN_ANALYSIS_NODE_ALIASES]).
§The nodes
All node types are re-exported from this module; their first-line summaries
appear in the item list below, and the AnalysisNode Implementors list
is another way to browse them. By role:
- Per-frame source state —
FrameInfoNode,GameplayStateNode,BallFrameStateNode,PlayerFrameStateNode,FrameEventsStateNode,LivePlayNode,SettingsNode. - Shared derived state —
TouchStateNode,PossessionStateNode,PlayerPossessionNode,PossessionNode,BallHalfNode,PlayerVerticalStateNode,PositioningNode,RotationNode,BackboardBounceStateNode,FiftyFiftyStateNode,ContinuousBallControlNode. - Mechanic detection —
FlickNode,HalfFlipNode,SpeedFlipNode,WavedashNode,PowerslideNode,FlipImpulseNode,DodgeResetNode,WallAerialNode,WallAerialShotNode,CeilingShotNode,DoubleTapNode,HalfVolleyNode,OneTimerNode,BallCarryNode(carries/air dribbles). - Play & contest detection —
TouchNode,PassNode,CenterNode,KickoffNode,BumpNode,DemoNode,RushNode,ControlledPlayNode,TerritorialPressureNode,WhiffNode,FiftyFiftyNode,BackboardNode,MovementNode,BoostNode. - Match-level & projection —
MatchStatsNode, goal-tag nodes (e.g.HalfVolleyGoalNodeplus the*_goalregistry names),StatsProjectionNode,StatsTimelineEventsNode,StatsTimelineFrameNode.
See the stats-runtime guide for the full DAG map.
Re-exports§
pub use graph::AnalysisDependency;pub use graph::AnalysisGraph;pub use graph::AnalysisNode;pub use graph::AnalysisNodeDyn;pub use graph::AnalysisStateContext;pub use graph::AnalysisStateRef;
Modules§
Structs§
- Aerial
Goal Node - AirDribble
Goal Node - Analysis
Node Collector - Backboard
Bounce State Node - Tracks ball bounces off the backboard from ball/player/touch state; exposes them as shared state.
- Backboard
Node - Derives backboard-play stats from the upstream backboard-bounce state.
- Ball
Carry Node - Detects ball carries and air dribbles from continuous ball-control sequences.
- Ball
Frame State Node - Exposes per-frame ball state (position/velocity) extracted from raw frame input.
- Ball
Half Node - Tracks which half of the field the ball is in from ball-frame and live-play state.
- Ball
Third Node - Boost
Node - Tracks per-player boost usage and pickups, accumulating boost stats from frame/event state.
- Bump
Goal Node - Bump
Node - Detects player-on-player bumps from player frame/events and 50/50 state.
- Ceiling
Shot Goal Node - Ceiling
Shot Node - Detects ceiling shots from ball/player positions and touch events during live play.
- Center
Node - Detects centering passes from ball state, touches, and frame events during live play.
- Continuous
Ball Control Node - Tracks continuous ball-control sequences per player, emitting completed sequences.
- Controlled
Play Node - Detects stretches of controlled play from ball/player positions and touches.
- Counter
Attack Goal Node - Demo
Goal Node - Demo
Node - Detects demolitions from player frame state and frame events.
- Dodge
Reset Node - Detects flip/dodge resets and their outcomes from player, ball, touch, and event state.
- Double
TapGoal Node - Double
TapNode - Detects double taps from touches plus backboard-bounce state during live play.
- Empty
NetGoal Node - Fifty
Fifty Node - Derives 50/50 stats and events from the shared fifty-fifty state node.
- Fifty
Fifty State Node - Tracks 50/50 contest state from ball/player/touch/possession state as shared state.
- Flick
Goal Node - Flick
Node - Detects flicks from ball/player state and touches during live play.
- Flip
Impulse Node - Detects dodges/flip impulses from player frame state (graph node name “dodge”).
- Flip
Into Ball Goal Node - Flip
Reset Goal Node - Frame
Events State Node - Exposes per-frame discrete game events extracted from raw frame input.
- Frame
Info Node - Exposes per-frame timing/frame metadata extracted from raw frame input.
- Gameplay
State Node - Exposes per-frame gameplay state (game phase, ball-hit, etc.) from raw frame input.
- Half
Flip Node - Detects half-flips from player frame state during live play.
- Half
Volley Goal Node - Tags goals scored via a half-volley by joining match-stats goals with half-volley events.
- Half
Volley Node - Detects half-volleys from ball/player state and touches during live play.
- High
Aerial Goal Node - Kickoff
Goal Node - Kickoff
Node - Detects and classifies kickoffs from gameplay/ball/player state, touches, speed-flips, and boost pickups.
- Live
Play Node - Determines whether each frame is live play (and its gameplay phase) from gameplay/events.
- Long
Distance Goal Node - Match
Stats Node - Accumulates match-level stats and goal contexts; attaches per-goal territorial pressure at finish.
- Movement
Node - Tracks per-player movement classification/stats from player and vertical state during live play.
- OneTimer
Goal Node - OneTimer
Node - Detects one-timers from ball state and upstream pass detection during live play.
- OwnHalf
Goal Node - Pass
Node - Detects passes from touches, backboard-bounce, and 50/50 state during live play.
- Passing
Goal Node - Player
Frame State Node - Exposes per-frame per-player state (positions/velocities/boost) from raw frame input.
- Player
Possession Node - Tracks per-player possession from ball/player/possession/touch state.
- Player
Vertical State Node - Tracks per-player airborne/vertical state derived from player frame state.
- Positioning
Node - Tracks per-player field positioning (thirds/halves/roles/proximity) from frame and possession state.
- Possession
Node - Derives team/possession stats from ball-frame and shared possession state.
- Possession
State Node - Tracks current ball-possession state from touches and live-play state as shared state.
- Powerslide
Node - Detects powerslide usage from player frame state during live play.
- Rotation
Node - Tracks rotational roles (first/second/third man) from positions and events during live play.
- Rush
Node - Detects rushes/over-commits from ball/player/possession state during live play.
- Settings
Node - Captures replay/match settings from replay metadata.
- Speed
Flip Node - Detects speed-flips from gameplay/ball/player state during live play.
- Stats
Projection Node - Folds every mechanic/state calculator’s events into per-frame cumulative stat accumulators.
- Stats
Projection State - Aggregated per-stat accumulators forming the incremental stats projection.
- Stats
Timeline Events Node - Collects mechanic/goal/state events from all calculators into a compact stats-timeline event stream.
- Stats
Timeline Events State - Holds the collected replay stats-timeline events.
- Stats
Timeline Frame Node - Terminal materialization node for the full stats timeline frame export.
- Stats
Timeline Frame State - Holds the materialized per-frame stats snapshot DTO.
- Sustained
Pressure Goal Node - Territorial
Pressure Node - Tracks territorial pressure sessions from ball/possession state during live play.
- Touch
Node - Classifies ball touches (with rotation/possession/50-50/vertical context) into touch events/stats.
- Touch
State Node - Detects raw ball touches per frame from ball/player state and frame events as shared state.
- Wall
Aerial Node - Detects wall aerials from ball/player positions and touches during live play.
- Wall
Aerial Shot Node - Detects wall-aerial shots from player frame state and frame events during live play.
- Wavedash
Node - Detects wavedashes from player frame state during live play.
- Whiff
Node - Detects whiffs and beaten-to-ball attempts from ball/player state and touches during live play.
Constants§
- STATS_
TIMELINE_ MECHANIC_ KINDS - List of mechanic kind identifiers emitted into the stats timeline.