|
Algorithm 2 Next hop selection algorithm at D2D device i
|
Input: Packet with RRH destination
Output: Best next hop to
Variables: RoutingTable, j
while Battery lifetime is not equal to zero do
Receive a packet with destination RRH
Determine the next-hop corresponding to the path with the smallest path quality (PQ):
Send packet to j with selected level of
Receive feedback/reward, from j
Update the Q value for Q-learning
Update the corresponding entry in the table, RRHTable
end while
|