Automatic driving control model determination method, control method, equipment and medium

By combining imitation learning and reinforcement learning, using GAIL algorithm to obtain additional rewards from experts and weighted update rewards, the problems of low training efficiency of autonomous driving control models and non-convergence of strategies are solved, and rapid training and stable strategy learning are achieved.

CN118963359AInactive Publication Date: 2024-11-15CHENGDU UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 6 Cited by

Patent Information

Application Number
CN202411062283.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-05
Publication Date
2024-11-15
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In reinforcement learning, the training efficiency of the autonomous driving control model is low, mainly due to the difficulty in setting the reward function and the useless exploration of the agent in the early and mid-term, resulting in the risk of the strategy not converging.

Method used

By combining imitation learning and reinforcement learning, using GAIL algorithm to train discriminators to obtain additional rewards from experts, and weighted with instant rewards, update the policy network and action value network, quickly explore the basic strategies.

Benefits of technology

It significantly improves the training speed of the autonomous driving control model, avoids the training non-convergence problem caused by unreasonable settings of reward functions, and can perform well in sparse reward environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118963359A_ABST
    Figure CN118963359A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic driving control model determination method, a control method, equipment and a medium, and relates to the technical field of reinforcement learning, and the method comprises the steps: inputting an extracted state-action pair to a trained discriminator, obtaining an extra expert reward corresponding to the current state-action pair, and obtaining a final expert reward; afterwards, extra rewards of experts and instant rewards given by the environment jointly participate in state-action value calculation in the action value network, and then parameter updating is carried out on the strategy network and the action value network. The training of the discriminator is obtained based on expert trajectory data training, so that the extra expert rewards given by the discriminator can guide the intelligent agent to better train in the direction of the expert trajectory data, and the training process can be completed more quickly. A GAIL algorithm in imitation learning is applied to introduction of the discriminator, so that the automatic driving control model is trained in a mode of combining imitation learning and reinforcement learning, and the training speed of the automatic driving control model is increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of reinforcement learning technology, and in particular to an autonomous driving control model determination method, control method, device and medium based on imitation learning and reinforcement learning. Background Art

[0002] Reinforcement learning training requires the agent's interactive environment to provide a reward function. The reward function directly determines how well the agent performs, but the setting of the reward function is often limited by people's understanding of the environment. In a reinforcement learning task, the setting of the reward function often takes a lot of time, and even if a suitable reward function is set, in the early and middle stages of the agent training, because a usable basic strategy has not been formed. The agent will do a lot of useless exploration and attempts in the interactive environment, and there is even a risk of non-convergence of the strategy. For example, in the simulation environment of autonomous driving or robot control, because the feature information involved is too complex, it is difficult to design a reasonable reward for the agent, or the reward value set is too sparse, and the agent has to go through a lot of useless exploration before it can explore a basic and feasible strategy. Therefore, the efficiency of using existing reinforcement learning algorithms to train agent strategy models is relatively low. Summary of the invention

[0003] The purpose of this application is to provide an autonomous driving control model determination method, control method, device and medium, which trains the autonomous driving control model by combining imitation learning and reinforcement learning, thereby improving the speed of autonomous driving control model training.

[0004] To achieve the above objectives, this application provides the following solutions:

[0005] In a first aspect, the present application provides a method for determining an autonomous driving control model, the method comprising:

[0006] A target experience replay pool is constructed based on the interaction trajectory data between the agent and the environment; each tuple of information in the interaction trajectory data includes the agent observation state at time t, the agent action at time t, the instant reward at time t and the agent observation state at time t+1; the data volume of the target experience replay pool reaches a preset capacity; the agent is an autonomous driving vehicle; t=1, 2, 3, ..., T;

