Research Article

Collaborative Caching in Edge Computing via Federated Learning and Deep Reinforcement Learning

Algorithm 2

The edge cache algorithm based on Dueling-DDQN.
1: Input: The capacity of the experience replay poll , train starts , size of minibatch , discount factor , -greedy exploration , learning rate , number of episodes , target network update period
2: Initialization:
3: For ep do
4: Input initial state space .
5: Fordo
6:  Choose an action via -greedy policy
7:  Execute action and get the next status and reward , judge whether is a terminal state.
8:  Put the sample into the experience replay pool.
9:  Ifthen
10:   Randomly sample training samples with a minibatch size K from the experience replay pool .
11:   Calculate the target value by formula (5)
12:   Apply the SGD method to calculate equation (6) to update the weight
13:  End if
14:  Ifthen
15:   Update target Q network parameters
16:  End if
17:  
18: End for
19: End for