| Algorithm 1 FL-DDPG-based Offloading Method |
| Initialize actor network and critic network Initialize target network with weights and critic network Initialize experience replay memory for each episode do Initialize parameters for simulation in VEC environment Generate randomly an initial state for each vehicle agent for each time slot do for each agent do Determine transmission power for offloading by selecting an action , is a sampled noise Execute the action receive reward , and observe new state Store the tuple into experience replay memory Sample randomly a mini-batch of samples from experience replay memory Update the critic and actor network via Equations (14) and (16) Update target networks via Equations (17) and (18) If episode == then Upload the parameters to the VECS controller according to Equation (19) Download the parameters from the VECS controller to each vehicle |