[0007] Extract a number of sample data from the target experience replay pool, input the extracted state-action pairs into the trained discriminator, and obtain the expert additional reward corresponding to the current state-action pair; the discriminator is trained based on the expert trajectory data and the GAIL algorithm; the framework of the GAIL algorithm includes a generator and a discriminator; the generator applies the policy network in the reinforcement learning algorithm; the expert trajectory data is the interaction trajectory data between the expert agent and the environment; the expert agent is an agent with an intelligence level higher than a preset level;

[0008] According to the extracted sample data and the updated rewards, the SAC algorithm is applied to update the parameters of the policy network and the action value network to obtain an updated policy network; the updated policy network is the autonomous driving control model; the action value network is used to assist the policy network in updating its parameters; the updated reward is the weighted sum of the immediate reward and the corresponding expert additional reward.

[0009] In a second aspect, the present application provides an automatic driving control method, the automatic driving control method comprising:

[0010] Obtain real-time agent observation status data of the agent’s environment;

[0011] The real-time agent observation state data is input into the agent strategy model of the agent to obtain the action instructions of the agent; the agent strategy model is obtained based on the automatic driving control model determination method.

[0012] In a third aspect, the present application provides a computer device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the autonomous driving control model determination method or the autonomous driving control method.

[0013] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the autonomous driving control model determination method or the autonomous driving control method.

[0014] According to the specific embodiments provided in this application, this application discloses the following technical effects:

[0015] The present application provides a method for determining an autonomous driving control model, a control method, a device and a medium, wherein the extracted state-action pair is input to a trained discriminator to obtain an expert additional reward corresponding to the current state-action pair, and then the expert additional reward and the immediate reward given by the environment are jointly involved in the calculation of the state-action value in the action value network, thereby updating the parameters of the policy network and the action value network. Since the training of the discriminator is based on expert trajectory data and GAIL algorithm training, the expert additional reward given by the discriminator can guide the intelligent agent to better train in the direction of the expert trajectory data, which is conducive to completing the training process faster. The introduction of the discriminator applies the GAIL algorithm in imitation learning, so the present invention trains the autonomous driving control model by combining imitation learning and reinforcement learning, thereby improving the speed of autonomous driving control model training. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 This is an application environment diagram of an automatic driving control model determination method in one embodiment of the present application;

[0018] Figure 2 A flowchart of a method for determining an automatic driving control model provided in one embodiment of the present application;

[0019] Figure 3 A schematic diagram of the GAIL algorithm framework provided in an embodiment of the present application;

[0020] Figure 4 A schematic diagram of a reinforcement learning training process using a SAC algorithm provided in an embodiment of the present application;

[0021] Figure 5 A schematic diagram of a detailed training process of reinforcement learning using the SAC algorithm provided in an embodiment of the present application;

[0022] Figure 6 A schematic diagram comparing a Gaussian distribution strategy and an energy model-based strategy provided in an embodiment of the present application;

[0023] Figure 7 A flowchart of an automatic driving control method provided in accordance with another embodiment of the present application.

[0024] Figure 8A schematic diagram of the structure of a computer device provided in accordance with another embodiment of the present application. DETAILED DESCRIPTION

[0025] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0026] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0027] The automatic driving control model determination method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be set up separately, integrated on the server 104, or placed on the cloud or other servers. The terminal 102 can send the interaction trajectory data between the agent and the environment to the server 104, and the server 104 receives the interaction trajectory data between the agent and the environment. The server 104 builds a target experience replay pool, extracts a number of sample data from the target experience replay pool, and inputs the extracted state-action pair to the trained discriminator to obtain the expert additional reward corresponding to the current state-action pair; the discriminator is obtained based on the expert trajectory data and the GAIL algorithm training; the framework of the GAIL algorithm includes a generator and a discriminator; the generator adopts the policy network in the reinforcement learning algorithm; according to the extracted sample data and the updated reward, the SAC algorithm is applied to update the parameters of the policy network and the action value network to obtain the updated policy network. The server 104 can feedback the obtained updated policy network to the terminal 102. In addition, in some embodiments, the method for determining the autonomous driving control model may also be implemented independently by the server 104 or the terminal 102. For example, the terminal 102 may directly perform a policy network parameter update process on the interaction trajectory data between the intelligent agent and the environment in which it is located, or the server 104 may obtain the interaction trajectory data between the intelligent agent and the environment in which it is located from the data storage system, and perform a policy network parameter update process on the interaction trajectory data between the intelligent agent and the environment in which it is located.

