Evaluation of Trust Algorithm in a Mobile Ad-Hoc Network Using Artificial Engineering

A MANET network is made up of wireless nodes which operate without a defined structure, the arrangement of existing devices does not have any ministerial or control entity . the management tasks are carried out by the teams which are in the network, therefore a MANET network is said to be a managed network. As there is no infrastructure, such as, the bandwidth, availability, input error rate, among others, depend exclusively on the behaviour of the network users. This work presents a functional solution, which decreases the energy consumption in MANET networks, implemented using game theories and genetic algorithms solution. The evaluation of the pay-as-you-go strategy from the modified prisoner dilemma was shown to be an easy to implement and interpret tool for the network equipment. The processes of generation, combination and mutation of strategies demonstrated the in-centive of cooperation in the network, observed in the increase of the average confidence of the nodes, a very high value. The intervention of the protocol with the use of genetic algorithms, demonstrated ot be a form of implementation of solutions for problems of multiple agents, the increase in the evaluation of trust of the nodes was observed, which can be interpreted as a convergence of the nodes to cooperate. The results obtained in the simulations carried out show the functioning of the algorithm implemented and the functionality of the network after its implementation.


Organization of paper
This paper is organized as follows. The introduction which describes the introduction of the work, the field of application and some elements to be taken into account for the construction of the project. The section address the problem, referring to the characteristics that the implemented solution must comply. In this section the main components belonging to the solution are presented, and the theoretical basis of the work carried out is present in this section of the document. In section 2 the most used routing protocols of the Ad hoc networks are presented, showing the main elements of each routing strategy and examples of some protocols. An evaluation of the existing protocols is carried out in order to determine which one would be involved and the functioning of the chosen protocol is described. In section four, the solution is described, focusing on the intervention in each algorithm and the way of construction of the main functions of the confidence algorithm, the generation and mutation of strategies and the evaluation by means of game theory In the section five the results of the intervention are presented, reviewing the operation with respect to variables such as the number of nodes.

2.Literature review
Mobile ad hoc network is wireless networking devices that customise itself and arrange itself dynamically and provide a mobile, multi-hop network. The dependency on fixed-network infrastructure is eliminated from mobile ad hoc networks by considering a mobile node as an intermediary transfer, which expands the mobile node ranges well beyond the base transceivers.The range of movable nodes is expanded beyond their level by mobile ad hoc networks [8,9]. If the nodes want to connect with other nodes outside their reach, however, the packets need to be routed from source to destination by a routing algorithms.We used AODV routing protocol because it operates in a complex network context such as MANET. What a case will lead to certain security threats. Subject to such a circumstance. Wormhole attack is one effective form of a denial of service. Because routing is the cornerstone of all mobile ad hoc communication, the whole communication will come to a standstill if routing faults occur.
[D. O. Akande and M. F. MohdSalleh, 2019] , Authors [9] offered their activities on the performance analysis of improved protocol schemes through their reconsideration, where he said that the vehicle conductive ad-hoc network on the road could be anything that any killer could enter into the network and affect the normal work of the MANET network. This requires an authentication mechanism that limits the entry of the polluted node in the MANET. This paper is a recommended advanced mid-re-encryption algorithm which reduces the overhead pattern in MANET. Through this algorithm, it reduces the proportion of the packet supply and reduces the strength of the reduction, decrease and limit the invasion in the network. The authors will be less likely to attack the MANET Convention by its new method EIRE.
[Y. Song et.al, 2019]: Authors [10] presented their paper on the survey of attacks which can be done in MANET; they presented their research on various attacks and provided comparative research on attacks and approaches to that attack surmount. The author says that in the last three or four years, the MANET attracts so much attention that due to the opportunities given to the network, many studies are around its network and to increase its ability to use it properly. Discuss about the desire for safety within the network which is required for the safety of the authors of the network. Further they provide a habitual and recycled method of surmount detailing the details of attacks on MANET and those practices. They classify these attacks in a variety of categories and provide a comparative study on this attack. The author concludes that the attack on the MANETis a serious problem because it affects the network and its functionality Make sure it is convenient but these benefits and its power cannot be used properly if these security breaches are not resolved.

