# Gaming Tree Based Evaluation Model for Badminton Tactic Benefit Analysis and Prediction
## 2 Materials and Methods
### Evaluation Model of Tactical Benefit
#### 2.4.2 Evaluation Model  
The evaluation model for badminton matches includes two steps, i.e., (i) constructing the gaming tree for the history strokes and evaluating the techniques and tactics for two players, and (ii) analyzing the rallies and strokes using the constructed gaming tree. Evaluating. Given a set of existing matches, we first formulize each rally as \(r_{i}=\left\{s_{1}^{i},s_{2}^{i},\ldots,s_{n}^{i}\right\}\) and each stroke as \(s_{k}^{i}=(p_{k^{\prime}}^{i},x_{k^{\prime}}^{i},y_{k^{\prime}}^{i},y_{k+1}^{i})\). Then, we add \(s_{k}^{i}\) into the gaming tree. For example, considering the rally \(r_{i}=\left\{s_{1}^{i},s_{2}^{i},\ldots,s_{n}^{i}\right\}\), we first find if there exist a node \(N\) that has the same \(\left(p_{1}^{i},x_{1}^{i},y_{1}^{i},y_{2}^{i}\right)\) as \(s_{1}^{i}\). If not, we create a new node \(N\) for \(s_{1}^{i}\) in the gaming tree. After that, we update the \(Score(N)\) with \(Score(s_{1}^{i})\). Next, we check the leaves of \(N\) and check the following strokes \(s_{2}^{i},s_{3}^{i},\ldots,s_{n}^{i}\) as \(s_{1}^{i}\). After all the rallies and strokes are evaluated and the gaming tree is constructed, we compute the net benefit for each tree node as follows. \[Net(N)=Score(N)+Max_{N_{i}\text{ is a leaf of }N}(Score(N_{i})), \tag{5}\]  
where \(Max_{i\in m}(Score(N_{i}))\) denote the function that finds the maximal value among \(\left\{Score(N_{1})\,,Score(N_{2})\,,\ldots,Score(N_{m})\right\}\). Consider the example shown in Figure 2, where four rallies are given, and the gaming tree is constructed with nine nodes. Specifically, in the first rally \(r_{1}\), the server \(p_{1}\) wins and continues to serve. In the second rally \(r_{2}\), \(p_{1}\) loses and alternates the service. However, the opponent player \(p_{2}\) loses the rally \(r_{3}\), and the service is alternated again. Finally, the player \(p_{1}\) wins the fourth rally \(r_{4}\) and the match ends. To model this match, we first build the gaming tree and compute the scores for each stroke, then the score of each tree node is obtained. Based on the above, we then compute the net benefit. Clearly, when it starts from \(N_{2}\), the serve player always loses as the net benefit is negative. Figure 1: Illustration of the gaming tree for rallies. However, when it comes to starting from \(N_{1}\), the tactics become complicated, as the opponent has two choices to play, i.e., move to \(N_{3}\) with a benefit of \(-0.0067\) or move to \(N_{4}\) with a benefit of \(0.133\). According to the Nash Equilibrium, the opponent should move to \(N_{3}\) to win this rally. Thus, although in this example the player that serves at \(r_{1}\), \(r_{2}\), and \(r_{4}\) seems to have a higher probability of winning the match, the opponent also has the chance to change the result. This makes our proposed gaming tree not only capable of evaluating how the players have performed in the existing matches by leveraging the net benefit, but also capable of analyzing how the players use their techniques with tactics by finding Nash Equilibriums in the gaming tree. Analysis. Based on the above, we find that the score of each stroke illustrates how important that stroke is to the whole match. Thus, we propose the following rating strategy to find Nash Equilibriums in the gaming tree, which helps analyze the existing strokes, rallies, games, and matches. \[Score^{\prime}(N)=\sum_{s_{i}\in N}Score(s_{i}) \tag{6}\]  
Based on Equation (6), we compute the importance weight \(Score^{\prime}(N)\) of each node \(N\). Next, we propose the win-loss flag table and the Flg\((N)\) function (depicted in Table 1) to determine whether the node \(N\) leads to the server winning or losing. Note that the win-loss table is obtained by following the strategy that the player will choose the best strategy to win the game, and the opponent will make the player lose the game.