[0028] The terminal 102 may be, but is not limited to, various desktop computers, laptop computers, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, etc. The portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers, or may be a cloud server.

[0029] In an exemplary embodiment, Figure 2 As shown, a method for determining an automatic driving control model is provided. The method is executed by a computer device, and can be executed by a computer device such as a terminal or a server alone, or can be executed by a terminal and a server together. In the embodiment of the present application, the method is applied to Figure 1 The server 104 in the example is used as an example to illustrate, including the following steps 201 to 203. Among them:

[0030] Step 201, construct a target experience replay pool based on the interaction trajectory data between the agent and the environment; each tuple of information in the interaction trajectory data includes the agent observation state at time t, the agent action at time t, the immediate reward at time t and the agent observation state at time t+1; the data volume of the target experience replay pool reaches a preset capacity; the agent is an autonomous driving vehicle; t=1, 2, 3, ..., T.

[0031] In the field of autonomous driving, the state may include but is not limited to the following features (the specific features are determined by the specific simulation environment): visual image features (including road features, obstacle features, etc.), sensor features (such as the distance between the vehicle and surrounding obstacles, etc.), the vehicle's own speed, direction, etc. Under autonomous driving, the action is generally set in a continuous action space, that is, the steering wheel turning angle to the left or right, the amplitude of stepping on the accelerator and the brake, etc.

[0032] Step 202, extracting a number of sample data from the target experience replay pool, inputting the extracted state-action pairs into the trained discriminator, and obtaining the expert additional reward corresponding to the current state-action pair; the discriminator is trained based on the expert trajectory data and the GAIL algorithm; the framework of the GAIL algorithm includes a generator and a discriminator; the generator adopts the policy network in the reinforcement learning algorithm; the expert trajectory data is the interaction trajectory data between the expert agent and the environment; the expert agent is an agent with an intelligence level higher than a preset level.

[0033] Step 203, based on the extracted sample data and the updated rewards, apply the SAC algorithm to update the parameters of the policy network and the action value network to obtain an updated policy network; the updated policy network is the autonomous driving control model; the action value network is used to assist the policy network in updating its parameters; the updated reward is the weighted sum of the immediate reward and the corresponding expert additional reward.

[0034] By implementing the above steps 201 to 203, a new training framework combining reinforcement learning and imitation learning is designed. This method can enable the agent to explore a basic strategy more quickly during the reinforcement learning training process based on the existing expert trajectory data. In addition, the training of the updated reward participation strategy network and action value network is obtained by weighted summing the immediate reward and the corresponding expert additional reward, which can avoid the problem of non-convergence of training caused by unreasonable reward function settings to a certain extent.

[0035] In another exemplary embodiment of the present application, imitation learning is applied, and the GAIL algorithm is used to train the discriminator to use the expert trajectory to give real-time expert extra rewards. The algorithm framework of the GAIL algorithm is as follows: Figure 3 As shown. The objective function of the GAIL algorithm can be expressed as:

[0036]

[0037] Among them, (s, a) represents a state-action pair, π E represents the expert strategy network, π represents the strategy network to be learned, D represents the discriminator, and D(s,a) represents the probability that the discriminator identifies (s,a) as being generated by the expert strategy. and Respectively represent π and π E The expectation of the generated state-action pair (s, a). In the GAIL algorithm, the game between the strategy π and the discriminator D is a mutually adversarial training process, which can be divided into 4 steps:

[0038] (1) Train the discriminator D to accurately identify the source of the trajectory (from the real expert trajectory sample distribution or from the strategy π). The training goal of the discriminator D is to maximize the game objective function