Research Article
[M. El-Semary and H. Diab, 2019]: Authors [11]] offered their actions on the lasting attack that it is possible to apply these attacks on MANET, even though they mention that the MANET applications are based on periodic exchange of security packets. In their coverage they say that the packets should be sent at important times, because the proper arrangements on those packets can only be reached in a timely manner. It is the responsibility of each node in the MANET network to provide the right place in the right document. When an attacker wants to attack the node network, it takes advantage of MANET vulnerabilities and attacks them. MANET attacker's protection that prevents or delay the attacker's advancement of important security messages from neighboring nodes. It can execute the replay attack by sending the facts of the event happened beforehand.
[Y. Chen, C. Hu, E. H. Wu, S. Chuang and G. Chen ,2018] [12] offered their work on a metric which is safe for delivering messages on MANET which they said that enabled wireless communication between MANET vehicles. The MANET machinery helps people with good transportation safety and efficiency. However, security issues for providing content over the infrastructure prevented wireless communication from MANET applications. They offer a civilian profit-loss Markov (APLM) model to measure the level of reliability of security systems for distribution of MANET content.The author says that the MANET belongs to the class of the genre, where mobile nodes are disconnected through wireless communication.
[ Z. Chen, W. Zhou, S. Wu and L. Cheng,2020] [13]. A novel methodology based upon the study of two-hop neighbor Route Reply packet transport was proposed by fan To verify the sender 's validity, the right scheme is mandatory to produce a single key between the individual sensor node and the basis station. For their method no specific hardware or time sync is appropriate. In addition, for the proposed step of key generation only selfgeographic position is needed. The mechanism of the Route Reply packet incorporates conditional transmission dependent on the legitimacy of the two-hop neighbour transmitting it. Only when each node reversed to the source node validates the two-hop sender node is the path chosen for transmission.
[Ankit Kumar et.al ,2020] [14] suggested a site-based solution in which the neighbour is tested by using directional antennas. The neighbours are authenticated in the direction that the response of the HELLO message comes from and by using verifiers. The approach will detect insider attack even by authenticating the system with pair of wise hidden keys. Furthermore, this technique can only find kinds of wormholes with false neighbours.  [17]. Several QoS parameters such as the latency, latency, packet distribution ratio, energy node and node density were taken into account here.Return Routing Scheme (RRS) and Nodes Scheme Authentication (ANS). The existence of wormhole is found in this system. It operates mostly with the BSR protocol and the importance of the threshold is too important for this solution to succeed.The Stable NeighbourhooD (CECUND) protocol, which detects multi-ended gusts, was proposed by author. No need for advanced hardware, node location information or clock synchronisation specifications are positive points of this approach, but it will only operate if the presence of wormhole significantly increases fake neighbours.
[ M. Ahmad, A. Hameed, A. A. Ikram and I. Wahid, 2019]The Lightweight Counter-measurement (LITEWORP) suggested [18] using guard nodes to detect the wormhole threat. After the wormhole has been found, LITEWORP leaves only the network open mode, which can cause more disruptions. To overcome this, it introduced another MOBIWORP protocol that eliminates malicious nodes from the network, locally or internationally, using central authority. They carried out work on WSN and outlined the security processes focused on the layer review of the networking protocol. The risks and vulnerabilities within them were also established. Their description of safety issues was then different. These challenges are grouped into seven categories: cryptography, key protection, attack and preventative detections; protected routing; protected location safety; and safe data fusion.They have suggested a sober approach for discovering the normal application of statistical analysis for a wormhole attack. False neighbours can detect a sensor triggered by wormhole during their proposed process of exploration, and then a k-means clustering method for detecting wormhole attacks based on their information from their neighbours.

