# A Family of ACO Routing Protocols for Mobile Ad Hoc Networks
## 3 AntOR-Based Protocol
### AntOR Phases
#### 3.2.1 Route Setup
More in detail, the route selecting process of Equation (1) is as follows:  
When a node has the possibility of doing the hop to its neighboring nodes to get the destination \(d\), it calculates the probabilities \(P_{in}^{d}\) of each of these neighbors \(n\) with the regular pheromone value. According to this strategy, we do not choose the routes a priori that we are going to utilize, but we select them as follows:  
* It is generated with a random number rand with uniform probability between zero and one. * The non-overlapping associated intervals with the calculated probabilities \(P_{in}^{d}\) are calculated above. These intervals are associated with each possible neighboring node at the time of selecting the candidate to transmit the message. * Once obtained rand, the associated route is chosen with the interval that corresponds to \(P_{in}^{d}\). For this, the reactive ants are forwarded to the next hop \(n\) having as destination \(d\). Equation (1) is based on a selection mechanism, widely utilized in genetic algorithms, called the roulette selection. This mechanism is also known as the fitness proportionate selection; where \(N\) is the number of existing individuals and \(f_{i}\) the fitness of the \(i\)-th individual, the associated probability of its selection is given by the following equation:  
\[p_{i}=\frac{f_{i}}{\sum_{j=1}^{N}f_{i}} \tag{2}\]  
Reactive Backward Process  
Upon reaching the destination, the RFA becomes an Reactive Backward Ant (RBA). The latter follows the list of visited nodes generated by RFA to return to the source node \(s\). In this process, only the first copy of the forward ant coming is chosen, discarding the remaining. In this way, a unique route is set, and as mentioned previously, the overhead is reduced. Artificial ants are inspired by natural ants, but have some additional capabilities that improve their performance. Therefore, while natural ants deposit pheromone as they are going as they return, the artificial ants have an internal memory where tour nodes' information is stored. This information is utilized by the backward ants in the return, the reason why the return of the ant to the source is done in unicast mode. In this trip, the backward ant is responsible for creating or updating a record in the routing table. This registry stores a value that represents the inversion of the cost in terms of estimated time to send a data packet from the destination node to the source through intermediate nodes. Incrementally, the backward ant calculates an estimate or cost \(c_{i}^{d}\) of time that it would take a data packet to travel through that list \(P\) of nodes to the destination \(d\) from the node \(i\), updating the routing tables. The updating process from the routing table registry is as follows: the backward ant updates the number of hops \(h_{in}^{d}\) and the regular pheromone value \(\tau_{in}^{d}\) from the routing table registry, being \(n\) the previous visited node, \(i\) the current node (which is currently being processed) and \(d\) the destination of the session. Equation (3) summarizes the updating process of the number of hops \(h_{in}^{d}\):  
\[h_{in}^{d}\leftarrow\alpha h_{in}^{d}+(1-\alpha)h\qquad\qquad\alpha\in[0,1] \tag{3}\]  
In this equation, \(h\) is the number of hops that the backward ant has traveled and \(\alpha\) a regulation parameter that indicates how fast the formula to the new information is adapted. In experiments, \(\alpha\) has been always set to the usual value of 0.7.