[0039] (2) Train the policy network π to generate realistic samples to deceive the discriminator D, thereby making the discriminator D inaccurate. The training goal is to minimize the objective function

[0040] (3) By repeating steps (1) and (2), strategy π generates samples that fit the real expert trajectory samples under the guidance of discriminator D, while discriminator D finds the difference between generated samples and real samples to continuously improve the accuracy of discrimination.

[0041] (4) Ultimately, the samples generated by the policy network π can perfectly fit the distribution of real samples, while the discriminator D cannot correctly distinguish between generated samples and real samples, and the game between the two will reach a Nash equilibrium. At this point, the samples generated by the policy network π can be mistaken for real ones, and the probability of them being identified as real samples by the discriminator D will approach 0.5.

[0042] The discriminator network is a simple multi-layer perceptron with input (s, a) and output dimension 1, which represents the probability value that the current (s, a) distribution belongs to the expert trajectory distribution. The probability value is mapped to the interval [-1, 1], and this value is called the expert extra reward. It is called an extra reward because it has been verified experimentally that directly using this reward to cover the original environment reward is not effective. Therefore, in actual use, it will be multiplied by a certain weight and added to the reward value given by the environment itself before calculating the state-action value in the subsequent action value network.

[0043] Therefore, step 201, constructing a target experience replay pool based on the interaction trajectory data between the agent and the environment, specifically includes:

[0044] (11) Acquire the expert trajectory data and the interaction trajectory sample data between the target intelligent agent and the environment in which it is located; the target intelligent agent is the intelligent agent for which the autonomous driving control model is to be constructed.

[0045] (12) The interactive trajectory sample data and the expert trajectory data are placed into an experience replay pool according to a preset ratio to form a mixed experience replay pool.

[0046] (13) Using the mixed experience replay pool as the target experience replay pool.

[0047] In another exemplary embodiment of the present application, before executing step 202 "extracting a number of sample data from the target experience replay pool and inputting the extracted state-action pairs to the trained discriminator", it also includes: training the discriminator based on expert trajectory data and GAIL algorithm to obtain the trained discriminator, specifically including:

[0048] (21) The agent observation state in the expert trajectory data is input to the generator, and the generator outputs the agent action, which is recorded as the agent predicted action.

[0049] (22) The first state-action pair and the second state-action pair are respectively input into the discriminator for adversarial training; the first state-action pair refers to the state-action pair consisting of the agent observation state in the expert trajectory data and the corresponding agent predicted action; the second state-action pair refers to the agent observation state in the expert trajectory data and the corresponding agent action (action in the experience pool).

[0050] (23) Adjusting the network parameters of the generator and the discriminator according to the output result of the discriminator until the game between the generator and the discriminator reaches a Nash equilibrium, thereby obtaining the trained discriminator.

[0051] In another exemplary embodiment of the present application, the expert extra reward output by the discriminator and the immediate reward given by the environment are used to train the action value network (Q network). Let the Q network obtain high discriminator scores and high rewards as the goal, and its iteration is:

[0052]

[0053] Among them, D exp is the score of the discriminator, β is the weight factor of the expert’s additional reward, r env (s, a) is the default immediate reward of the environment itself, γ is the discount factor, and H is the entropy of the strategy, which is expressed as follows:

[0054]

[0055] The role of entropy is equivalent to a regularization term. After adding it, when optimizing strategies, reinforcement learning not only needs to maximize the expected return, but also needs to make the strategy distribution as even as possible so that the entropy is as large as possible.

[0056] The difference between the score output by the Q network and the score of the discriminator is that the score given by the discriminator only represents the probability that the current state-action pair belongs to the expert trajectory state-action pair, that is, it is similar to an immediate reward. The score output by the Q network not only tends to give high scores to those states-actions that are similar to the expert trajectory state-action pair distribution, but also tends to give high scores to those states-actions that are similar to the expert trajectory distribution after the action is made. That is, only when the next state of the environment is still similar to the expert trajectory after the decision is made, a high evaluation will be given.

