analysis of player actions in selected hockey game situationswoodham/papers/liwoo2005a.pdf ·...

8
Analysis of Player Actions in Selected Hockey Game Situations Fahong Li Robert J. Woodham Department of Computer Science University of British Columbia Vancouver, BC, Canada V6T 1Z4 {fhli, woodham}@cs.ubc.ca Abstract We present a proof of concept system to represent and reason about hockey play. The system takes as input player motion trajectory data tracked from game video and sup- ported by knowledge of hockey strategy, game situation and specific player profiles. The raw motion trajectory data con- sists of space-time point sequences of player position regis- tered to rink coordinates. The raw data is augmented with knowledge of forward/backward skating, possession of the puck and specific player attributes (e.g., shoots left, shoots right). We use a Finite State Machine (FSM) model to rep- resent our total knowledge of given situations and develop evaluation functions for primitive hockey behaviours (e.g., pass, shot). Based on the augmented trajectory data, the FSMs and the evaluation functions, we describe what hap- pened in each identified situation, assess the outcome, esti- mate when and where key play choices were made, and at- tempt to predict whether better alternatives were available to achieve understood goals. A textual natural language de- scription and a simple 2D graphic animation of the analy- sis are produced as the output. The design is flexible to al- low the substitution of different analysis modules and exten- sible to allow the inclusion of additional hockey situations. 1. Introduction Many books on hockey coaching use diagrams and textual descriptions to represent and explain play for- mations and strategies [9, 11]. Instructional hockey videos [13] provide drill and selected game clips. Re- cently, computer software [14] has been developed to show play plans with graphic animation. All of these me- dia help coaches and players enhance play. However, to our knowledge, there has been no framework which auto- matically or semi-automatically integrates play knowledge, video data and computer graphic animation to demon- strate how to play hockey effectively in various game sit- uations. In such a framework, users (coaches, players and fans) could browse and build diagrams and textual descrip- tions illustrating effective play. They could watch actual play in video clips identified as instances of a particular sit- uation. They could simulate alternative play graphically for more detailed interpretation of the actual play data ex- tracted from video. We have developed such a semi-automatic framework, with two long-term objectives. One is to produce an inter- active, effective tool for hockey enthusiasts to illustrate and experiment with hockey strategies. The second is to produce a system that can automatically provide textual descriptions of play to annotate large databases of hockey video data. As our first step, we have focused on the representation for general hockey play, on the description and evaluation of particular play elements, and on the exploration of bet- ter alternatives to the actual play observed. The raw motion trajectory data is extracted automatically from video using software developed by others involved in the hockey anal- ysis project. Manual intervention is required only in situa- tions where the rink registration fails. In principle, knowl- edge of forward/backward skating, possession of the puck and specific player attributes also could be determined au- tomatically. Currently, the raw data is annotated manually by the user. In the thesis from which this paper is drawn [7], examples from three well-defined game situations are con- sidered: 2-on-1 offensive attack, power play shot from the point and defensive zone breakout. In this paper, we illus- trate the work using only two examples: one for a simple 2-on-1 offensive attack and the other one for a simple 5-on- 4 power play shot from the point. In any 2-on-1 offensive attack, we can identify a start, an end and an outcome (good, bad or neutral) from the per- spective of the offence (or the defence). We analyze player trajectory data, augmented with information on possession of the puck and players’ profiles (e.g., shoots left, shoots right). We describe where the two attacking players skate. Is it wider to set up a pass or does the puck carrier skate di- rectly for a shot on goal? Throughout, we calculate the fea-

Upload: lekhanh

