# Game-Theory-Based Multimode Routing Protocol for Internet of Things
## 3 Proposed Mechanism
### Game Modeling
#### 3.3.1 Nodes' Strategies and Utility Function  
\(S\) denotes the strategy of nodes towards routing protocol selection in the game. The routing behavior of a node is determined by three major characteristics. The energy level, consumption ratio, and mobility ratio of the nodes are these metrics. A proactive routing technique is preferred by nodes with a higher degree of energy while highly mobile nodes, on the other hand, require reactive routing for best results.  
The nodes first examine their mobility ratio. For a higher value of mobility, the nodes adjust their default routing protocol to reactive. If the mobility level is higher, then the energy consumption ratio and current level are examined. With the reduced energy consumption ratio, nodes with a higher energy level adapt to proactive routing behaviour. A node's power is tested afterward. For a smart node \(n_{i}\), i.e., \(SmrtN\in\) N, two strategies are defined: \(S_{i}=\big{\{}s_{r},s_{p}\big{\}}\), where \(s_{r}\) represents the strategy with a reactive protocol (\(ReaN\)) and \(S_{i}=s_{p}\) denotes a member of the \(ProN\) class, i.e., proactive node. If two smart nodes with different routing protocols are communicating with each other, then an adequate level of energy and time is wasted on unwanted routing and topology control packets. This wastage can be considered the transmission cost on routing. The payoff functions are determined by node strategies. Equation (14) can be used to define the payoff function for two smart nodes.  
\[U\big{(}n_{i},n_{j}\big{)}=\left\{\begin{aligned} &\frac{1}{C_{ProN,i}}, \frac{1}{C_{RaN,j}}&&\text{ where }RP(n_{i})\
eq RP(n_{j})\\ &(1,1)&&\text{ where }RP(n_{i})=RP\big{(}n_{j})\end{aligned}\right. \tag{15}\]  
where \(C_{ProN,i}\) is the cost of routing for the class of proactive nodes due to the smart node \(n_{i}\). Between two smart nodes, the following game matrix can be formed:There is no need to change the routing protocol of \(n_{i}\) and \(n_{j}\), if both are using the same routing protocol. If two nodes have distinct routing behaviors, their routing performance will be impaired, as shown in the Table 6. The situation where both the smart nodes operate on different protocols is referred to as the degraded protocols and denoted by \(\Delta\) R and \(\Delta\) P. It is clear from Lemma 1 that the game strageies form a pure Nash Equilibrium.  
**Lemma 1**.: _In the proposed game, the strategy pairs \(\big{(}s_{r},s_{p}\big{)}\) and \((s_{p},s_{r})\) form a pure Nash Equilibrium._  
Proof.: There are two major classes of nodes in the network. These are reactive and proactive classes. Each smart node is allowed to choose either of these two routing protocols. In Table 5 the strategies are given along with the payoffs. In case both the interacting nodes use the same routing protocol then there will be an optimal situation denoted by \((1,\ 1)\). It is clear that the payoff should be less than \(1\) for the cases \((s_{r},s_{p})\) and \((s_{p},s_{r})\). The distinct nodes should change their strategies to gain an optimal payoff. Therefore, according to the definition, the situation is a pure Nash Equilibrium for this game. \(\square\)  
To switch the routing from a costly routing protocol, an evolutionary technique, referred to as the improvement function \(I\), is used.