# Game Theory Meets Wireless Sensor Networks Security Requirements and Threats Mitigation: A Survey
## 5 Game Theory-Based General Trust Model  
The trustworthiness mechanisms are considered the foremost concern of the WSNs security specialists. Therefore, different network security frameworks are discussed in the literature [3; 4; 33; 115]. Figure 2 shows the general process of a trust model, similar to the model considered in [116]. This trust model is divided into four main stages. The first stage involves gathering the information from the traffic stream, then followed by the second stage that applies the suitable trust model. Afterward, the analyzed data throughout the trust model is checked using the intrusion detection system within the third stage. The fourth stage is in charge of punishing or rewarding the infected or benevolent packets, respectively. This general mechanism aims at attaining energy efficient networks against the intrusion impact using the general principle of learning automata by sampling the incoming packets [86; 117]. The same principle can be used to enhance WSNs security using game theory [87]. In designing the game model, the nature of WSN should be taken into account. Maintaining the same data transfer from multiple nodes, keeping low power consumption, accommodating large number of nodes, and providing timely decision are of paramount importance to the WSN operation. In fact, the reputation is the essential factor that the different game theoretic approaches rely on to establish robust trust models against the WSN threats scenarios. In the first scenario, the model targets the selfish nodes. In the second scenario, the model addresses the malicious nodes that are considered a harm for the WSN. Finally, in the most harmful scenario, the WSN suffers from selfish and malicious nodes for which an intelligent model is desired. In this paper, we discuss a general trust model based on game theory to mitigate the WSNs security threats leading to detecting the malicious nodes and those nodes that act selfishly. Figure 3 illustrates the data flow of the general trust model in which the selected game is used to face the designated attack based on the observed information from the whole network. Apparently, this general system collects the needed information to select the best game that fits the detected attack and the mentioned classifications in Section 4. After this, the captured data are analyzed to pinpoint the network features, attack type, and appropriate defense strategy that will be applied, whether in a cooperative or non-cooperative game. It can be obviously seen that two possible directions are available to apply the game-theory-based defense strategy. The cooperative process is shown as follows: the cooperating WSN nodes calculate three main parameters, namely, cooperation, reputation, and security level for every participant node. Then, these parameters are listed in an information list \(N(i)\). Afterward, every node is checked if it acts selfishly or maliciously. Consequently, the node is rewarded or punished. On the one hand, if the node is rewarded (benevolent node), the NE existence is checked. A timer is used as a threshold for the NE existence to reduce the risk in the real-time sensitive applications. This time out is application  
Figure 2: General Trust and Reputation Model Mechanisms. dependent. Then, if NE exists, the optimal solution is achieved; otherwise, the node will be applied again to the suitable defense strategy based on game theory. On the other hand, if the node is selfish or malicious, it will be exposed to a punishment check. Consequently, if it is the first time the node acts selfishly or due to a hardware malfunction reason, a time out will be given to the node then the node status will return again to the neighbor list \(N(i)\). Finally, if the node recursively behaves selfishly, the node turns malicious, or the time out expires, the node will be excluded from routing. The above is executed till reaching the NE based on the application sensitivity leading to the optimal solution.