Abstract
The embodiment of the present discloses a method for training a policy model based on reinforcement learning and apparatus, and an electronic device. The method includes: determining an observation data sequence generated by an agent during a time period of executing a target task, a preset time window, and an expert data sequence corresponding to the target task; determining a cost matrix and a transport matrix based on the preset time window, the observation data sequence, and the expert data sequence; determining a reward value for each observation data in the observation data sequence based on the cost matrix and the transport matrix; and training the policy model based on the observation data and the reward value of the observation data.