Trusted models
The way in which the measure of confidence is generated, allows us to divide the strategies, structures that contain the actions to be developed, into the types mentioned below we will mention the main characteristics [20] of each types: a) Cluster: This trust scheme uses authentication by means of public keys in the evaluation of a node, these are grouped into clusters which allows a group of nodes to monitor the activity of the equipment directly, the nodes certify the trust of a computer which can be verified with the use of the key and a certificate issued by each neighbour, the nodes which issue trust certificates [21,22] which do not coincide with the evaluation of the Cluster would be considered "malicious" nodes and would lose the possibility of participating in the network [23,24]. b) Social networks: Model based on four components on each computer; Monitor that detects unusual behaviour in the nodes, reputation system that allows the nodes to be qualified acording to their routing or data transmission actions, route manager in charge of selecting the routes they present, and a trusted manager that alerts to the so-called malicious nodes. If a node shows negative behaviour that exceeds the network parameters, this will not be taken into account in the routing process, denying it the possibility of participating in the network. c) Non-cooperative games theory re-transmision: Presents a model which manages trust based on the prisoner's dilemma, each node rationally making decisions about whether or not to broadcast from a neighbouring team based on a proposed strategy, which does not include the other network participants. The strategies used vary for each interaction in order to increase the payout in the game. After several executions of the game, it is expected that changes in the strategies will improve the network. d) Graph Model : This model uses a graph called confidence graph, in which the vertices represent the nodes and the edges represent the confidence that the interconnected nodes have, the value of the confidence, with each interaction in the network a new edge is created or the value associated to the existing one is changed, guaranteeing the veracity of the information [25]. The nodes that have not interacted with each other must estimate the confidence measure using the measures that they have in the network, by means of averages or absolute values of the values of the network traveled. e) Cooperative Games Theory: Seeks to increase the measure of trust by generating joint strategies. In this model, interactions between teams in the choice of strategies can be presented. The payment scheme of the game makes the nodes look for cooperation in the tasks of re-transmission and in the joint construction of strategies, the payment of a team will increase according to its participation in coalitions and to the extent of its collateral. The scheme seeks to increase cooperation between teams quickly and has a memory [26] limited to the behaviour exposed by the nodes in the previous iteration.3.4 Implementation of the trust model After the execution of the confidence algorithm, a node decides to transmit or not. The computer uses information that comes from a neighbouring node, a hopping computer, or a distant node, however as mentioned, a node only evaluts the behaviour of its neighbours. In order to have elements of judgement about the relay of information from equipment more than one jump, a different measure of confidence must be taken into account, than information about the behaviour of distant nodes. We can evaluate the behaviour of distant nodes [27,28,29], in more than one jump, depending on the behaviour of the routes in which they participate, i.e. if a route is successful the nodes within it are "reliable". A team would then be evaluated by the behavior it presents to its neighbours and by the behavior of the routes in which it participates. In this section we will expand on the description of the confidence assessment process, both at the nodes and on the route.

Node confidence
The confidence you have on a node can be evaluated as the number of retransmissions it has made, having as limits the system memory, for example if the taman˜o of the memory is 3, a node wouldhave a confidence evaluated between zero and three. The evaluation includes indiscriminately the routing and transport packets, this value will change with each packet whose destination, at the link level, is the node to be evaluated. A node must then monitor the behaviour of its neighbouring nodes, identify the packets it is to retransmit and verify the retransmission. If the equipment retransmits, the confidence level will increase by one and if it does not detect the retransmission, the confidence level wil decrease by one [30].

Confidence in the Route
The teams that share information are not necessarily neighbours, so routes must be generated between source and destination teams. The correct transmission implies the cooperation of all the nodes belonging to the route. A source team will evaluate the route for the success of the transmission and a destination team will receive the information. To implement this evaluation, the fields containing the identifier of received and pending packages Research Article are used. It is not necessary to receive a confirmation of each package sent, in order to avoid errors of perception [31] . Route confidence will be evaluated as the numberof successful transmissions made, increasing if a successful transmission is detected and decreasing if a retransmission of the package is required. This evaluation would be given to the first node of the path, that is, a node would be affected by the behaviour of all the equipment it shares the path with. Finally, it should be mentioned that this measure would also be limited by a memory, the reasons for the existence of this are similar to those already expressed in the evaluation of a node, however the value of the memory of the route should be less than that of the node, since this measure depends on other equipment and as we will see later the trust in the network is greater than that related to the node.

