## 3 Proposed Method
### Hybrid Protocol-Based Path Selection
This evaluation produces the ultimate goal value, \(F_{TV}\), of each message transition, which denotes the critic network's minimal projected future reward and past reward. The message critic networks construct current Q-values using the starting state (\(I_{S}\)) and action from the sampled batch of data i. The \(F_{TV}\) and current Q-values are utilized to calculate a loss and update the message critic networks. We create two sets of actor networks: the primary actor networks, denoted as \(AN_{1}\), and their corresponding target actor networks, denoted as \(ANT_{1}\), along with a second pair of primary actor networks, \(AN_{2}\), and their corresponding target actor networks, \(ANT_{2}\). These networks are equipped with the following distinct sets of parameters: \(\phi_{AN_{1}}\) and \(\phi_{AN_{2}}\) for the primary actor networks and \(\phi_{ANT_{1}}\) and \(\phi_{ANT_{2}}\) for the target actor networks. To initialize the target actor networks, we set the parameters of \(\phi_{ANT_{1}}\) equal to \(\phi_{AN_{1}}\) and \(\phi_{ANT_{2}}\) equal to \(\phi_{AN_{2}}\). This initialization process helps ensure a smooth and stable learning process to optimize the dissemination of emergency messages within VANETs, allowing the target actor networks to progressively adapt to the evolving communication environment. Figure 3.2We built two critic networks and initialized them with parameters \(\phi_{\text{CN}_{1}}\) and \(\phi_{\text{CN}_{2}}\). The corresponding target networks are defined as \(\phi_{\text{CT}_{N_{1}}}\) and \(\phi_{\text{CT}_{N_{2}}}\). We initialize the target network as follows:

Figure 3.3

Notice the initial state, \(I_{S}\), and select action \(AS\) from the actor network with noise added to the action. Figure 3.4

The parametrized deterministic policy in this case is denoted as \(\mu_{\phi AN_{i}}\) and the upper and lower boundaries of action are denoted as \(AS_{min}\)_and_\(AS_{max}\), respectively. We select a course of action to maximize the Q function as follows:

Figure 3.5

The state, S, and the target action, TA, are given as input to the target Q-network to estimate the target Q-value, \(Q_{\phi_{\text{CT}_{N_{2}}}}\) (S, TA). We select the minimum of the two Q-values to calculate the target value, TV, given as follows:

Figure 3.6

The proposed work adopts the intelligent transportation system (ITS) with two specific systems, namely, the traffic management system (TMS) and the intelligent traffic light (ITL) system. However, smart transportation is an advanced system that offers new services related to different types of transportation and traffic management, allowing users to better understand and use transportation better, in a more integrated and smarter way. Then, emergency messages can be classified into four categories, as follows: road event notifications (i.e., accidents, abnormal vehicles), ambulance alerts, nearby pharmacies, and public works using a light gradient boosting machine (LGBM) algorithm via fog nodes. #### 3.4.2 Light Gradient Boosting Machine (LGBM) Algorithm

A light gradient boosting machine, which is an ensemble algorithm rooted in decision trees, leverages a forward distribution approach. In each iterative step, it fits the message data by considering the negative gradient, essentially training a decision tree. The initial step involves preparing a training dataset, denoted as \(T_{D}=\{(x_{i},\ y_{i})\}_{i=1}^{N}\), where i ranges from 1 to N, signifying N message samples. Each \(x_{i}\) represents a multi-dimensional input vector of dimension M, i.e., \(x_{i}\ \in\ R^{M\times 1}\), while \(y_{i}\ \in\ R\) corresponds to a single numerical target value. Specifically, M is computed as \(M=n_{tw}\times n_{sm}+n_{rt}\), where \(n_{tw}\) represents the time window size, \(n_{sm}\) denotes the number of selected message features, and \(n_{rt}\) reflects the runtime nodes. \(y_{i}\ (i=1,2,3,\dots,\ N)\) is a one-dimensional target value.