Research Article
Optimization of LoRa SF Allocation Based on Deep Reinforcement Learning
Algorithm 1
Procedure of deep Q network.
Initialize LoRa node based on LoRaWAN | Initialize replay memory D to capacity N | Initialize action-value function with random weights | Initialize target action-value function with weights | For episode =1,M do do | Initialize and choose state | from LoRa network server(MAC) | For do | With probability select a random action otherwise select execute action in emulator | Observe reward and next state | Store experience | | If episode terminates at step j +1 then | | Else | | End if | Perform a gradient descent step on with respect to the network parameters | If batch size > = memory capacity then | Update | End if | End for | End for |
|