[0057] After determining the state-action value calculation method of the Q network output (i.e. replacing the traditional pure use of the environment's immediate reward with an updated reward calculated from the environment's immediate reward and the expert's additional reward), the normal reinforcement learning phase will be entered, using the Soft Actor-Critic (SAC) algorithm for training. Figure 4As shown, step 203, based on the extracted sample data and the updated reward, the SAC algorithm is applied to update the parameters of the policy network and the action value network to obtain an updated policy network, which specifically includes:

[0058] (31) The extracted sample data and updated rewards are input into the action value network to obtain the state-action value.

[0059] (32) The extracted sample data and the state-action value are input into the strategy network to obtain the action selected by the current strategy.

[0060] (33) Update the policy network parameters according to the output of the policy network.

[0061] (34) The agent makes decisions based on the current observable state and the updated policy network, and replaces the interaction trajectory sample data in the mixed experience replay pool with the current observable state, the action selected by the current policy, the immediate reward of the current policy, and the agent's observed state at the next moment in a first-in-first-out manner.

[0062] The training process of the policy network and action value network of the SAC algorithm is the existing training process, except that the samples of the extracted state-action pairs need to be input into the trained discriminator to calculate the expert's additional reward, and finally the immediate reward in the existing SAC algorithm is replaced by the updated reward. Figure 5As shown in the figure, the reinforcement learning part includes an actor network (strategy network), which is responsible for selecting appropriate actions using the observed state of the agent. There are two types of critic networks. One is the value function network (V network), which is responsible for measuring the value of the state. The input is the observed state and the output is a specific value (state value V). The role of the target value function network is to back up and fix the parameters of the state value function network to avoid the target that needs to be fitted from changing all the time, which can make the training more stable. The second is the state-action value function network (Q network), which has the input of state-action and the output of a specific value (state-action value Q). The reason for using two Q networks is that this can avoid overestimation of the Q value. The experience replay pool stores the current trajectory and historical trajectory of the strategy to eliminate the time correlation between training samples. The expert trajectory pool is used to store expert trajectories for training the expert guidance module. The mixed trajectory replay pool adds some expert trajectories on the basis of the experience replay pool. The expert guidance module contains a discriminator and the actor network in the reinforcement learning process for adversarial training, and continuously provides expert extra rewards during the reinforcement training process to encourage the agent to explore the states that have appeared in the expert trajectory. First, the data in the mixed experience pool is sampled for updating the state-action value network and the state value network, and then the outputs of these two networks are used to guide the update of the policy network. The agent uses the updated policy network to make decisions, obtain new trajectory sample data, and replace the earlier interaction trajectory data in a first-in, first-out manner.

[0063] Description of the reinforcement learning training process: (see https: / / zhuanlan.zhihu.com / p / 385658411?utm_id=0)

[0064] The update process of the state-action value function network Q is:

[0065] Using data from the experience pool (s t ,a t ,s t+1 ,r t+1 ) to update the network, with (s t ,a t ,s t+1 ,r t+1 ) as an example. Using the Bellman optimal equation, calculate the state s t Estimate of the true value Represents the output value of the target value function network.

[0066]

[0067] Where r(s t ,a t )=βD exp(s,a)+r env (s,a), which is the weighted sum of the environment reward and the expert's additional reward.

[0068] Direct use of t ,a t Input into state-action value network 0 and state-action value network 1 to obtain two Q values ​​q0 and q1 as predicted state-action value estimates. Finally, use MSELoss as the loss function, use the predicted and true state-action values ​​as input to calculate the loss, and train state-action value network 0 and state-action value network 1.

[0069] The update process of the value function network V is:

[0070] Using data from the experience pool (s t ,a t ,s t+1 ,r t+1 ) to update the network, with (s t ,a t ,s t+1 ,r t+1 ) as an example.

[0071]

[0072] According to the above formula, the value estimate is calculated, V(s t ) as the state value estimate, where Q(s t ,a t ) choose the smaller of the two q values, π(a t ∣s t ) represents the policy network, which is s t Select a in the state t probability.

[0073] The output of the value function network is used as the estimated value of the predicted state, and the loss is calculated using MSELoss. The value function network is trained and the parameters are copied to the target value function network at certain intervals.

[0074] Update process of actor network (strategy network):

[0075] The policy network is trained by maximizing the following objective:

[0076]

[0077] Where α represents the coefficient. min (s t ,a t ) is the smaller of the two q values.

[0078] In another exemplary embodiment of the present application, in order to better learn suboptimal strategies, the previous Gaussian distribution form is no longer used, but an energy-based model is used to represent the strategy network. The essence of the energy model is to use a function to map a point in space to a scalar, which is called energy.

[0079] For an energy function ε(x), its distribution can be expressed as:

[0080]

[0081] Where Z(ε) is the partition function, which is used as a normalization operation.

[0082] Z = ∫e -ε(x) dx (5)

[0083] The strategy in reinforcement learning can be expressed as:

[0084] π(a t ∣s t )∝exp(-ε(s t ,a t )) (6)

[0085] Where ε is the energy function, which is used to describe the energy of the state-action pair and can be fitted by a neural network. In this method, in order to establish a connection with the Q function, it can be defined as follows:

[0086]

[0087] So the strategy can be expressed as:

[0088]

[0089] From the definition of reinforcement learning value function, we can get:

[0090]

[0091] Substituting formulas (4), (5), (7), (8), and (9) into the equations, we can obtain:

[0092]

[0093] Where π represents the strategy in reinforcement learning, the input is the feature value observed by the agent, and the output is the action selected by the agent. soft (s t ,at ) Represents when the agent is in s t When in state, if you make a t action, the total benefit that the agent can expect to obtain at the end of the round. soft (st ) represents the agent is in s t state, the total benefit that the agent can expect to obtain at the end of the round is soft (s t ,a t ) can be iteratively calculated with each other. is the advantage function, representing t If we take a t π, the degree to which the action is better or worse than following the current policy. * represents the optimal strategy; α is a weight factor, which is a variable that measures the strategy in exploration and utilization. The larger α is, the more the strategy is inclined to explore all actions, and the smaller α is, the more the strategy is inclined to choose the current optimal action; and Represent the state-action value and state value respectively; (s t ,a t ) represents the state-action pair at time t.

[0094] like Figure 6 As shown in , Gaussian distribution strategies usually fail to capture suboptimal strategies when faced with optimal strategies with multimodal distributions, such as Figure 6 In contrast, the energy model-based strategy is significantly more adaptable in complex environments such as multi-peak strategy distribution, such as Figure 6 As shown in (b) in .

[0095] Compared with the existing technology, the advantage of this method is that it performs well in training speed. It can quickly learn a basic reinforcement learning strategy using expert trajectories, and this method has good performance in a simulation environment with "sparse rewards". It can avoid the problem of non-convergence of training caused by unreasonable reward function settings to a certain extent.

[0096] In this embodiment, first, there is an over-reliance on reward design in reinforcement learning. In a reinforcement learning task, the performance of the agent is often most related to the reward design, and the reward design determines the upper limit of the agent's performance. This often requires a high level of understanding of the task and the simulation environment to achieve. When the environmental reward design is unreasonable, the agent will do a lot of useless exploration during the training process, resulting in poor performance in the end. This problem can be solved by introducing imitation learning and directly obtaining additional expert rewards from the expert trajectory mentioned in this method. The problem that the agent strategy performance cannot exceed the expert strategy performance in imitation learning. Because imitation learning only approximates the agent strategy to the expert trajectory strategy, although it can quickly learn a basic feasible strategy, it is impossible to rely solely on imitation learning to improve and optimize the later strategy. Therefore, in this method, the advantage of reinforcement learning that can continuously explore and optimize its own strategy is used to solve this problem. That is, reinforcement learning and imitation learning are combined, a discriminator structure is learned synchronously in reinforcement learning training, expert trajectories are used for training, and the policy network in reinforcement learning is used as a generator. The discriminator will continue to provide additional rewards in reinforcement training, encourage the agent to train in the direction of the expert trajectory, and speed up the training of the reinforcement learning process. Second, both reinforcement learning and imitation learning may encounter the problem that the strategy adopted by the agent is too single, resulting in poor performance when the environment changes slightly. In the present invention, the learning of the policy network is modeled in the form of an energy model, so that it is more in line with the policy distribution of the Q-value network, so that various suboptimal strategies can be better learned. Third, the problem of experience pool playback involved in reinforcement learning training can help make the training more stable and break the trajectory correlation of the current strategy. Expert trajectories can be put in an appropriate amount to increase the speed of its training. However, if the expert trajectory is used purely, the correlation between the trajectories is too strong and is not suitable for training. Therefore, a mixed expert trajectory pool is adopted to mix the historical strategy trajectory, the current trajectory, and the expert trajectory. It can both increase the training speed and ensure the stability of the training.

[0097] The present application also provides an application scenario, which applies the above-mentioned method for determining an autonomous driving control model. Specifically: The method for determining an autonomous driving control model provided in this embodiment can be applied in an autonomous driving scenario. The method for determining an autonomous driving control model provided in this embodiment belongs to the exercise strategy selection link of the vehicle intelligent body in the autonomous driving scenario.

[0098] The embodiment of the present application also provides an automatic driving control method implemented based on the above automatic driving control model determination method. The automatic driving control model used in this method is similar to the implementation scheme recorded in the above method, so the specific limitations can be referred to the limitations of the automatic driving control model determination method above, which will not be repeated here.

[0099] In an exemplary embodiment, Figure 7 As shown, an automatic driving control method is provided, characterized in that the automatic driving control method includes:

[0100] Step 301, obtaining real-time agent observation state data of the environment in which the agent is located.

[0101] Step 302: input the real-time agent observation state data into the automatic driving control model to obtain the action instructions of the agent; the automatic driving control model is obtained based on the automatic driving control model determination method.

[0102] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 8 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store video tag processing data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an automatic driving control model determination method or an automatic driving control method is implemented.

[0103] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0104] In an exemplary embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0105] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0106] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0107] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0108] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0109] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.

