Research Article

SV2G-ET: A Secure Vehicle-to-Grid Energy Trading Scheme Using Deep Reinforcement Learning

Algorithm 1

Deep Q-Network.
Input: Energy price, vehicle volume, Reward
Output: Deep Q-Network parameters.
(1)DNN parameters is initialized randomly.
(2), a target parameter is initialized.
(3)for epsiode = 1 to do.
(4)Get .
(5)for timestep t = 1 to do.
(6)With probability select action randomly.
(7)Select action and reward is calculated to proceed to the next state, i.e., .
(8)State transition details (, , , ) are stored.
(9)Calculate loss function
(10)Update the parameter using Gradient Descent algorithm
(11)For each N, copy weights from to
(12)end for
(13)end for