|
Algorithm 1 Application-driven Task Offloading Strategy based on DQN (ATOS). |
Input: The applications generated by user with sequences ; Output: Offloading strategy ;
-
1:
Initialize to N, Q with random weights , and with weights ;
-
2:
for episode from 1 to do
-
3:
Initialize sequence based on Algorithm 2;
-
4:
With probability select a random action ;
-
5:
Otherwise select ;
-
6:
Set , , and preprocess .
-
7:
Store transition in ;
-
8:
Sample random minibatch of transitions from .
-
9:
if episode terminates at step then
-
10:
Set ;
-
11:
else
-
12:
Set ;
-
13:
Perform a gradient descent step on with respect to the network parameters .
-
14:
Every C steps reset ;
-
15:
return Offloading strategy ;
|