# Robust and Secure Data Transmission Using Artificial Intelligence Techniques in Ad-Hoc Networks
## 2 Background  
In BHA, the influenced node used its protocol of routing to discover the destination node itself, having the most limited route that contains the advanced information about the destination node. Despite checking its routing table, this dynamic node will reveal the accessibility of its new path. In this kind of threat, the affected node consistently has the availability to capture the routing information and modify the packet of data as well as discard them. In a flood-based protocol, the reply of the malicious node will be received by the requesting node before getting any kind of reply from any genuine node; in this way, affected and fake paths will be created. After setting up this path, it is presently up to the node whether to drop the packet or to forward the packet to an unidentified location [20]. A Route Request (RREQ) packet is sent to all other nodes through the sensor nodes [21]. A response message (RREP) is transferred back to the source node after receiving the REEQ packets in a special case if the node contains the acquired destination address. If not, the packet is sent to its nearest node, by which the data reach the destination side. The RREP message is sent back to the destination node via the same route after receiving the RREQ message. Therefore, the path is established between the source as well as the destination node. However, at the same time, the BHA node also sends RREP messages quickly as well as with a higher hop count compared to the node on the destination side [22]. This is the behavior of the source node to send data to the node having a higher hop count and then pass data up to the node of BHA. The dropping of data packets has been started and hence leads to a DoS attack inside the network; this scenario is presented in Figure 1.  
The nodes' behavior can be represented based on their hop count, which is listed in Table 1. The value of hop count \"High\" and \"Low\" represents the true and false information contained in the RREP packet [23]. In this research, an Artificial Bee Colony (ABC) algorithm is applied to select the best route (that consumes minimum energy) between a source node and destination node. An asymmetric review was presented by [24] that shows a survey on Swarm Intelligence (SI) techniques and states that it can be used to resolve the problem of feature selection. The concept of SI is increasingly intertwined with algorithms for processing and optimizing the large amount and flows of information. In [25], a survey on different SI algorithms along with their role in the IoT is presented. The authors stated that SI in a wireless network can be used for Cluster Head (CH) selection, for sensor deployment, node localization, and in IoT to minimize the number of hops from the sensor node to the sink node. In [26], Ant Colony Optimization is used as a SI approach in cloud computing to solve the problem of task scheduling. Application of SI in a Cyber-Physical System (CPS) along with challenges is presented by [27]. In MANET, there are several SI techniques available including Firefly, Ant Colony Optimization, Cuckoo Search, Particle Swarm Optimization, ABC, and many more. In this research, we used ABC as an SI approach to select the route formed by the AODV routing protocol. In this research, we used ABC as an SI approach to select the route formed by the AODV routing protocol. Instead of other SI techniques, we have ABC as an optimization algorithm because: \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Malicious**} & **Destination** & **Packet** & **Threat Type** \\  & **Sequence Number** & **Hop Count** & **Drop** & **Threat Type** \\ \hline No & High & High & No & No & No Threat \\ Yes & No & No & Yes & Yes & BHA \\ Yes & No & High & Yes & Yes & BHA \\ Yes & High & No & Yes & Yes & BHA \\ Yes & High & High & Yes & Yes & Gray hole \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Node (normal and malicious) behavior. Figure 1: Packet drop by black hole node.