Post on 30-Aug-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Analysis of Player Actions in Selected Hockey Game Situationswoodham/papers/LiWoo2005a.pdf · 2005-10-04 · Analysis of Player Actions in Selected Hockey Game Situations ... {fhli,

Analysis of Player Actions in Selected Hockey Game Situations

Fahong Li Robert J. WoodhamDepartment of Computer Science

University of British ColumbiaVancouver, BC, Canada V6T 1Z4{fhli, woodham}@cs.ubc.ca

Abstract

We present a proof of concept system to represent andreason about hockey play. The system takes as input playermotion trajectory data tracked from game video and sup-ported by knowledge of hockey strategy, game situation andspecific player profiles. The raw motion trajectory data con-sists of space-time point sequences of player position regis-tered to rink coordinates. The raw data is augmented withknowledge of forward/backward skating, possession of thepuck and specific player attributes (e.g., shoots left, shootsright). We use a Finite State Machine (FSM) model to rep-resent our total knowledge of given situations and developevaluation functions for primitive hockey behaviours (e.g.,pass, shot). Based on the augmented trajectory data, theFSMs and the evaluation functions, we describe what hap-pened in each identified situation, assess the outcome, esti-mate when and where key play choices were made, and at-tempt to predict whether better alternatives were availableto achieve understood goals. A textual natural language de-scription and a simple 2D graphic animation of the analy-sis are produced as the output. The design is flexible to al-low the substitution of different analysis modules and exten-sible to allow the inclusion of additional hockey situations.

1. Introduction

Many books on hockey coaching use diagrams andtextual descriptions to represent and explain play for-mations and strategies [9, 11]. Instructional hockeyvideos [13] provide drill and selected game clips. Re-cently, computer software [14] has been developed toshow play plans with graphic animation. All of these me-dia help coaches and players enhance play. However, toour knowledge, there has been no framework which auto-matically or semi-automatically integrates play knowledge,video data and computer graphic animation to demon-strate how to play hockey effectively in various game sit-

uations. In such a framework, users (coaches, players andfans) could browse and build diagrams and textual descrip-tions illustrating effective play. They could watch actualplay in video clips identified as instances of a particular sit-uation. They could simulate alternative play graphicallyfor more detailed interpretation of the actual play data ex-tracted from video.

We have developed such a semi-automatic framework,with two long-term objectives. One is to produce an inter-active, effective tool for hockey enthusiasts to illustrate andexperiment with hockey strategies. The second is to producea system that can automatically provide textual descriptionsof play to annotate large databases of hockey video data.As our first step, we have focused on the representationfor general hockey play, on the description and evaluationof particular play elements, and on the exploration of bet-ter alternatives to the actual play observed. The raw motiontrajectory data is extracted automatically from video usingsoftware developed by others involved in the hockey anal-ysis project. Manual intervention is required only in situa-tions where the rink registration fails. In principle, knowl-edge of forward/backward skating, possession of the puckand specific player attributes also could be determined au-tomatically. Currently, the raw data is annotated manuallyby the user. In the thesis from which this paper is drawn [7],examples from three well-defined game situations are con-sidered: 2-on-1 offensive attack, power play shot from thepoint and defensive zone breakout. In this paper, we illus-trate the work using only two examples: one for a simple2-on-1 offensive attack and the other one for a simple 5-on-4 power play shot from the point.

In any 2-on-1 offensive attack, we can identify a start,an end and an outcome (good, bad or neutral) from the per-spective of the offence (or the defence). We analyze playertrajectory data, augmented with information on possessionof the puck and players’ profiles (e.g., shoots left, shootsright). We describe where the two attacking players skate.Is it wider to set up a pass or does the puck carrier skate di-rectly for a shot on goal? Throughout, we calculate the fea-

Page 2: Analysis of Player Actions in Selected Hockey Game Situationswoodham/papers/LiWoo2005a.pdf · 2005-10-04 · Analysis of Player Actions in Selected Hockey Game Situations ... {fhli,

sibility of passing the puck, based on the geometric con-figuration of all three skaters and their profiles. If the puckcarrier shoots towards the goal, we evaluate the effective-ness of a shot from that particular location, based on thedistance between the location and the goal, the shooting an-gle, the position of the goalie, and the positions of the othertwo players. We also explore possible better outcomes byre-analyzing the situation assuming the puck carrier makesthe choice (pass or shoot) at slightly different times (sooneror later) or at slightly different locations (e.g., nearer/furtheror at less/greater angle to the goal). Similarly, we can an-alyze play effectiveness of the attackers (or the defensiveplayers) in any power play shot from the point.

We also provide a flexible architecture to support the ad-dition of other analysis modules. Thus, in principle, we cananalyze a given game situation from different perspectives(offence versus defence) and at different levels of detail (dif-ferences, say, in both general and specific skill levels of theindividual players involved). The architecture also is exten-sible so that other hockey game situations can be incorpo-rated once knowledge about play in those situations is rep-resented in the format required.

In summary, we have developed a flexible and exten-sible system to reason about hockey play effectiveness. Ittakes as input players’ trajectory data, augmented by indi-vidual player profiles and labelling of skating mode (for-ward/backward, falling down) and possession of the puck.The system includes a Finite State Machine representationfor general play knowledge, data structures for augmentedtrajectories, and a mechanism for generating play descrip-tions, for analyzing the actual play and for predicting al-ternative actions in the play. The system is specialized tohockey. We believe the design is generalizable not only toother hockey situations but ideally also to other domains,such as soccer, basketball, traffic flow control, and peoplesurveillance.

We organize the rest of this paper as follows. Section2 lists relevant work. Section 3 presents the architecturaloverview and the assumptions we have made in this pa-per. Section 4 shows the results of analyzing the two ex-amples mentioned above. Section 5 concludes. We discusssome implementation problems and point to future work.

2. Relevant work

The System SOCCER [1] automatically and simultane-ously generates natural language description from soccergame video sequences (recorded with a static TV-camera)for listeners who were not watching the game. It takes as in-put geometrical description of the scene, including a station-ary background and trajectories of dynamic objects. The tra-jectories are provided by a vision system with a special tra-jectory editor. Propositions about what is happening at the

moment are produced by the incremental event recognitionmodule. The selection/linearization component chooses rel-evant propositions, sorts them and passes them on to the en-coding processes, which further transform non-verbal infor-mation in those propositions into ordered written or spokenwords in German. All the processes in the system run in par-allel. One limitation of the SOCCER system is that it can-not recognize collaborations among several players, such asa team’s attack. Players’ intentions are added into the out-put description of the SOCCER system by another compo-nent, REPLAI (REcognition of PLans And Intentions) [10],which argues that intention is the uncompleted parts of aplan that has been started. The knowledge about standardgoals and plans in REPLAY is then formalized as a hierar-chy.

Lashkia et al. [6] present a software tool for assistingteam play analysis in soccer. Based on a probability modelusing colour information, it detects the ball and players invideo sequences recorded with a single digital video cam-era, registers their camera coordinates to a field model, sim-ulates the image scenes with 2D and 3D graphic anima-tion, and then analyzes dominant areas of each team. AsLashkia et al. point out, this tool does not integrate play-ers’ personal abilities and needs to improve the accuracy ofdetecting players and the ball when it is off the ground.

Kawashima et al. [5] propose an algorithm to analyzequalitatively group behaviour in soccer video sequences.The algorithm uses the histogram backprojection to detectand classify each player in a colour image. A group hierar-chy is formed by applying Gaussian filters to the output im-age of the histogram backprojection. Finally an interpreta-tion to the group behaviour is derived from the temporal as-pect of qualitative relations (e.g., disconnected, overlapped,or part of) among groups. The interpretation does not in-clude exact motion information such as velocity, direction,or its distribution.

We use the automatic player tracker developed byOkuma [8], another researcher involved the hockeyproject. Registration with Okuma’s tracker works well withpanoramic overhead views because a sufficient number ofrink landmarks will be visible in each video frame. Com-mercial broadcast video often includes close-up views.Manual registration adjustment proved necessary in se-quences when there were frames in which not enough rinklandmarks were visible. As an aside, we note that it alsois feasible to get accurate trajectory data by instrument-ing players, the puck and the rink itself, as was done inFoxTrax [15].

3. The framework and assumptions

Figure 1 is the architectural overview. Rectangles withdashed sides (e.g., Hockey Game Videos, Augmented Tra-

Page 3: Analysis of Player Actions in Selected Hockey Game Situationswoodham/papers/LiWoo2005a.pdf · 2005-10-04 · Analysis of Player Actions in Selected Hockey Game Situations ... {fhli,

Describe Analyze PredictVisualize

Configure

Sorted Play Events Finite State Machines

Textual Explanation

Image Sequences

Track Players Augment Information Recognize Events

Play Events Game Situations

Play KnowledgeDefinition

Extract

ClipInfo, EEFs, FSMs, SAMs, Options

Hockey Domain Knowledge

Digitize

Rink Model

Augmented Trajectory Data

Simple 2D Graphic AnimationIllustrated Image Sequence

Event Evaluation FunctionsSituation Analysis Modules

Detect Situations

Information on the Image Sequence

Hockey Game Videos

Information on a video clip of a particular game situation

Analysis Strategies

Roles Action

Figure 1: Architectural overviewEEFs: Event Evaluation Functions, FSMs: Finite State Machines, SAMs: Situation Analysis Modules

jectory Data, Event Evaluation Functions) stand for stor-age items such as databases, data structures and functionlibraries; rectangles with solid sides (e.g., Digitize, Con-figure, Analyze, Visualize) represent activities or modules;solid arrow lines are flows of information items. Input in-cludes hockey game videos and hockey domain knowledge.All the videos tested are recorded TV broadcast profes-sional matches. Our domain knowledge is that which gener-ally applies in professional matches. We focus on designingstorage items and modules identified within the large boxwith dashed sides, which mainly include Augmented Tra-jectory Data (ATD), Sorted Play Events (SPEs), Finite StateMachines (FSMs), Event Evaluation Functions (EEFs), Sit-uation Analysis Modules (SAMs), Describe, Analyze, Pre-dict, Configure and Visualize.

This paper makes the following assumptions:

• The video data have been pre-segmented and classifiedinto individual clips belonging to one of the three iden-tified game situations: 2-on-1 offensive attack, powerplay shot from the point and defensive zone breakout.We do this manually.

• For each segmented video clip, players’ (and thepuck’s) trajectory data have been accurately ac-quired and registered to a rink model. We assumewe can also extract players’ identity, players’ skat-ing mode (i.e., forward, backward or falling down),and information on possession of the puck from thevideo clips. Given player identity, we assume wehave access to ancillary player profile data which in-clude individual attributes such as shoots left, shoots

right, maximum speed, etc. We manually (or, at best,semi-automatically) augment trajectory data withplayer profile data, skating mode and puck posses-sion information. We name the result AugmentedTrajectory Data (ATD).

• High-level play events (such as pass, shot) have beenrecognized and extracted from the segmented videoclips. We also do this manually in our experiments. Pa-pers on video analysis addressing similar problems au-tomatically in other sports [2,4,12,16] have been pub-lished. We define the list of these play events as SortedPlay Events (SPEs).

• Knowledge on how to play in each identified game sit-uations is provided as input to the framework in theform of a Finite State Machine (FSM) and associatedEvent Evaluation Functions (EEFs). EEFs evaluate theeffectiveness (feasible or not) of players’ taking prim-itive actions (play events) under particular geometricconfigurations during some time interval. We have cre-ated examples for several game situations [7].

Situation Analysis Modules (SAMs) embody analysisstrategies. An SAM consists of functions in three cate-gories: description functions, analysis functions and predic-tion functions. They respectively describe the actual play,analyze possible better alternative actions, and predict re-sults of potential changes. Functions belonging to the samecategory have the same signature (i.e., number, order anddata types of input/output parameters). Within one SAM,an analysis function can use results produced by descrip-

Page 4: Analysis of Player Actions in Selected Hockey Game Situationswoodham/papers/LiWoo2005a.pdf · 2005-10-04 · Analysis of Player Actions in Selected Hockey Game Situations ... {fhli,

tion functions, and a prediction function can access resultsproduced by description functions and analysis functions.

We have implemented one FSM based, puck carrier cen-tered analysis strategy. In this strategy, the meanings of thewords description, analysis and prediction (correspondingto the functionalities of the SAM’s description, analysis andprediction functions) are given as follows. Description is aparse of the SPE list according to the FSM selected by theuser. The result is the transition path augmented with timeinformation indicating when each transition in the path oc-curs in the video clip. Analysis identifies feasible alterna-tive paths in the FSM which start from the same initial stateas the path parsed in the description and end up in a finalstate whose outcome is as good as or better than the out-come in the actual path. Prediction follows the same transi-tion path as in the description but varies the players’ spatio-temporal trajectories and checks whether there are more fa-vorable outcomes resulting from these trajectory perturba-tions. Thus prediction is limited to determining whether aslightly different positioning or timing of what actually hap-pened might have led to a more favorable outcome.

The Configure module provides users the interface (Fig-ure 2) to dynamically assign general system options. For

Figure 2: The Configure dialog

each of the built-in situations, users can choose which FSMto use in the analysis process and which evaluation func-tion to call for each of the primitive play events. Users canalso assign which description, analysis and prediction func-tions and their parameters (if any) to be used for the selectedanalysis strategy (SAM). Options for the Visualize moduleinclude whether to analyze and display in each frame the

riskiness of passing the puck to the puck carrier’s teammatesand the feasibility extent of shooting the puck towards thegoal.

The Visualize module visualizes the ATD (either theoriginal one or the one altered in the prediction process)in one window using a simplistic 2D graphic animation,synchronized with the video clip displayed in another win-dow (see Figure 5). The riskiness of passing and shootingcan also be visualized in the animation upon the user’s re-quest (through the Configure module). Meanwhile, textualdescriptions of the SPEs and the paths generated in the de-scription and analysis process also are output.

4. Analysis of two hockey game situations

Consider one video clip of a 2-on-1 offensive attack as anexample. In this clip (clip1) the 2-on-1 situation starts fromFrame #72 (Figure 3(a)), when the attacker (Player #2) onthe right begins to carry the puck forward in the neutral zoneand the other attacker (Player #3) follows up on the left. Theopposite defenceman (Player #1) keeps skating backwardbetween these two attackers until Frame #152 (Figure 3(d)),when he falls down in front of the goal to block the poten-tial pass from Player #2 to Player #3. It ends when the of-fensive team loses possession of the puck at Frame #164(Figure 3(f)). We acquired the players’ trajectories, reg-

(a) Frame #72 (b) Frame #120 (c) Frame #130

(d) Frame #152 (e) Frame #156 (f) Frame #164

Figure 3: Key image frames in clip1

(a): the situation starts; (b): the puck carrier crosses theblue line; (c): the puck carrier could have shot after thisframe for a more favorable outcome; (d): the defencemanfalls down; (e): one of the frames where the return valueof EvShootV2() changes; (f): the puck carrier loses posses-sion of the puck.

istered them to the rink coordinate frame, and augmentedthem with necessary information to form the ATD for thisclip. Then we manually identified and sorted the higher-level play events (SPEs) of interest from the ATD. The FSM(Figure 4) representing play knowledge in a simple 2-on-1

Page 5: Analysis of Player Actions in Selected Hockey Game Situationswoodham/papers/LiWoo2005a.pdf · 2005-10-04 · Analysis of Player Actions in Selected Hockey Game Situations ... {fhli,

offensive attack is provided as input, in a formatted text file.Figure 5 is part of the final output. The interface has 4 win-

Player Entered (q6)Another Defensive

OP, O Outside Blue Line (q0) OP Inside Blue Line (q1)

OP Lost Puck Possession (q2)

PASS (a0)

PASS (a0)

OP Shot Towards Goal (q3)

OP Shot Towards Goal (q5) OP Lost Puck Possession (q2)

Another OffensivePlayer Entered (q4)

LOSE_PUCK_POSSESSION (a12)

LOSE_PUCK_POSSESSION (a12)

CROSS_BLUE_LINE (a6)

SHOOT (a1_0)

SHOOT (a1_1)ENTER_PLAY (a9_1)ENTER_PLAY (a9_1)

ENTER_PLAY (a9_0)ENTER_PLAY (a9_0)

Figure 4: The FSM for simple 2-on-1 offensive attack

dows: the left window on the top shows the original videoclip; the middle window on the top displays textual output;the right window on the top contains control buttons; thewindow at the bottom visualizes the ATD and the evaluationresults. In the bottom animation window, areas (i.e., possi-

Figure 5: Analysis of a clip of 2-on-1 offensive attack

ble passing paths) filled with green horizontal lines repre-sent intervals during which it is feasible to pass, areas filledwith yellow diagonal crossing lines represent intervals riskyto pass, and areas filled with red vertical lines represent in-tervals unwise to pass.

Major textual components of the description include:

At Frame #120, Player #2 crossed the blueline.

At Frame #152, Player #1 fell down.

Figure 6: Applying one of the predefined trajectory pertur-bations to the analysis in Figure 5

At Frame #164, the offensive team (Player#2) lost possession of the puck.

The clip goes through the path:

1. q0[Frame #72]: The two attackers areoutside their offensive blue line.

2. q1[Frame #120]: The puck carrier isinside his offensive zone.

3. q2[Frame #164]: The puck carrierlost possession of the puck.

The outcome is bad for the offensiveteam.

Major textual components of the analysis include:According to the selected FSM and thereturn values of evaluation functions,i.e.,

Since Frame #73, EvPassV1() returns:1.Since Frame #114, EvPassV1() returns:0.Since Frame #115, EvPassV1() returns:1.Since Frame #116, EvPassV1() returns:0.Since Frame #118, EvPassV1() returns:1.Since Frame #119, EvPassV1() returns:0.Since Frame #120, EvPassV1() returns:1.Since Frame #123, EvPassV1() returns:0.Since Frame #130, EvPassV1() returns:1.Since Frame #130, EvShootV2() returns:3.Since Frame #133, EvPassV1() returns:0.Since Frame #134, EvPassV1() returns:1.Since Frame #136, EvPassV1() returns:0.Since Frame #137, EvPassV1() returns:1.Since Frame #138, EvPassV1() returns:0.Since Frame #139, EvPassV1() returns:1.Since Frame #141, EvPassV1() returns:0.Since Frame #156, EvShootV2() returns:2.Since Frame #160, EvPassV1() returns:-1.

Page 6: Analysis of Player Actions in Selected Hockey Game Situationswoodham/papers/LiWoo2005a.pdf · 2005-10-04 · Analysis of Player Actions in Selected Hockey Game Situations ... {fhli,

the offensive team could have played thefollowing path for a better outcome:

1. q0[Frame #72]: The two attackers areoutside their offensive blue line.

2. q1[Frame #120]: The puck carrier isinside his offensive zone.

3. q5[Frame #130--155]: The puck carriershot towards the goal in his offensivezone.

In the analysis process, two evaluation functions, i.e.,EvPassV1() and EvShootV2(), are used to estimate possi-ble passing/shooting path(s) and to check the feasibilityof taking the two primitive play actions/events (PASS andSHOOT) from the offensive team’s perspective.

• EvPassV1() takes into account the players’ current ge-ometric configuration, the defensive players’ defend-ing coverages and the potential receiver’s most likelynext position after a short fixed time interval. In theversion we implemented, it returns 1, 0 or -1, indicat-ing it is feasible, risky or unwise to pass respectively.

• EvShootV2() takes into account the distance betweenthe puck carrier and the center of the goal line, theshooting angle (i.e., the acute angle between the goalline and the line decided by the puck carrier’s posi-tion and the center point of the goal line), and posi-tions of both offensive and defensive players in frontof the goal. It returns a value between 1 and 5, indicat-ing to what extent it is feasible to shoot (a bigger valuemeans a greater extent).

The evaluation results are visualized (frame by frame if ap-plicable) and the visualization effect in every frame is keptfrom the start to the end in the bottom window of Figure 5.The possible pass path area is filled with horizontal lines ingreen, diagonal crossing lines in yellow, or vertical lines inred to represent the case of feasible, risky or unwise to passrespectively. The analysis results show the offensive teamcould have shot towards the goal after Frame #130 (Fig-ure 3(c)), instead of making a potential pass, in order for amore favorable outcome.

As for prediction, we apply several predefined perturba-tions to the two attackers’ trajectories and redo the anal-ysis. Figure 6 is the output after applying one of the per-turbations. By comparing it with Figure 5, we can see thatthe feasible region (filled with green horizontal lines) fora pass has grown larger and longer and that the unwiseregion (filled with red vertical lines) for a pass has dis-appeared. This suggests a better outcome than what actu-ally occurred for the offensive team. The animated versionsof Figure 5 and Figure 6, as well as other examples, areavailable through <http://www.cs.ubc.ca/nest/lci/thesis/fhli/videoclips>.

Another example (clip3, Figure 7) is an instance ofpower play shot from the point. In this clip, the situation

(a) Frame #1 (b) Frame #37 (c) Frame #41

(d) Frame #90 (e) Frame #177 (f) Frame #181

Figure 7: Key image frames in clip3

(a): the situation starts; (b), (c), (e): frames where the re-turn value of EvShootV2() changes; (d): the puck carrierpasses the puck to a teammate; (f): the puck carrier shootstowards the goal.

starts from one point player (Player #8) has possession ofthe puck at Frame #1 (Figure 7(a)) in a 5-on-4 power playformation. The puck carrier (Player #8) passes the puckto the other point player (Player #7) at Frame #90 (Fig-ure 7(d)). The situation ends when the puck carrier (Player#7) shoots the puck towards the goal at Frame #181 (Fig-ure 7(f)). Figure 8 is the FSM representing play knowl-

towards Goal (q3)OP Shot

Snatched Puck (q0)Point Player

Lost Puck Possession (q2)Offensive Team

Attacker not in Point PositionSnatched Puck (q1)

PASS (a0_1)

LOSE_PUCK_POSSESSION (a12)SHOOT (a1)

PASS (a0_0)

Figure 8: The FSM for simple 5-on-4 power play shot fromthe point

edge in a simple 5-on-4 power play shot from the point. Itis provided as input in a formatted text file. In the analy-sis process, EvShootV2() is used to estimate possible shoot-ing paths and to check the feasibility extent of taking a shotfrom the offensive team’s perspective. Figure 9 is part ofthe final output. In the bottom animation window, the possi-ble shot path area is filled with one of the specific line pat-terns in one colour to represent the specific extent(s) of fea-sible to shoot, i.e., green horizontal lines for the extents of4 and 5, yellow diagonal crossing lines for the extents of 2and 3, and red vertical lines for the extent of 1.

Major textual descriptions of the clip include:

Page 7: Analysis of Player Actions in Selected Hockey Game Situationswoodham/papers/LiWoo2005a.pdf · 2005-10-04 · Analysis of Player Actions in Selected Hockey Game Situations ... {fhli,

Figure 9: Analysis of clip3, an instance of power play shotfrom the point

At Frame #90, Puck carrier (#8) passed thepuck to his teammate (#7).

At Frame #181, The puck carrier (#7) shottowards the goal in his offensive zone.

The clip goes through the path:

1. q0[Frame #1]: The point player haspossession of the puck.

2. q0[Frame #90]: The point player haspossession of the puck.

3. q3[Frame #181]: The puck carriershot towards the goal from thepoint.

The outcome is dependent on EvShootV2().

Major textual analyses include:According to the selected FSM and thereturn values of evaluation functions,i.e.,

Since Frame #37, EvShootV2() returns:3.Since Frame #41, EvShootV2() returns:2.Since Frame #177, EvShootV2() returns:1.Since Frame #181, EvShootV2() returns:2.

the offensive team could have played thefollowing path for a better outcome:

1. q0[Frame #1]: The point player haspossession of the puck.

2. q3[Frame #37--40]: The puck carrier shottowards the goal from the point.

It tells that the point player (Player #8) could have shotsince Frame #37 (Figure 7(b)) instead of passing the puckto Player #7 at Frame #90 (Figure 7(d)) in order to get amore favorable outcome. The reason is that at Frame #37(compared with Frame #181) no opponent player (exceptthe goalie) was inside the possible shot path area in front of

the goal; the algorithm we used in EvShootV2() treats thisas an opportunity for the offensive team to score. No pertur-bation/prediction is applied to this clip.

5. Conclusion, discussion and future work

We have presented a flexible and extensible frame-work to describe, analyze and predict player actions inselected game situations, based on Augmented Trajec-tory Data, Sorted Play Events, Event Evaluation Functions,and Finite State Machines which represent play knowl-edge in those situations. The results show that augmentedplayer trajectory data support description, analysis and pre-diction in hockey game situations. Although our FSMmodel does not represent the complete range of feasible ge-ometric arrangements of players in each situation, it isadequate to represent specific game situations and the dis-crete events/actions that occur in those situations. Withevent evaluation functions, we can identify alterna-tive paths in the FSM which might result in better outcomesthan the actual one if the players played the situation by fol-lowing those paths. Analysis of alternative geometric po-sitioning of the players can predict more advantageousoutcomes for a given path through the FSM. This analy-sis is limited in depth in that we do not predict how playerson the other team might react to the alternative position-ing proposed. The framework provides a foundation fordevelopment of more elaborated hockey analysis applica-tions.

We manually recognized the higher-level play events thatoccur in each clip. We have not yet attempted to develop anautomatic event recognizer. Our event evaluation functionsmake general assumptions about player skill level. Over-all, we assume a high skill level. We do not yet take intoaccount differences in skill level among individual players.(Our event evaluation functions also would be different fora system designed for novice hockey. A pass or shot that isfeasible for a professional is not necessarily so for a ten yearold player). Our goal was to provide a basic proof of con-cept, which we have done. At the same time, we believethat it is feasible to build and to use a database of individ-ual player skating, defending and/or attacking skills. Thiswould help to customize the evaluations for specific groupsof players. Different FSMs can be defined for the samegame situation. This is desirable since description, analy-sis and prediction certainly depend on the perspective andthe skill level of each player involved. They also depend onthe particular coaching style and strategies employed. EachFSM is one view of a game situation. It is not expected thatanalysis based on a single FSM will be relevant to all par-ties. Ultimately, we expect users to be able to easily buildtheir own FSMs so that a given video clip can be analyzed

Page 8: Analysis of Player Actions in Selected Hockey Game Situationswoodham/papers/LiWoo2005a.pdf · 2005-10-04 · Analysis of Player Actions in Selected Hockey Game Situations ... {fhli,

from different perspectives and at different levels of granu-larity.

A program which can predict a player’s next action onthe fly will interest more people. We may achieve this byseeking a better spatio-temporal configuration for the of-fensive (or defensive, whichever is the analysis perspective)players to complete their understood goals. However, it ishard to identify on the fly what are the players’ understoodgoals and how they will react to opponent players’ interfer-ence. In an ideal case, i.e., if the event evaluation functionsare continuous, we can find an improved configuration byestimating the spatio-temporal gradients of these functions.Nevertheless, we can perturb the puck carrier’s (or one ofthe key players’) current position to somewhere nearby thatcan be reached by the player within a short time interval δt,given her or his maximum skating speed. Assuming otherplayers keep still or moving with their own previous veloci-ties, now we get a new players’ geometric configuration af-ter δt. Then we can call the event evaluation functions toredo the evaluation. One way to choose a reasonable posi-tion perturbation is to introduce uncertainty and use statisti-cal methods to find the most likely positions the player willmove to based on the player’s history of play behaviour. An-other one is to allow the user to adjust players’ positions in-teractively and show the evaluation results on the fly in the2D graphic animation. In our experiments, several fixed per-turbation modes are defined and each of them perturbs keyplayers’ positions according to heuristic factors which playa role in computing the event evaluation functions.

We would also like to develop more analysis strategies(SAMs) such as using multiple FSMs in parallel to dealwith complicated game situations. Statecharts [3] may beintroduced to supersede FSMs when the multitude of statesgrows exponentially and/or when the notions of hierarchy,concurrency and communication among game situationsneed to be dealt with to a much greater degree of granu-larity.

Finally, we want to extend the system in two separateways. First, we want to enhance the user interface by pro-viding user-friendly tools to input, debug and summarizehockey domain knowledge. We need better dynamic illus-tration of overlapping analysis and prediction results on se-quentially displayed image frames. We would like to useadvanced 3D (rather than toy 2D) graphic animation in theanimation window. Second, we want the system to func-tion in batch mode, without graphic user interface. Batchmode is required to process large volumes of video data au-tonomously to add appropriate textual description, analysisand prediction annotation to a very large video database.Acknowledgements: Support for the work described inthis paper was provided by NSERC and by the IRIS TRAproject, Raymond Ng (Project Leader). The authors thankJim Little, David Lowe, Valerie McRae, Kenji Okuma and

Michael Zhang for their contributions.

References

[1] E. Andre, G. Gerzog, and T. Rist. On the simultaneous in-terpretation of real world image sequences and their naturallanguage descriptions: the system SOCCER. In Proc. Euro-pean Conf. AI, pages 449–454, August 1988.

[2] Y. Gong, T. Lim, H. Chua, H. Zhang, and M. Sakauchi. Au-tomatic parsing of TV soccer programs. In IEEE Interna-tional Conference on Multimedia Computing and Systems,pages 167 – 174, May 1995.

[3] D. Harel. Statecharts: A visual formalism for complex sys-tems. Science of Computer Programming, 8(3):231–274,June 1987.

[4] S. S. Intille and A. F. Bobick. A framework for recognizingmulti-agent action from visual evidence. In AAAI ’99/IAAI’99, pages 518–525. American Association for Artificial In-telligence, 1999.

[5] T. Kawashima, K. Yoshino, and Y. Aoki. Qualitative im-age analysis of group behaviour. In Proceedings CVPR ’94,pages 690–693, 21-23 Jun 1994.

[6] G. Lashkia, N. Ochimachi, E. Nishida, and S. Hisamoto. Ateam play analysis support system for soccer games. In The16th International Conference on Vision Interface, Halifax,Canada, June 2003.

[7] F. Li. Description, analysis and prediction of player actionsin selected hockey game situations. Master’s thesis, Univer-sity of British Columbia, 2004.

[8] K. Okuma, A. Taleghani, N. de Freitas, J. J. Little, and D. G.Lowe. A boosted particle filter: Multitarget detection andtracking. In Proc. of ECCV, volume 1, pages 28–39, 2004.

[9] L. Percival. The Hockey Handbook. McClelland & SteWartInc., Toronto, Ontario, Canada, rev. edition, 1997. Revisedby Wayne Major, Larry Sadler and Robert Thom.

[10] G. Retz-Schmidt. A REPLAI of SOCCER: Recognizing In-tentions in the Domain of Soccer Games. In Proc. of the 8thECAI, pages 455–457, Munich, Germany, 1988.

[11] M. A. Smith. The Hockey Play Book: teaching hockey sys-tems. Firefly Books Ltd., Willowdale, Ontario, Canada,1996.

[12] G. Sudhir, J. Lee, and A. Jain. Automatic classification oftennis video for high-level content-based retrieval. In IEEEInternational Workshop on Content-Based Access of Imageand Video Database, pages 81–90, Jan 1998.

[13] URL. Hockey videos. Retrieved March 2, 2005from <http://www.sportsnationvideo.com/sportsnation/hockey.html>.

[14] URL. Play manager for hockey. Retrieved March2, 2005 from <http://www.playmanager.com/hockey.asp?sport=1>.

[15] URL. Super puck and foxtrax. Retrieved March 2,2005 from <http://www.vistadevelopment.com/html/super_puck.html>.

[16] W. Zhou, A. Vellaikal, and C. C. J. Kuo. Rule-based videoclassification system for basketball video indexing. In ACMMultimedia Workshops, pages 213–216, 2000.