[0110] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0111] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. A method for determining an automatic driving control model, characterized in that: The automatic driving control model determination method comprises: A target experience replay pool is constructed based on the interaction trajectory data between the agent and the environment; each tuple of information in the interaction trajectory data includes the agent observation state at time t, the agent action at time t, the instant reward at time t and the agent observation state at time t+1; the data volume of the target experience replay pool reaches a preset capacity; the agent is an autonomous driving vehicle; t=1, 2, 3, ..., T; Extract a number of sample data from the target experience replay pool, input the extracted state-action pairs into the trained discriminator, and obtain the expert additional reward corresponding to the current state-action pair; the discriminator is trained based on the expert trajectory data and the GAIL algorithm; the framework of the GAIL algorithm includes a generator and a discriminator; the generator adopts the policy network in the reinforcement learning algorithm; the expert trajectory data is the interaction trajectory data between the expert agent and the environment; the expert agent is an agent with an intelligence level higher than a preset level; According to the extracted sample data and the updated rewards, the SAC algorithm is applied to update the parameters of the policy network and the action value network to obtain an updated policy network; the updated policy network is the autonomous driving control model; the action value network is used to assist the policy network in updating its parameters; the updated reward is the weighted sum of the immediate reward and the corresponding expert additional reward.

2. The method for determining an automatic driving control model according to claim 1, characterized in that: The target experience replay pool is constructed based on the interaction trajectory data between the agent and the environment, including: Acquire the expert trajectory data and the interaction trajectory sample data between the target intelligent agent and the environment; the target intelligent agent is the intelligent agent for which the autonomous driving control model is to be constructed; The interactive trajectory sample data and the expert trajectory data are placed into the experience replay pool according to a preset ratio to form a mixed experience replay pool; The mixed experience replay pool is used as the target experience replay pool.