Confidence-building measure in node
The confidence measure is constructed using the behaviour of a node in the face of information transmission as an input. All the nodes evalut the teams that are one jump away (neighbours) and evaluate the performance of the routes built by the AODV algorithm. The qualification obtained is of public character and is used in the evaluation of the strategy and in the decision making process of broadcasting. Each node would only be evaluated by its neighbours, since it would not be possible to have nodes in formation more than a jump away, in order to avoid the re-sending of information between nodes [32] and the consequent decrease of efficiency in the network, however, the network bond is a measure of the behaviour of nodes more than a jump away and the algorithm implemented would seek to increase this measure. The measured confidence will be the double Cn = {Cu, Cr}, where Cu represents the confidence in the node and Cr represents the confidence in the path. The possible values of Cn depend on the behaviour of node n in the last three retransmissions, a value known as the system memory, therefore Cu {0, 1, 2, 3 } this value would be equal to three if the node made the last three required retransmissions, two if it only retransmitted two of these, one if it only retransmitted one request and zero if it did not retransmit any packet. The variable Cr acts in the same way as the previous one except that it is limited to the last two transmissions and is assigned to the initial node, "first jump", of the assigned route, that is, Cr ∈ {0, 1, 2}. Algorithm 1 : Evaluation of a node function <-Confidence(neighbour) Pass the list of neighbours() while i! = confi.fun) do if i node == neighbour then Return confi.fun end if end while Return 0 end function Algorithms 1 shows the evaluation routine of the confidence in the retransmission of a node, for this evaluation a dynamic table is used which contains the The identification of the neighbours of a node and the evaluation of confidence in it.

confidence on the route
For route confidence evaluation, the transport level packets received by the final recipient are taken into account. Algorithm 2 shows the route evaluation process performed in the 802.11 protocol [33]. The memory of the route used is 2, the value returned by the evaluation in case the node is not found in the list of neighbours is 2 which corresponds to the maximum score.

Result & Analysis
Validating the behaviour of the implemented solution requires first of all verifying the behaviour of the trust measure of the devices in the network [34]. To generate this measure, the confidence that the neighbours have of a Cn node is averaged, separating the confidence by Cu retransmissions and the confidence in the Cr route.  Figure 5,6,7 shows the behaviour of the confidence measure for scenarios with different percentages of nodes acting as sources and a variable number of nodes [35]. It can be seen that the confidence measure increases over time, the final confidence values are not altered by the number of information sources, however they are affected by the number of nodes in the network, the higher confidence value is associated with scenarios containing more nodes. The solution reaches the maximum confidence value more quickly among more equipment acting as information sources. We can observe the behaviour of the confidence in the Cr network in figure 7. It is important to highlight that this measure presents a relatively low value and that the highest qualification is obtained by the scenarios with a lower number of nodes, this can be explained by the non-interference and the possible lower number of transmitting nodes.

Research Article
It is then confirmed that the solution increases the confidence value of the nodes in the network, we also observe that these values tend to stabilize over time, which ensures that the solution continues to be functional for longer periods[39,40] of work.

Conclusion
This work presents a functional solution, which decreases the energy consumption in MANET networks, implemented using game theories and genetic algorithms solution. The evaluation of the pay-as-you-go strategy from the modified prisoner dilemma was shown to be an easy to implement and interpret tool for the network equipment. The processes of generation, combination and mutation of strategies demonstrated the in-centive of cooperation in the network, observed in the increase of the average confidence of the nodes, a very high value. The proposed solution showed a low dependency on the implementation scenario, factors such as the speed of the nodes, the percentage of information sources and the area of simulation did not cause changes in the informaion of the network, while factors such as the numrbeof nodes and the probability of persistence of the parent strategies significantly affected the data transmission rate.