# Wireless Networks under a Backoff Attack: A Game Theoretical Perspective
## 6 Simulations for the CSMA/CA Game
### _Simulation 2: Myopic Solutions_  
We can use (17) and Table 3 to obtain the theoretical solutions for the two player game. The mixed equilibrium actions are \(y_{n}=0.3095\) and \(z_{n}=0.1364\), which yield a payoff of \(-0.05\) for the server and \(0\) for the client. Recall that the CE, obtained using (26), yields the same equilibrium.  
Then, we simulate using RM algorithm for \(n_{2}\in\{1,2,3,4\}\). We set the number of iterations \(T=2000\), and run the learning process \(50\) times. The empirical payoffs obtained are in Table 4, and in Figure 3, the histogram of the mixed actions obtained is represented for all the \(n_{2}\) cases tested. We can  
\begin{table}
\begin{tabular}{l l} \hline \hline \(n_{2}\) & \(u\) \\ \hline
1 & \((-0.0493,-0.0015)\) \\
2 & \((-0.0504,-0.0011,-0.0012)\) \\
3 & \((-0.0502,-0.0011,-0.0011,-0.0013)\) \\
4 & \((-0.0499,-0.0008,-0.0008,-0.0004,-0.0003)\) \\ \hline \hline \end{tabular}
\end{table}
Table 4: Empirical payoffs obtained using RM for each value of \(n_{2}\). The payoff vector \(u\) has the server payoff first and then, the payoff of each client. Observe that payoffs do not significantly vary as the number of players increase. This is consistent with Figure 4: the game tends to the two player situation, even if there are more players.  
Figure 3: Histogram of actions obtained using RM algorithm, for \(n=5\) stations and variable number of malicious stations. Each histogram is computed using \(5\) bins. Cl stands for client. Observe that the action of the server does not vary significantly, whereas the actions of the clients do. Also, observe how as \(n_{2}\) increses, the clients histogram presents two peaks: the biggest close to \(0\) and a smaller peak at another mixed action value. This hints that the game tends to the two player case when there are many clients: all but one client tend to behave as normal stations.  
compare to the theoretical results expected in the two player case, by computing the difference between the actions and payoff obtained using RM (Algorithm 1) and the theoretical values using (17) and (19). The mean difference in mixed actions is \(-0.0224\pm 0.0183\) (mean \(\pm\) standard deviation) for the server and \(0.0056\pm 0.0087\) for the client. The mean difference in payoffs is also small: \(0.0007\pm 0.0024\) for the server and \(-0.0015\pm 0.0013\) for the client. Thus, RM provides a very good approximation to the expected game values.  
It is of special interest noting that, for \(n_{2}\geq 2\), each of the clients distribution presents two peaks, clearer as \(n_{2}\) grows; one of them is nearly 0. We observe that in each game realization all clients but one tend to behave as normal stations (i.e., they tend to play \(ns\)), as can be observed also in Figure 4 for \(n_{2}=4\): client 1 plays a mixed action around \(z=0.5\) and the rest of clients tend to play \(z=0\), that is, they tend to always play \(ns\). This means that the game tends to the two player case, even if there are more than two players. This might be due to having payoffs such that they do not encourage having more than one player behaving selfishly at once. As we saw in Figure 1, as the number of clients increased, the advantages of playing \(s\) for the clients decreased: the difference between the normal behavior throughput and the throughput obtained when using a different backoff shrank. Since the payoff of the clients is proportional to this difference, it is not enough gain for them to play \(ns\): the loss when they play \(s\) and the server plays \(d\) do not compensate the gains when they play \(s\) and the server plays \(nd\); hence, it is better for them playing \(ns\).