3. The method for determining an automatic driving control model according to claim 1, characterized in that: Before executing the step of "extracting a number of sample data from the target experience replay pool and inputting the extracted state-action pairs to the trained discriminator", it also includes: training the discriminator based on the expert trajectory data and the GAIL algorithm to obtain the trained discriminator, specifically including: The agent observation state in the expert trajectory data is input to the generator, and the generator outputs the agent action, which is recorded as the agent predicted action; The first state-action pair and the second state-action pair are respectively input to the discriminator for adversarial training; the first state-action pair refers to the state-action pair consisting of the agent observation state and the corresponding agent predicted action in the expert trajectory data; the second state-action pair refers to the agent observation state and the corresponding agent action in the expert trajectory data; The network parameters of the generator and the discriminator are adjusted according to the output result of the discriminator until the game between the generator and the discriminator reaches a Nash equilibrium, thereby obtaining the trained discriminator.

4. The method for determining an automatic driving control model according to claim 2, characterized in that: According to the extracted sample data and updated rewards, the SAC algorithm is applied to update the parameters of the policy network and action value network to obtain the updated policy network, which includes: Input the extracted sample data and updated rewards into the action value network to obtain the state-action value; Inputting the extracted sample data and the state-action value into the strategy network to obtain the action selected by the current strategy; Updating the policy network parameters according to the output of the policy network; Make decisions based on the current observable state and the updated policy network, and replace the interaction trajectory sample data in the mixed experience replay pool with the current observable state, the action selected by the current policy, the immediate reward of the current policy, and the agent's observed state at the next moment in a first-in-first-out manner.

