Unmanned equipment control method based on model-based high-sample rate deep reinforcement learning
Through the model-based high sample rate deep reinforcement learning method, the interaction between the Actor-Critic policy model and the environmental state transition model is used to generate a large number of training samples, which solves the problems of inflexible line planning and low data sample efficiency in unmanned equipment control. It improves the accuracy and safety of the control strategy and reduces the cost of training time and the risk of equipment collision.
Patent Information
- Application Number
- CN202210963402.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-11
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2042-08-11
AI Technical Summary
In the existing unmanned equipment control technology, line planning is inflexible, complex scenarios lack response strategies, and a large number of samples required for training models are difficult to guarantee, resulting in low data sample efficiency, increasing time costs and equipment collision risks.
Using a model-based high sample rate deep reinforcement learning method, a large number of training samples are generated through the interaction between the Actor-Critic policy model and the environmental state transfer model, improving the model accuracy and control strategy optimization capabilities, reducing the number of real environment interactions, and providing high accuracy simulated environment.
It improves the accuracy and safety of the unmanned equipment control strategy, reduces the training time cost, reduces the risk of equipment collision, and achieves efficient control strategy optimization.
Smart Images

Figure CN115293334B
Abstract
Description
Technical Field
[0001] The present invention relates to unmanned equipment control technology, and in particular to an unmanned equipment control method based on model-based high-sample rate deep reinforcement learning. Background Art
[0002] At present, the control of unmanned equipment movement is mainly based on traditional control technology, but traditional control technology has a single planning for the route of unmanned equipment, and there are problems such as inflexible route planning and lack of response strategies for complex scenarios. With the rapid development of deep learning technology and reinforcement learning, the powerful feature learning ability of deep neural networks can be used to learn relevant travel features from a large amount of unmanned equipment interaction data. Combined with reinforcement learning to model the travel problem of unmanned equipment, it can achieve obstacle avoidance during the travel of unmanned equipment, but there is still a problem of low data sample efficiency. Summary of the invention
[0003] In order to at least overcome the above-mentioned deficiencies in the prior art, the purpose of the present application is to provide an unmanned equipment control method based on model-based high-sample rate deep reinforcement learning.
[0004] The present application embodiment provides a model-based high-sample rate deep reinforcement learning unmanned equipment control method, including:
[0005] Control the unmanned device to use the strategy in the Actor-Critic strategy model to interact with the real environment to obtain trajectory data, and store the trajectory data in the environment buffer pool;
[0006] Updating the environment state transfer model through the data in the environment buffer pool;
[0007] Using the data in the environment buffer pool, the environment state transfer model and the Actor-Critic strategy model perform multi-step interactive trajectory prediction to generate prediction data, and store the prediction data in the model buffer pool;
[0008] Updating the Actor-Critic strategy model through the data in the model buffer pool;
[0009] The environment state transfer model and the Actor-Critic strategy model are continuously updated iteratively until the current strategy performance meets the expected requirements.
[0010] In the prior art, the time cost required for unmanned equipment to perform operation tests in a real environment is very high. At the same time, when unmanned equipment is running in a real environment for a long time, it is also easy to have problems such as equipment collisions, so it is difficult to guarantee the source of a large number of samples required for training the model of unmanned equipment operation control. When implementing the embodiment of the present application, it is necessary to first construct an Actor-Critic strategy model and an environmental state transition model, wherein the Actor-Critic strategy model is used to provide a strategy for the operation of unmanned equipment in the environment, and the environmental state transition model is used to provide a simulated environment in which the unmanned equipment operates. Through the interaction between the Actor-Critic strategy model and the environmental state transition model, a large number of samples for training the unmanned equipment operation control model can be generated, thereby improving the accuracy of the trained model.
[0011] In the embodiment of the present application, each iteration and update of the model requires controlling the unmanned device to run in the real environment for a short period of time with the strategy in the Actor-Critic strategy model, and the trajectory data generated can update the environmental state transfer model; then the environmental state transfer model and the Actor-Critic strategy model perform multi-step interactive trajectory prediction to generate a large amount of prediction data as training samples to update the Actor-Critic strategy model, thereby ensuring that after a certain round of iterations, the Actor-Critic strategy model can become a more mature model for providing unmanned device control strategies for subsequent testing. The embodiment of the present application can provide a high-precision simulation environment for unmanned device interaction, which is learned through real historical interaction trajectories. During the learning process, the loss function of the environmental state transfer model has a direct impact on the accuracy of the environment. The environmental state transfer model of the embodiment of the present application corresponds to a simulation environment, providing security and efficiency for the interaction of unmanned devices.
[0012] In one possible implementation, controlling the unmanned device to use the strategy in the Actor-Critic strategy model to interact with the real environment to obtain trajectory data includes:
[0013] Inputting the current state data of the unmanned device in the real environment as first state data into the Actor network of the Actor-Critic strategy model, and receiving the action value output by the Actor network as first action data; the first action data is obtained by sampling the mean and variance of the multi-dimensional Gaussian distribution output by the last fully connected layer of the Actor network by the Actor network;
[0014] Controlling the unmanned device to operate in the real environment with the first action data, and obtaining state data of the unmanned device at a next moment as second state data, and a reward value at the next moment as a first reward value;
[0015] The first state data, the first action data, the second state data and the first reward value are used as the trajectory data.
[0016] In a possible implementation, updating the Actor-Critic strategy model using the data in the model buffer pool includes:
[0017] Sampling a fixed number of third state data, second action data, second reward value and fourth state data from the model buffer pool; the fourth state data is state data at a moment after the third state data;
[0018] Inputting the fourth state data into the Actor network of the Actor-Critic strategy model to obtain third action data;
[0019] Inputting the third state data and the second action data into the Critic network of the Actor-Critic strategy model, and obtaining a first state-action function output by the Critic network; the first state-action function is the minimum value of the state-action functions respectively output by at least two current Q networks in the Critic network;
[0020] Inputting the third action data and the fourth state data into the target Q network in the Critic network to obtain a state-action function at the next moment as a second state-action function;
[0021] A first loss function is calculated using the second reward value, the first state-action function, and the second state-action function, and the Critic network is updated.
[0022] In a possible implementation, updating the Actor-Critic strategy model using the data in the model buffer pool further includes:
[0023] The second loss function is calculated and the Actor network is updated through the third state-action function and the action entropy value; the third state-action function is the evaluation value of the Critic network when the action value is selected by the Actor network strategy under the corresponding state data; the action entropy value is the entropy value of the action value selected by the Actor network strategy.
[0024] In a possible implementation, using the data in the environment buffer pool to perform multi-step interactive trajectory prediction on the environment state transition model and the Actor-Critic strategy model to generate prediction data includes:
[0025] Randomly sampling a preset number of fifth state data from the environment buffer pool;
[0026] Inputting the fifth state data into the Actor network of the Actor-Critic strategy model, and obtaining fourth action data output by the Actor network;
[0027] Input the fifth state data and the fourth action data into the environment state transfer model to obtain the state data at the next moment as the sixth state data, and the reward value at the next moment as the third reward value;
[0028] Using the sixth state data as the fifth state data and cyclically acquiring state data and feedback values until a preset condition is reached;
[0029] A preset number of data generated during the cycle is randomly selected as the prediction data.
[0030] In a possible implementation, the environmental state transfer model includes multiple independent sub-models; each sub-model is trained by the same neural network model and samples, and the initial value of each sub-model during training is different.
[0031] In one possible implementation, the environmental state transfer model includes a third loss function and a fourth loss function; the third loss function is generated based on how the current state data and action data are transferred to the state data at the next moment and the generated reward value; the fourth loss function is generated based on the difference between the real environment and the simulated environment generated by the environmental state transfer model.
[0032] In a possible implementation, the fourth loss function is generated based on the following formula:
[0033]
[0034] In the formula, is the performance of the strategy of the unmanned device in the real environment, is the performance of the same strategy of the unmanned device in the simulation environment, s is the sampled state data, a is the sampled action data, γ represents the discount factor in reinforcement learning, |r| max Indicates the maximum absolute value of the return value given by the environment. is the difference between the real environment and the simulated environment;
[0035] in, Calculated according to the following formula:
[0036]
[0037] Where p is the p-norm of state data and action data in the real environment, is the p-norm of the state data and action data in the simulation environment, D TV is the TV distance, and s′ is the state at the next moment.
[0038] In a possible implementation, when the difference between the real environment and the simulated environment is measured by KL divergence, the network loss function used by the environment state transfer model is implemented by the following formula:
[0039]
[0040] In the formula, s n is the state data sampled from the environment buffer pool, a n is the action data sampled from the environment buffer pool, is the next state predicted by the environment state transition model when given state data and action data. For the corresponding The return value, α is a hyperparameter, μ θold is the mean value of the environment state transfer model at the last update, For the corresponding The variance of θ is the latest mean of the environmental state transfer model, σ θ Corresponding to μ θ The variance, D kl is the KL divergence, N is the normal distribution, is the maximum likelihood estimation function.
[0041] In a possible implementation, when the difference between the real environment and the simulated environment is measured by the p-norm, the network loss function used by the environment state transition model is implemented by the following formula:
[0042]
[0043] In the formula, s n is the state data sampled from the environment buffer pool, a n is the action data sampled from the environment buffer pool, is the next state predicted by the environment state transition model when given state data and action data. For the corresponding The return value, α is a hyperparameter, is the mean value of the environment state transfer model at the last update, For the corresponding The variance of θ is the latest mean of the environmental state transfer model, is the quadratic norm, is the maximum likelihood estimation function.
[0044] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0045] 1. The present invention models the interaction between the unmanned equipment and the external environment during movement control as MDP, and proposes a high-accuracy environmental state transition model to provide high-precision simulation trajectory samples.
[0046] 2. The present invention solves the optimization problem of the unmanned equipment travel control strategy by means of Actor and Critic functions, and obtains a high-quality environmental state transfer model through a new loss function optimization.
[0047] 3. The present invention adopts a model-based deep reinforcement learning method to construct an environmental state transfer model to simulate the interaction between unmanned equipment and the external environment, thereby drastically reducing the number of interactions between the unmanned equipment and the real environment. The data generated by the environmental state transfer model can effectively optimize the unmanned equipment's travel control strategy, making the control of the unmanned equipment efficient. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of this application, and do not constitute a limitation of the embodiments of the present invention. In the drawings:
[0049] Figure 1 This is a schematic diagram of the steps of the method of the embodiment of the present application;
[0050] Figure 2 This is a schematic diagram of the Actor network structure of an embodiment of the present application;
[0051] Figure 3 This is a schematic diagram of the Critic network structure of an embodiment of the present application;
[0052] Figure 4 This is a schematic diagram of the structure of the environment state transfer model of the embodiment of the present application. DETAILED DESCRIPTION
[0053] To make the purpose, technical scheme and advantages of the embodiment of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the embodiment of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0054] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0055] Please refer to Figure 1 , which is a flow chart of the unmanned equipment control method based on model-based high-sample rate deep reinforcement learning provided in an embodiment of the present application. Furthermore, the unmanned equipment control method based on model-based high-sample rate deep reinforcement learning may specifically include the contents described in the following steps S1-S6.
[0056] S1: Control the unmanned device to use the strategy in the Actor-Critic strategy model to interact with the real environment to obtain trajectory data, and store the trajectory data in the environment buffer pool;
[0057] S2: updating the environment state transfer model through the data in the environment buffer pool;
[0058] S3: Using the data in the environment buffer pool, the environment state transfer model and the Actor-Critic strategy model perform multi-step interactive trajectory prediction to generate prediction data, and store the prediction data in the model buffer pool;
[0059] S4: updating the Actor-Critic strategy model through the data in the model buffer pool;
[0060] S5: Continuously iteratively update the environment state transfer model and the Actor-Critic strategy model until the current strategy performance meets the expected requirements.
[0061] In the prior art, the time cost required for unmanned equipment to perform operation tests in a real environment is very high. At the same time, when unmanned equipment is running in a real environment for a long time, it is also easy to have problems such as equipment collisions, so it is difficult to guarantee the source of a large number of samples required for training the model of unmanned equipment operation control. When implementing the embodiment of the present application, it is necessary to first construct an Actor-Critic strategy model and an environmental state transition model, wherein the Actor-Critic strategy model is used to provide a strategy for the operation of unmanned equipment in the environment, and the environmental state transition model is used to provide a simulated environment in which the unmanned equipment operates. Through the interaction between the Actor-Critic strategy model and the environmental state transition model, a large number of samples for training the unmanned equipment operation control model can be generated, thereby improving the accuracy of the trained model.
[0062] In the embodiment of the present application, each iteration and update of the model requires controlling the unmanned device to run in the real environment for a short period of time with the strategy in the Actor-Critic strategy model, and the trajectory data generated can update the environmental state transfer model; then the environmental state transfer model and the Actor-Critic strategy model perform multi-step interactive trajectory prediction to generate a large amount of prediction data as training samples to update the Actor-Critic strategy model, thereby ensuring that after a certain round of iterations, the Actor-Critic strategy model can become a more mature model for providing unmanned device control strategies for subsequent testing. The embodiment of the present application can provide a high-precision simulation environment for unmanned device interaction, which is learned through real historical interaction trajectories. During the learning process, the loss function of the environmental state transfer model has a direct impact on the accuracy of the environment. The environmental state transfer model of the embodiment of the present application corresponds to a simulation environment, providing security and efficiency for the interaction of unmanned devices.
[0063] In one possible implementation, controlling the unmanned device to use the strategy in the Actor-Critic strategy model to interact with the real environment to obtain trajectory data includes:
[0064] Inputting the current state data of the unmanned device in the real environment as first state data into the Actor network of the Actor-Critic strategy model, and receiving the action value output by the Actor network as first action data; the first action data is obtained by sampling the mean and variance of the multi-dimensional Gaussian distribution output by the last fully connected layer of the Actor network by the Actor network;
[0065] Controlling the unmanned device to operate in the real environment with the first action data, and obtaining state data of the unmanned device at a next moment as second state data, and a reward value at the next moment as a first reward value;
[0066] The first state data, the first action data, the second state data and the first reward value are used as the trajectory data.
[0067] When the embodiment of the present application is implemented, the Actor-Critic strategy model includes an Actor network and a Critic network, and the Actor network and the Critic network respectively include a fully connected layer and an activation layer set in sequence. When the Actor network outputs the mean to the variance according to its last fully connected layer, the sampling in the Gaussian distribution is nonlinearly mapped using the tanh function to ensure that the final action values are all within the valid range. When the first state data is input into the Actor network, the Actor network generates the first action data corresponding to the first state data, and the first action data is a strategy for controlling the operation of the unmanned device in the real environment. When the unmanned device is controlled by the strategy to operate in the real environment, the state data of the unmanned device after the strategy is executed, that is, the second state data, can be obtained, and the reward value generated after the execution of the strategy, that is, the first reward value, can also be obtained; in this way, the first state data, the first action data, the second state data and the first reward value form a set of sample pairs of unmanned devices running in the real environment, and the sample is stored in the environment buffer pool and used to update the simulation environment.
[0068] In a possible implementation, updating the Actor-Critic strategy model using the data in the model buffer pool includes:
[0069] Sampling a fixed number of third state data, second action data, second reward value and fourth state data from the model buffer pool; the fourth state data is state data at a moment after the third state data;
[0070] Inputting the fourth state data into the Actor network of the Actor-Critic strategy model to obtain third action data;
[0071] Inputting the third state data and the second action data into the Critic network of the Actor-Critic strategy model, and obtaining a first state-action function output by the Critic network; the first state-action function is the minimum value of the state-action functions respectively output by at least two current Q networks in the Critic network;
[0072] Inputting the third action data and the fourth state data into the target Q network in the Critic network to obtain a state-action function at the next moment as a second state-action function;
[0073] A first loss function is calculated using the second reward value, the first state-action function, and the second state-action function, and the Critic network is updated.
[0074] When the embodiment of the present application is implemented, the Critic network is divided into a target Q network and at least two current Q networks. When evaluating the action selected in the current state, the current Q network is used for calculation, and the network with a small Q value is selected for their results to update the Actor network. The Actor network is used by unmanned equipment to decide what actions to take when encountering different environments. The Actor network proposed in the embodiment of the present application corresponds to the unmanned equipment; the Critic network is used to evaluate the impact of the Actor network when selecting a certain action. The Critic network proposed in the embodiment of the present application corresponds to the evaluation. Therefore, the environmental state transfer model, the Actor strategy network and the Critic network can constitute a complete model-based high-sampling deep reinforcement learning algorithm. The walking of the drone is to drive the motors in each driving mechanism of the unmanned equipment. According to the model-based high-sampling deep reinforcement learning algorithm, it can be learned that when the unmanned equipment faces different states, the relevant parameters of the motors of each driving mechanism are adjusted to cope with them.
[0075] In the embodiment of the present application, updating the Actor-Critic strategy model is equivalent to the secondary training of the strategy model after supplementing the data, wherein the third state data, the second action data, the second reward value and the fourth state data should be the data in a sample pair, that is, the third state data, the second action data, the second reward value and the fourth state data should be in a corresponding relationship. The first state action function is the evaluation of the third state data and the second action data as input data output by the Critic network. The third state data and the second action data can be understood as the current state data and the current action data, and the first state action function is the evaluation of the current action data under the current state data conditions; the second state action function is the evaluation of the third action data and the fourth state data output by the Critic network under the conditions of the third action data and the fourth state data. The third action data is the action at the next moment relative to the current, the fourth state data is the state at the next moment, and the first state action function is the evaluation of the action data at the next moment under the state data conditions at the next moment; the second reward value is the reward value for executing the second action data in the environment, and the first loss function can be calculated by the second reward value, the first state action function and the second state action function to update the Critic network.
[0076] For examples, see Figure 2 , shows the structure of the Actor network in this embodiment. The Actor network in this embodiment includes 3 fully connected layers and a rule layer arranged in sequence. Each layer of the fully connected network contains 256 neurons. The input is the current or given state, and the output is the action to be taken when facing this state.
[0077] For examples, see Figure 3 In this embodiment, the Critic network includes two current Q networks, and their network structures are exactly the same, including 3 fully connected layers and a rule layer set in sequence. Each layer of the fully connected network contains 256 neurons. The input is a given state and its corresponding action, and the output is the evaluation value under this scenario.
[0078] In a possible implementation, updating the Actor-Critic strategy model using the data in the model buffer pool further includes:
[0079] The second loss function is calculated and the Actor network is updated through the third state-action function and the action entropy value; the third state-action function is the evaluation value of the Critic network when the action value is selected by the Actor network strategy under the corresponding state data; the action entropy value is the entropy value of the action value selected by the Actor network strategy.
[0080] When the embodiment of the present application is implemented, the loss function of the Actor network consists of two parts. The first part is the evaluation value of the Critic network when the strategy selects a certain action in a certain state, that is, the state-action value function, and the second part is the entropy of the strategy selecting the action, so that the Actor network can be updated more accurately.
[0081] In a possible implementation, using the data in the environment buffer pool to perform multi-step interactive trajectory prediction on the environment state transition model and the Actor-Critic strategy model to generate prediction data includes:
[0082] Randomly sampling a preset number of fifth state data from the environment buffer pool;
[0083] Inputting the fifth state data into the Actor network of the Actor-Critic strategy model, and obtaining fourth action data output by the Actor network;
[0084] Input the fifth state data and the fourth action data into the environment state transfer model to obtain the state data at the next moment as the sixth state data, and the reward value at the next moment as the third reward value;
[0085] Using the sixth state data as the fifth state data and cyclically acquiring state data and feedback values until a preset condition is reached;
[0086] A preset number of data generated during the cycle is randomly selected as the prediction data.
[0087] When the embodiment of the present application is implemented, the fifth state data is input as the current state data into the Actor network, and the current decision action generated for the current state data, that is, the fourth action data, can be obtained; since the environmental state transfer model is to simulate the environment, after the fifth state data and the fourth action data are input into the environmental state transfer model, the fifth state data and the fourth action data can be run in the simulation environment to generate the state data at the next moment, that is, the sixth state data, and the reward value generated by the fourth action data, that is, the third reward value. In the embodiment of the present application, multiple interactive trajectory prediction refers to inputting the newly obtained sixth state data as the current state data into the Actor network to start the loop process, and each loop will generate a sample pair, which includes the current state, current action, reward value and the next moment state. The preset condition for the loop can be to reach a predetermined number of loops, or to set thresholds for certain variables. The embodiment of the present application does not make any restrictions here.
[0088] For examples, see Figure 4 The environmental state transfer model of this embodiment is an integrated model composed of multiple neural network models. For each of the neural network models, 4 layers of full connection and 3 activation functions are set in turn. Each layer of full connection is set with 300 hidden layers, and the activation function uses swish; the input of the model is a randomly given state and the action under the state, and the output is the state at the next moment and the reward value at this time.
[0089] In a possible implementation, the environmental state transfer model includes multiple independent sub-models; each sub-model is trained by the same neural network model and samples, and the initial value of each sub-model during training is different.
[0090] When the embodiment of the present application is implemented, the environment state transfer model is combined into an integrated environment state transfer model through multiple neural network models, which has the ability to capture the uncertainty in the dynamic transfer of the real environment. The mean and variance of the output of each individual sub-model are different, and more trajectory data of different scenes can be generated when interacting with the drone, which is conducive to the learning of the policy network. The loss function of the environment state transfer model is a unique design, which is a collection model. Each collection model includes a fully connected layer and an activation layer set in sequence, including the prediction of the state and reward value at the next moment. The mean and variance of the output state and reward value of the last fully connected layer of the environment state transfer model use Gaussian distribution to increase the adaptability of the model to complex environments.
[0091] In one possible implementation, the environmental state transfer model includes a third loss function and a fourth loss function; the third loss function is generated based on how the current state data and action data are transferred to the state data at the next moment and the generated reward value; the fourth loss function is generated based on the difference between the real environment and the simulated environment generated by the environmental state transfer model.
[0092] In an embodiment of the present application, the environmental state transfer model uses a uniquely designed network loss function. The design of the loss function is derived based on theoretical analysis. The design of the loss function not only considers how the current state and action are transferred to the state at the next moment and the reward value, but also considers the differences between the real environment and the simulated environment. The loss function designed using these two has the ability to capture the uncertainty of the environment.
[0093] In a possible implementation, the fourth loss function is generated based on the following formula:
[0094]
[0095] In the formula, is the performance of the strategy of the unmanned device in the real environment, is the performance of the same strategy of the unmanned device in the simulation environment, s is the sampled state data, a is the sampled action data, γ represents the discount factor in reinforcement learning, |r| max Indicates the maximum absolute value of the return value given by the environment. is the difference between the real environment and the simulated environment;
[0096] in, Calculated according to the following formula:
[0097]
[0098] Where p is the p-norm of state data and action data in the real environment, is the p-norm of the state data and action data in the simulation environment, D TV is the TV distance, and s′ is the state at the next moment.
[0099] When the embodiment of the present application is implemented, the environmental state transition model is to construct a performance lower bound of the unmanned equipment control strategy in a real environment. This performance lower bound is established in a simulated environment. This performance lower bound is still valid for the policy iteration based on the model, and this performance lower bound also ensures monotonic convergence during the policy iteration based on the model, which is achieved by the following formula:
[0100]
[0101] It is worth noting that the characteristic of the performance lower bound is that the optimization of performance in the real environment has nothing to do with the agent's strategy itself.
[0102] In a possible implementation, when the difference between the real environment and the simulated environment is measured by KL divergence, the network loss function used by the environment state transfer model is implemented by the following formula:
[0103]
[0104] In the formula, s n is the state data sampled from the environment buffer pool, a n is the action data sampled from the environment buffer pool, is the next state predicted by the environment state transition model when given state data and action data. For the corresponding The return value, α is a hyperparameter, is the mean value of the environment state transfer model at the last update, For the corresponding The variance of θ is the latest mean of the environmental state transfer model, σ θ Corresponding to μ θ The variance, D kl is the KL divergence, N is the normal distribution, is the maximum likelihood estimation function.
[0105] When implementing the embodiments of the present application, for unmanned robot control, the inventors found that the difference between the real environment and the simulated environment is measured by KL divergence, and the network is trained using the interaction data between the unmanned robot and the real environment. When the training error is less than a threshold, the training can be stopped, and better results can be obtained; For the corresponding The return value is Corresponding to state s n Execute a n After transfer to state The reward value of this process; To predict the state and reward value at the next moment after a given state and action, that is For a given state s n and a n After that, predict the state at the next moment and return value When updating the environment state transfer model, it is necessary to sample the next moment state and reward value of the real environment from the environment buffer pool as the update target of the environment state transfer model. The network loss function ensures that the environment state transfer model can fit the trajectory data in the real environment.
[0106] Specifically, when the difference between the real environment and the simulated environment is measured using KL divergence, it can be characterized as:
[0107]
[0108] And the performance of the unmanned robot's strategy in the real environment is transformed into an unconstrained optimization problem, namely:
[0109]
[0110] in, is an adjustable hyperparameter, which can be used to derive the network loss function used by the environment state transfer model.
[0111] In a possible implementation, when the difference between the real environment and the simulated environment is measured by the p-norm, the network loss function used by the environment state transition model is implemented by the following formula:
[0112]
[0113] In the formula, s n is the state data sampled from the environment buffer pool, a n is the action data sampled from the environment buffer pool, is the next state predicted by the environment state transition model when given state data and action data. For the corresponding The return value, α is a hyperparameter, is the mean value of the environment state transfer model at the last update, For the corresponding The variance of θ is the latest mean of the environmental state transfer model, is the quadratic norm, is the maximum likelihood estimation function.
[0114] When implementing the embodiment of the present application, for drone control, the inventors found that the difference between the real environment and the simulated environment is measured using the p-norm, and the network is trained using the interaction data between the drone and the real environment. When the training error is less than a threshold, the training can be stopped, and better results can be obtained; For the corresponding The return value is Corresponding to state s n Execute a n After transfer to state The reward value of this process; To predict the state and reward value at the next moment after a given state and action, that is For a given state s n and a n After that, predict the state at the next moment and return value When updating the environment state transfer model, it is necessary to sample the next moment state and reward value of the real environment from the environment buffer pool as the update target of the environment state transfer model. The network loss function ensures that the environment state transfer model can fit the trajectory data in the real environment.
[0115] Specifically, the difference between the real environment and the simulated environment can be measured using the Lipschitz continuous transformation into the p-norm. Specifically, the connection between the environment dynamics model and the p-norm is constructed, which is characterized as:
[0116]
[0117] In the formula, Represents a dynamic transfer model on a real environment, Represents a dynamic transfer model on a simulation environment.
[0118] And when the difference between the real environment and the simulated environment is measured using the p-norm, the corresponding formula is:
[0119]
[0120] When the performance of the drone's strategy in the real environment is turned into an unconstrained optimization problem, the optimization formula when measured using the p-norm is:
[0121]
[0122] in, is an adjustable hyperparameter, which can be used to derive the network loss function used by the environment state transfer model.
[0123] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0124] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or it can be an electrical, mechanical or other form of connection.
[0125] The units described as separate components may or may not be physically separated. As units, it is obvious that a person of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0126] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0127] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a grid device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0128] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. Unmanned equipment control method based on high sample rate deep reinforcement learning of the model, It is characterized in that include: Control the unmanned device to use the strategy in the Actor-Critic strategy model to interact with the real environment to obtain trajectory data, and store the trajectory data in the environment buffer pool; Updating the environment state transfer model through the data in the environment buffer pool; Using the data in the environment buffer pool, the environment state transfer model and the Actor-Critic strategy model perform multi-step interactive trajectory prediction to generate prediction data, and store the prediction data in the model buffer pool; Updating the Actor-Critic strategy model through the data in the model buffer pool; Continuously iteratively update the environmental state transfer model and the Actor-Critic strategy model until the current strategy performance meets the expected requirements; Controlling unmanned equipment to use the strategies in the Actor-Critic strategy model to interact with the real environment to obtain trajectory data includes: Inputting the current state data of the unmanned device in the real environment as first state data into the Actor network of the Actor-Critic strategy model, and receiving the action value output by the Actor network as first action data; the first action data is obtained by sampling the mean and variance of the multi-dimensional Gaussian distribution output by the last fully connected layer of the Actor network by the Actor network; Controlling the unmanned device to operate in the real environment with the first action data, and obtaining state data of the unmanned device at a next moment as second state data, and a reward value at the next moment as a first reward value; The first state data, the first action data, the second state data and the first reward value are used as the trajectory data; Updating the Actor-Critic strategy model using the data in the model buffer pool includes: Sampling a fixed number of third state data, second action data, second reward value and fourth state data from the model buffer pool; the fourth state data is state data at a moment after the third state data; Inputting the fourth state data into the Actor network of the Actor-Critic strategy model to obtain third action data; Inputting the third state data and the second action data into the Critic network of the Actor-Critic strategy model, and obtaining a first state-action function output by the Critic network; the first state-action function is the minimum value of the state-action functions respectively output by at least two current Q networks in the Critic network; Inputting the third action data and the fourth state data into the target Q network in the Critic network to obtain a state-action function at the next moment as a second state-action function; A first loss function is calculated using the second reward value, the first state-action function, and the second state-action function, and the Critic network is updated.
2. The unmanned equipment control method based on model-based high sample rate deep reinforcement learning according to claim 1, It is characterized in that Updating the Actor-Critic strategy model using the data in the model buffer pool further includes: The second loss function is calculated and the Actor network is updated through the third state-action function and the action entropy value; the third state-action function is the evaluation value of the Critic network when the action value is selected by the Actor network strategy under the corresponding state data; the action entropy value is the entropy value of the action value selected by the Actor network strategy.
3. The unmanned equipment control method based on model-based high sample rate deep reinforcement learning according to claim 1, It is characterized in that Using the data in the environment buffer pool to perform multi-step interactive trajectory prediction on the environment state transfer model and the Actor-Critic strategy model to generate prediction data includes: Randomly sampling a preset number of fifth state data from the environment buffer pool; Inputting the fifth state data into the Actor network of the Actor-Critic strategy model, and obtaining fourth action data output by the Actor network; Input the fifth state data and the fourth action data into the environment state transfer model to obtain the state data at the next moment as the sixth state data, and the reward value at the next moment as the third reward value; Using the sixth state data as the fifth state data and cyclically acquiring state data and feedback values until a preset condition is reached; A preset number of data generated during the cycle is randomly selected as the prediction data.
4. The unmanned equipment control method based on model-based high sample rate deep reinforcement learning according to claim 1, It is characterized in that The environmental state transfer model includes multiple independent sub-models; each sub-model is trained by the same neural network model and samples, and the initial value of each sub-model during training is different.
5. The unmanned equipment control method based on model-based high sample rate deep reinforcement learning according to claim 1, It is characterized in that The environmental state transfer model includes a third loss function and a fourth loss function; the third loss function is generated based on how the current state data and action data are transferred to the next moment state data and the generated reward value; the fourth loss function is generated based on the difference between the real environment and the simulated environment generated by the environmental state transfer model.
6. The unmanned equipment control method based on model-based high sample rate deep reinforcement learning according to claim 5, It is characterized in that The fourth loss function is generated based on the following formula: In the formula, is the performance of the strategy of the unmanned device in the real environment, The performance of the same strategy of the unmanned device in the simulation environment, represents the discount factor in reinforcement learning, Indicates the maximum absolute value of the return value given by the environment. is the difference between the real environment and the simulated environment; in, Calculated according to the following formula: In the formula, is the p-norm of the state data and action data in the real environment, is the p-norm of the state data and action data in the simulation environment, is the TV distance, For the next moment, is the sampled state data, is the sampled action data.
7. The unmanned equipment control method based on model-based high sample rate deep reinforcement learning according to claim 6, It is characterized in that When the difference between the real environment and the simulated environment is measured by KL divergence, the network loss function used by the environment state transfer model is implemented by the following formula: In the formula, is the state data sampled from the environment buffer pool. is the action data sampled from the environment buffer pool, is the next state predicted by the environment state transition model when given state data and action data. For the corresponding The return value, is a hyperparameter, is the mean value of the environment state transfer model at the last update, For the corresponding The variance of is the latest mean of the environmental state transfer model, For the corresponding The variance of is the KL divergence, is a normal distribution, log( ) is the maximum likelihood estimation function.
8. The unmanned equipment control method based on model-based high sample rate deep reinforcement learning according to claim 6, It is characterized in that When the difference between the real environment and the simulated environment is measured by the p-norm, the network loss function used by the environment state transfer model is implemented by the following formula: In the formula, is the state data sampled from the environment buffer pool. is the action data sampled from the environment buffer pool, is the next state predicted by the environment state transition model when given state data and action data. For the corresponding The return value, is a hyperparameter, is the mean value of the environment state transfer model at the last update, For the corresponding The variance of is the latest mean of the environmental state transfer model, is the quadratic norm, log( ) is the maximum likelihood estimation function.
Citation Information
Patent Citations
Humanoid robot gait control method based on model correlated reinforcement learning
CN106094813A
Sample pool construction method and device and algorithm training method and device
CN110717600A
Unmanned aerial vehicle end-to-end control method based on deep reinforcement learning
CN111460650A
Reinforcement learning method for optimizing experience playback sampling strategy
CN111461347A
Iterative reinforcement learning method for high-efficiency value function of shared recurrent neural network
CN111582441A
