  The task offloading technology plays a vital role in the Internet of Vehicles
(IoV), by satisfying the diversified demands of the vehicles, such as the
energy consumption and processing latency of the computing task. Different from
the previous works, on the one hand, they ignored the wireless interference of
communications among vehicle-to-vehicle (V2V), as well as between vehicles and
roadside units (RSU); on the other hand, the available resources of parked
vehicles on the roadside and other moving vehicles on the road are also
ignored. In this paper, first of all, we adopt a truncated Gaussian
distribution for modeling the vehicle moving speed, instead of the simplistic
average speed models in prior studies. Then, with the consideration of wireless
interference and effective communication duration existing in V2V and RSUs, we
establish an analytical framework of the task offloading, characterized by the
energy consumption and processing delay, by integrating computing resources of
parked/moving vehicles and RSUs. Furthermore, inspired by the method of
multi-agent deterministic policy gradient (MADDPG), we address a joint
optimization of the energy consumption and processing delay of the computing
task, while ensuring the load balancing of the resources. Finally, the
simulations demonstrate the effectiveness and correctness of the proposed
MADDPG. In particular, compared with the current popular methods of the task
offloading, the MADDPG shows the best performance, in terms of convergence
speed, energy consumption and processing delay.