5. The method for determining an automatic driving control model according to claim 4, characterized in that: The expression of the state-action value is: where \(H(\pi(a|s)) = E\) a~π [-\log(\pi(a|s))]; In the formula, represents the expectation; τ represents the target experience pool; D exp (s,a) represents the expert extra reward output by the discriminator; r env (s,a) represents the default immediate reward of the environment itself; β is the weight factor of the expert's additional reward; γ is the discount factor; H is the entropy of the strategy; (s,a) represents the state-action pair; π(a|s) represents the probability of the agent observing state s and taking action a; Q π (s',a') represents the state-action value of the next state s' and the next action a'; π represents the policy network; α represents the temperature coefficient, that is, the weight value of the adjustment entropy; E a~π represents the expectation for action a under the policy network π.

6. The method for determining an automatic driving control model according to claim 1, characterized in that: The policy theoretical expression of the policy network is: in, In the formula, π * represents the optimal strategy; α is a weight factor; is the advantage function; and Represent the state-action value and state value respectively; (s t ,a t ) represents the state-action pair at time t.

7. An automatic driving control method, characterized in that: The automatic driving control method comprises: Obtain real-time agent observation status data of the agent’s environment; The real-time agent observation state data is input into the agent strategy model of the agent to obtain the action instructions of the agent; the agent strategy model is obtained based on the automatic driving control model determination method described in any one of claims 1 to 6.

8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the autonomous driving control model determination method described in any one of claims 1 to 6 or the autonomous driving control method described in claim 7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the autonomous driving control model determination method described in any one of claims 1 to 6 or the autonomous driving control method described in claim 7.

Citation Information

Cited By

  • Bridge damper performance detection method and system based on deep learning

    CN120408793A

  • Simulation learning method and device based on stream matching and dynamic reward scheduling

    CN120874953A

  • An imitation learning method and device based on flow matching and dynamic reward scheduling

    CN120874953B

  • Self-adaptive automatic driving method and system for complex road scene

    CN120952098A

  • Automatic driving automobile key scene generation method based on quantum reinforcement learning

    CN121168294A