Path planning decision optimization method based on least squares truncated temporal difference learning
By using the least squares truncated time domain difference learning method in robot path planning, combined with importance sampling and gradient clipping, the problems of policy evaluator convergence and low sample utilization in deep reinforcement learning are solved, and efficient path planning is achieved. Decision optimization.
Patent Information
- Application Number
- CN202111682698.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2041-12-31
AI Technical Summary
Existing deep reinforcement learning methods have problems such as difficulty in ensuring the convergence of the policy evaluator, low sample utilization, poor asymptotic optimality, and difficulty in feature representation learning in robot path planning, resulting in low control efficiency and accuracy.
A path planning decision-making optimization method based on least squares truncated time domain difference learning is adopted. Through basis function learning, evaluator learning, executor learning and path planning steps, the projected mean square Bellman error is used as the truncation index to adaptively switch to least squares. Multiply time domain difference and linear time domain difference are used to update parameters, combined with importance sampling and gradient clipping, to improve policy evaluation and executor learning efficiency.
It improves the learning speed and accuracy of strategy evaluation, improves the efficiency and accuracy of robot path planning, reduces control complexity, and enhances the stability of the learning process.
Smart Images

Figure CN114518751B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robot intelligent control technology, and in particular to a path planning decision optimization method based on least squares truncated time-domain difference learning. Background Art
[0002] Path planning is to find a collision-free and safe path from the starting point to the end point for the robot within a specified area. For robot path planning, traditional methods represented by graph search-based algorithms, artificial potential field methods, and random sampling methods are currently used. However, the above technical methods can usually only complete path planning decision optimization tasks in specific environments, lack learning ability and generalization performance, and also rely on relevant prior information such as robot dynamics. Another type of data-driven method, represented by deep reinforcement learning methods, can achieve autonomous learning to solve complex planning tasks without relying on prior information about the task.
[0003] In the deep reinforcement learning path planning method, policy evaluation and feature representation are two important links that decision optimization relies on. Among them, the purpose of policy evaluation is to provide effective indicators for the optimization process of the learned policy. The quality of the policy evaluator is related to the approximate optimality of the policy finally learned by deep reinforcement learning. Efficient policy evaluation and policy learning rely on feature representation. Effective feature representation can reduce the sample requirements in the policy learning process and improve the stability of the learning process. In the prior art, in the robot path planning based on the deep reinforcement learning algorithm, the policy evaluator usually uses a nonlinear neural network as an approximator and uses the stochastic gradient descent method for optimization training, or uses the classic linear time-domain difference method or the least squares time-domain difference method for learning. The use of convolutional neural networks to couple the learning of feature representations of high-dimensional observations with value functions or policy functions will have the following problems:
[0004] 1. If the strategy evaluation function uses a nonlinear neural network as an approximator and adopts the stochastic gradient descent method for optimization training, the convergence of the evaluator is difficult to guarantee and the convergence speed is slow, which in turn affects the strategy learning effect; while the evaluator based on the linear approximator structure has a convergence theory guarantee, but its approximation ability depends on the learning effect of the feature representative.
[0005] 2. If the approximation method of the strategy evaluator adopts the classic linear time-domain difference method or the least squares time-domain difference method for learning, the linear time-domain difference method has the defects of low sample utilization and difficulty in selecting the learning rate. Although the least squares time-domain difference method does not need to select the learning rate and improves the sample utilization problem, it has the disadvantage of poor asymptotic optimality, and in actual use, it is easy to have the problem of ill-conditioned solution due to matrix rank dissatisfaction.
[0006] 3. Robot path planning is a continuous task. If the reinforcement learning method based on the linear time-domain difference method is used as the strategy evaluation method, the low sample utilization rate will lead to problems such as low control efficiency and poor control accuracy. If the least squares time-domain difference method is used as the strategy evaluation, due to the problems of poor asymptotic optimality and ill-conditioned solution, it will still lead to problems such as reduced control efficiency and accuracy as the planning time increases.
[0007] 4. The deep reinforcement learning method uses convolutional neural networks to couple the feature representation of high-dimensional observations with value functions or policy functions, which also makes the learning process sample-efficient. Both the linear time-domain difference method and the least squares time-domain difference method need to rely on traditional kernel-based feature representation. This type of feature representation method needs to rely on a lot of manual feature construction, which is difficult to meet the needs of deep reinforcement learning to solve strategy evaluation and sequential decision-making under high-dimensional complex observation conditions. When applied to robot path planning, it will further increase control complexity and reduce control efficiency.
[0008] In summary, existing deep reinforcement learning has problems such as difficulty in learning feature representation and low learning efficiency of strategy evaluator. This means that directly using deep reinforcement learning technology for robot path planning decision optimization will lead to low controller learning efficiency. Summary of the invention
[0009] The technical problem to be solved by the present invention is: in response to the technical problems existing in the prior art, the present invention provides a path planning decision optimization method based on least squares truncated time-domain difference learning, which has a simple implementation method, high planning decision efficiency and accuracy.
[0010] In order to solve the above technical problems, the technical solution proposed by the present invention is:
[0011] A path planning decision optimization method based on least squares truncated time-domain difference learning, comprising the following steps:
[0012] S1. Basis function learning: using a first strategy to collect states, actions, and rewards during the interaction between the agent and the environment to form a sample data set, wherein the first strategy is an initial strategy or an admissible strategy; learning a basis function of feature representation by pre-training based on the sample data set;
[0013] S2. Evaluator learning: The evaluator uses the second strategy generated by the actuator to collect sample data of states and actions during the interaction between the agent and the environment, uses the basis function to obtain sample features, and uses the projected mean square Bellman error as a truncation indicator to control the use of least squares time-domain difference or linear time-domain difference for parameter update at different stages of strategy evaluation to obtain an approximately optimal strategy evaluator, and the projected Bellman error is calculated based on the sample data set;
[0014] S3. Actuator learning: using the strategy generated by the actuator to collect samples of interaction with the environment, and using the basis function to obtain sample features, using the evaluator in step S2 as the evaluation function of the strategy actuator to obtain the control strategy output;
[0015] S4. Path planning: Control the agent to perform path planning according to the control strategy obtained in step S3.
[0016] Furthermore, in step S2, the projected Bellman mean square error is calculated according to the following formula as the truncation index:
[0017]
[0018] Where MSPBE(w) is the projected Bellman mean square error corresponding to the parameter w of the evaluator. represents the expected calculation formula, δ represents the time domain differential error, is the feature matrix, where each vector corresponds to the state s i The specific characteristics of φ(s i ), i=1,2……,m, represents the transpose operator, V w is an approximate state value function with w as parameter, Π is a projection operator that projects any value function onto the representation space, T is the Bellman operator, and D is the weight diagonal matrix.
[0019] Furthermore, in step S2, the projected mean square Bellman error is used as a truncation indicator according to the following truncation method: if the increase in the projected Bellman mean square error calculated currently compared with the projected Bellman mean square error calculated last time exceeds the preset discrimination threshold set by the switching condition, the least squares time-domain difference method is used to update the evaluator parameters, otherwise the linear time-domain difference method is used to update the evaluator parameters.
[0020] Furthermore, the evaluator parameters in the linear time-domain difference method are updated specifically according to the following formula:
[0021]
[0022] In the formula, w t+1 is the updated parameter of the evaluator, w t is the parameter before the evaluator is updated, α is the learning rate, γ is the reward discount factor, and Φ is the feature matrix.
[0023] Furthermore, the evaluator parameters in the least squares time-domain difference algorithm are updated specifically according to the following formula:
[0024]
[0025] Where w is the calculated evaluator parameter, represents the desired solution, and the matrix A is expressed as b is represented by Φ is the feature matrix, Φ t is the feature representation at time t, γ is the reward discount factor, r t+1 is the reward at time t+1.
[0026] Furthermore, in step S3, the importance sampling coefficient is used as the policy gradient optimization weight coefficient when the actuator is updated, and the importance sampling coefficient is expressed as:
[0027]
[0028] Among them, ρ is the importance sampling coefficient, π θ (a|o) is the action probability output by the current strategy, π θ′ (a|o) represents the action probability output by the old strategy;
[0029] And use gradient clipping Limit the update step size, specifically:
[0030]
[0031] Where ∈ is the cropping parameter, represents the estimated advantage function.
[0032] The optimization function of the actuator parameters obtained using the importance sampling coefficient and gradient clipping is specifically:
[0033]
[0034] Among them, θ is the actuator parameter.
[0035] Furthermore, in the step S1, a batch of data is sampled, and a feature representation algorithm based on basis function pre-training is utilized, and a forward model prediction task, an inverse model prediction task, a reward return prediction task, and an image reconstruction task are used as unsupervised auxiliary tasks to encode high-dimensional state observations to obtain low-dimensional feature representations.
[0036] Furthermore, the image reconstruction task is trained based on a denoising autoencoder, and the loss function of the image reconstruction task is expressed as:
[0037]
[0038] Where o t is the original observed image, is the reconstructed image.
[0039] The reward prediction task is given by the current observation feature representation φ t With action a t , predict the current reward r t , expressed as:
[0040]
[0041] In the formula, is the reward r at the current moment t The predicted value, θ R represents the reward prediction network parameters, θ E represents the encoder network parameters, represents the reward prediction network, represents the encoder network, represents the observed image with noise;
[0042] The reward model prediction task is achieved by training the network parameters θ R With θ E Minimize the reward prediction loss function, expressed as:
[0043]
[0044] The inverse model prediction task inputs the encoding features of the system at the current moment And the encoding characteristics of the system at the next moment Predict the action a taken at the current moment t :
[0045]
[0046] In the formula To predict action output;
[0047] The process of minimizing the loss function of the inverse model prediction task is expressed as:
[0048]
[0049] In the formula Predict the network for the inverse model.
[0050] The forward model prediction task is represented by the input state at the current moment With action a t Predict the feature representation φ of the next moment t+1 , expressed as:
[0051]
[0052] in It is the state representation of the next moment prediction.
[0053] The loss function for minimizing the forward model prediction task is expressed as:
[0054]
[0055] In the formula Represents a forward prediction model of the environment.
[0056] A computer device comprises a processor and a memory, wherein the memory is used to store a computer program, the processor is used to execute the computer program, and the processor is used to execute the computer program to perform the above method.
[0057] A computer-readable storage medium storing a computer program, wherein the computer program implements the above method when executed.
[0058] Compared with the prior art, the advantages of the present invention are:
[0059] 1. The present invention realizes robot path planning control based on reinforcement learning algorithm, and adopts adaptive truncation and switching mechanism in the learning process of reinforcement learning evaluator, uses projected mean square Bellman error as truncation index, and controls the use of least squares time-domain difference or linear time-domain difference to update the evaluator parameters at different stages of strategy evaluation. It can effectively combine the fast convergence characteristics of the least squares time-domain difference algorithm and the asymptotic convergence characteristics of the linear (convergent) time-domain difference algorithm, integrate the advantages of the two algorithms, improve the learning speed and accuracy of the evaluator in the strategy evaluation process, thereby effectively improving the efficiency and accuracy of robot path planning.
[0060] 2. The present invention adopts an unsupervised feature representation method based on basis function pre-training. On the one hand, it does not need to rely on the current reinforcement learning strategy, and directly optimizes the feature representation model in a data-driven manner, which can effectively extract feature representations with strong task relevance from the system's observation images; on the other hand, based on the basis function pre-training feature representation method, feature fusion is used to effectively represent the feature representations learned through different types of auxiliary tasks, and the inherent conflicts of multiple types of representation learning auxiliary tasks can be avoided. It can effectively characterize the low-dimensional feature representation of high-dimensional observations, improve the sample efficiency in the learning process, and further improve the efficiency of robot path planning.
[0061] 3. The present invention further ensures the smoothness of the strategy exploration process by adopting an objective function clipping method based on importance sampling in the actuator. At the same time, the update frequency of the actuator is reduced by delayed updating of the actuator parameters, ensuring that the evaluator can smoothly estimate the value function under the current strategy, effectively improving the stability of the actuator-evaluator deep reinforcement learning method, thereby further improving the efficiency and accuracy of path planning. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 It is a schematic diagram of the implementation flow of the path planning decision optimization method based on least squares truncated time-domain difference learning in this embodiment.
[0063] Figure 2 It is a structural diagram of the path planning decision optimization based on least squares truncated time-domain difference learning adopted in this embodiment.
[0064] Figure 3 It is a detailed flowchart of implementing path planning decision optimization based on least squares truncated time-domain difference learning in a specific application embodiment of the present invention. DETAILED DESCRIPTION
[0065] The present invention is further described below in conjunction with the accompanying drawings and specific preferred embodiments, but the protection scope of the present invention is not limited thereby.
[0066] like Figure 1 As shown, the steps of the path planning decision optimization method based on least squares truncated time-domain difference learning in this embodiment include:
[0067] S1. Basis function learning: Use the first strategy to collect the states, actions, and rewards during the interaction between the agent and the environment. The states, actions, and rewards collected above constitute a sample data set. The first strategy is the initial strategy or the permissible strategy. Use pre-training to learn the basis functions of feature representation based on the sample data set.
[0068] S2. Evaluator learning: The evaluator uses the second strategy generated by the actuator to collect sample data of states and actions during the interaction between the agent and the environment, uses the basis function to obtain sample features, and uses the projected mean square Bellman error as a truncation indicator to control the use of least squares time-domain difference or linear time-domain difference for parameter update at different stages of strategy evaluation to obtain an approximately optimal strategy evaluator, and the projected Bellman error is calculated based on the sample data set;
[0069] S3. Actuator learning: using the strategy generated by the actuator to collect samples of interaction with the environment, and using the basis function to obtain sample features, using the evaluator in step S2 as the evaluation function of the strategy actuator to obtain the control strategy output;
[0070] S4. Path planning: Control the agent to perform path planning according to the control strategy obtained in step S3.
[0071] This embodiment realizes robot path planning control based on reinforcement learning algorithm, and adopts adaptive truncation and switching mechanism in the learning process of reinforcement learning evaluator, uses projected mean square Bellman error as truncation index, and controls the use of least squares time-domain difference or linear time-domain difference to update the evaluator parameters at different stages of strategy evaluation. It can effectively combine the fast convergence characteristics of the least squares time-domain difference algorithm and the asymptotic convergence characteristics of the linear (convergent) time-domain difference algorithm, integrate the advantages of the two algorithms, improve the speed and accuracy of the strategy evaluation process, and thus effectively improve the efficiency and accuracy of robot path planning.
[0072] The state space in the interactive process of the robot path planning task is s = [θ, g, b], where θ is the angle vector of each joint of the robot, g is the three-dimensional coordinate of the target position point, and b is the three-dimensional coordinate of the current position of the robot; the action output a of the robot path planning task is the output of the actuator part of the robot's joint angle increment δ1, δ2, δ3, δ4, δ5, δ6, and the robot performs the corresponding action by updating the rotation angle of the robot joint;
[0073] The reward function of the task is specifically defined as:
[0074]
[0075] Among them, g is the three-dimensional coordinate of the target object position, b is the three-dimensional coordinate of the robot, c1 and c2 are the planning weight coefficient and obstacle avoidance weight coefficient respectively, and d(·,·) represents the Euclidean distance metric.
[0076] In step S1 of this embodiment, a batch of data is sampled without replacement from the collected offline data set, and its low-dimensional state features are constructed using a feature representation algorithm based on basis function pre-training. The agent specifically interacts with the environment for N rounds, each round interacts with the environment for T steps, and a total of NT samples are collected. During each interaction, the forward model prediction task, the inverse model prediction task, the reward return prediction task, and the image reconstruction task are used as unsupervised auxiliary tasks to encode the high-dimensional state observation to obtain a low-dimensional feature representation. This embodiment adopts an unsupervised feature representation method based on basis function pre-training, does not need to rely on the current reinforcement learning strategy, and directly optimizes the feature representation model in a data-driven manner, which can effectively extract feature representations with strong task relevance from the system's observation images; and can also avoid the inherent conflicts of multiple types of representation learning auxiliary tasks, can effectively characterize the low-dimensional feature representation of high-dimensional observations, and improve the sample efficiency in the learning process. Through the feature pre-training method based on basis function pre-training or the kernel-based feature representation method, it can also improve the nonlinear representation ability of strategy learning in the process of feature representation and value function approximation, expand the application scope of the strategy learning process, and improve the efficiency and stability of the strategy learning process, thereby further improving the efficiency and stability of robot path planning.
[0077] In this embodiment, the image reconstruction task is trained based on a denoising auto-encoder (DAE). The denoising auto-encoder observes o t Based on this, random noise is introduced to construct a noisy model input Encoder Mapping it to hidden layer coding features is expressed as:
[0078]
[0079] Decoder in denoising autoencoder The process of obtaining the reconstructed image is:
[0080]
[0081] Therefore, the loss function of the image reconstruction task can be expressed as:
[0082]
[0083] Where o t is the original observation image input to the denoising autoencoder, Reconstructed image using denoising autoencoder.
[0084] The reward prediction task is specifically given the current observation feature representation φ t With action a t , predict the current reward r t , which can be expressed as:
[0085]
[0086] In the formula, is the reward r at the current moment t The predicted value, θ R represents the reward prediction network parameters, θ E represents the encoder network parameters, represents the reward prediction network, represents the encoder network, represents the observed image with noise;
[0087] The reward model prediction task is to train the network parameters θ R With θ E Minimize the reward prediction loss function, expressed as:
[0088]
[0089] The inverse model prediction task is to input the encoding features of the system at the current moment And the encoding characteristics of the system at the next moment Predict the action a taken at the current moment t :
[0090]
[0091] In the formula To predict action output;
[0092] The process of minimizing the loss function in the inverse model prediction task is expressed as:
[0093]
[0094] In the formula Predict the network for the inverse model.
[0095] The forward model prediction task is specifically represented by inputting the current state With action a t Predict the feature representation φ of the next moment t+1 , expressed as:
[0096]
[0097] in It is the state representation of the next moment prediction.
[0098] The loss function for minimizing the forward model prediction task is expressed as:
[0099]
[0100] In the formula Represents a forward prediction model of the environment.
[0101] This embodiment generally adopts the above-mentioned unsupervised feature representation method based on basis function pre-training. On the one hand, it does not rely on the current reinforcement learning strategy, and directly optimizes the feature representation model in a data-driven manner, which can effectively extract feature representations with strong task relevance from the system's observation images; on the other hand, it adopts the form of feature fusion to effectively represent the feature representations learned through different types of auxiliary tasks, avoiding the inherent conflicts of multiple types of representation learning auxiliary tasks, and can effectively characterize the low-dimensional feature representations of high-dimensional observations, thereby improving the sample efficiency in the learning process.
[0102] In step S2 of this embodiment, a batch of data is sampled without replacement from the constructed offline data set, the corresponding projected Bellman error is calculated, and then the projected Bellman mean square error is used as the truncation indicator. The specific calculation expression of the projected Bellman mean square error is:
[0103]
[0104] Where MSPBE(w) is the projected Bellman mean square error corresponding to the parameter w of the evaluator. represents the expected calculation formula, δ represents the time domain differential error, is the feature matrix, where each vector corresponds to the state s i The specific characteristics of φ(s i ), i=1,2……,m, represents the transpose operator, V w is an approximate state value function with w as parameter, Π is a projection operator that projects any value function onto the representation space, T is the Bellman operator, and D is the weight diagonal matrix.
[0105] In step S2 of this embodiment, the projected mean square Bellman error is used as the truncation index in the following specific truncation manner: if the increase of the projected Bellman mean square error calculated in the current time exceeds the preset discrimination threshold set by the switching condition compared with the projected Bellman mean square error calculated in the previous time, the least squares time-domain difference method is used to update the evaluator parameters (weight coefficients), otherwise the linear time-domain difference method is used to update the evaluator parameters (weight coefficients). That is, the least squares time-domain difference algorithm is used in the early stage of strategy evaluation so that the value function can be approximated at a faster convergence speed; when the least squares time-domain difference algorithm converges locally or is saturated, it is automatically switched to the linear (convergent) time-domain difference algorithm to approximate the state value function until an approximately optimal strategy evaluator is obtained, which can integrate the advantages of the two algorithms, improve the speed and accuracy of the strategy evaluation process, and thus effectively improve the efficiency and accuracy of path planning. This embodiment can also effectively improve the value function approximation speed and accuracy of the evaluator by applying the truncation strategy evaluation framework to the evaluator part of the actuator-evaluator deep reinforcement learning, thereby realizing fast actuator-evaluator deep reinforcement learning, thereby further improving the efficiency and accuracy of path planning.
[0106] In a specific application embodiment, if the projected Bellman mean square error calculated from the extracted samples is greater than the truncation coefficient multiplied by the projected Bellman mean square error in the previous calculation process, the parameters of the evaluator are updated using least squares time-domain difference, otherwise the parameters are updated using linear time-domain difference. When the parameter update range is less than the set threshold, it is considered that the evaluator coefficients have converged and an approximately optimal strategy evaluator is obtained.
[0107] While the above-mentioned evaluator coefficients are updated, the actuator parameters are updated using the value function provided by the evaluator to achieve actuator parameter optimization.
[0108] In this embodiment, the evaluator parameters in the linear time-domain difference method are updated specifically according to the following formula:
[0109]
[0110] In the formula, w t+1 is the updated parameter of the evaluator, w t is the evaluator parameter before update, α is the evaluator learning rate, γ is the reward discount factor, Φ t With Φ t+1 is the characteristic matrix at time t and t+1.
[0111] In this embodiment, the evaluator parameters in the least squares time-domain difference algorithm are updated specifically according to the following formula:
[0112]
[0113] Where w is the evaluator parameter, Indicates the expected solution, and the matrix A is expressed as b is represented by Φ t With Φ t+1 is the feature matrix at time t and t+1, λ is the reward discount factor, r t+1 is the reward at time t+1.
[0114] In step S3 of this embodiment, the importance sampling coefficient is further used as the policy gradient optimization weight when the executor is updated. The importance sampling coefficient is specifically expressed as:
[0115]
[0116] Among them, ρ is the importance sampling coefficient, π θ (a|o) is the output action probability of the current strategy, π θ′ (a|o) is the output action probability of the old strategy before the current strategy is updated;
[0117] And use the gradient clipping function Limit the update step size, specifically:
[0118]
[0119] Where ∈ is the cropping parameter, represents the estimated advantage function.
[0120] The optimization function of the actuator parameters obtained using the importance sampling coefficient and gradient clipping is:
[0121]
[0122] This embodiment ensures the smoothness of the strategy exploration process by adopting an importance sampling-based objective function clipping method in the executor. At the same time, it reduces the update frequency of the executor through delayed updating of the executor parameters, ensuring that the evaluator can smoothly estimate the value function under the current strategy, effectively improving the stability of the executor-evaluator deep reinforcement learning method, thereby further improving the efficiency and accuracy of path planning.
[0123] like Figure 2 As shown, in a specific application embodiment, the following structure is set to implement the above method of this embodiment:
[0124] Sample pre-collection part: According to the above process, the various states of the system are collected offline, and actions can be performed according to random strategies or strategies based on prior knowledge. After multiple cycles, the collected states are output in the form of sample sets. The sample set should be distributed as evenly as possible in the entire state space of the system to make the feature representation basis function learned by data-driven learning more representative;
[0125] Feature construction part: a multi-task unsupervised feature representation algorithm is used. The two frames of original images collected by the RGB camera are used as input. The images are compressed through the feature learning network, and the parameters of the feature learning network are modified according to the objectives of the auxiliary task.
[0126] Critic: The evaluator module uses Critic to train the parameters of the approximator using the least squares truncated time-domain difference method to obtain the estimated state value function, so that the time-domain difference error is minimized as much as possible.
[0127] Actuator part: The actuator module uses Actor to adjust the amount of action to be taken in each state according to the time domain differential error generated by the evaluator to improve the strategy.
[0128] The Actor-Critic algorithm is a reinforcement learning algorithm based on policy gradient. The Actor selects actions through continuous iteration, and the Critic is the evaluator. The Critic evaluates the actions selected by the Actor and guides the Actor's actions in the next stage. The Actor obtains the reasonable probability of selecting each action in each state through continuous iteration, and the Critic also iterates continuously to continuously improve the reward and punishment values of each action selected in each state.
[0129] The sample pre-collection part is used to implement the sample pre-collection in step S1, the feature construction part is used to implement the feature construction in step S1, the evaluator learning in step S2 is implemented through the evaluator (Critic) part, and the executor learning in step S3 is implemented through the executor (Actor) part.
[0130] The present invention is further described below by taking the implementation of path planning decision optimization based on least squares truncated time-domain difference learning in a specific application embodiment of the present invention as an example.
[0131] like Figure 3 As shown, the detailed steps of implementing path planning decision optimization based on least squares truncated time-domain difference learning in this embodiment are as follows:
[0132] S1. Initialize the parameters required by the algorithm, where the total training cycle is set to N, initialize the robot path planning task setting, and the state space is s = [θ, g, b], where θ is the angle vector of each joint of the robot, g is the three-dimensional coordinate of the target position point, b is the three-dimensional coordinate of the current position of the robot, and the action output a is the output of the actuator part. The robot performs the corresponding action by updating the rotation angle of the robot joint; set the robot to the starting position in the workspace and set the target position;
[0133] S2. The robot samples in the environment and stores the sample pairs formed by the obtained state-action-reward in the experience pool. When enough sample data is collected, the proposed basis function feature pre-training method is used to learn the high-dimensional observation state to obtain the compressed feature basis function.
[0134] S3. Initialize the robot path planning task settings and reset various parameters. The robot interacts with the environment and observes the environmental state s t The actuator part outputs the robot movement action a t , the robot performs the corresponding action and updates the robot position state to form the next observation s t+1 , calculate the reward return based on the observation, store the sample pairs in the experience pool, and determine whether the path planning task objectives have been completed and whether various constraints have been met;
[0135] S4. The robot samples the previously collected samples and updates the evaluator parameters through the proposed least squares truncated time-domain difference learning method until the evaluator parameter update range is less than the set threshold for two consecutive times;
[0136] S5. Update the actuator parameters using the evaluator learned in S4;
[0137] S6. Steps S4 and S5 are repeated alternately, limiting the maximum number of training steps of the robot in each training cycle. When the number of training steps in a single training reaches the maximum number of decision steps, the interaction is terminated. Then another random target pose is regenerated and the joint state of the robot is reset to return to the initial state for the next training. When the predetermined number of training times is reached, the training process ends.
[0138] This embodiment also provides a computer device, including a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to execute the computer program, and the processor is used to execute the computer program to perform the above method.
[0139] This embodiment also provides a computer-readable storage medium storing a computer program. When the computer program is executed, the above method is implemented.
[0140] The above is only a preferred embodiment of the present invention, and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment, it is not intended to limit the present invention. Therefore, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the content of the technical solution of the present invention shall fall within the scope of protection of the technical solution of the present invention.
Claims
1. A path planning decision optimization method based on least squares truncated time-domain difference learning, characterized in that the steps include: S1. Basis function learning: using a first strategy to collect states, actions, and rewards during the interaction between the agent and the environment to form a sample data set, wherein the first strategy is an initial strategy or an admissible strategy; learning a basis function of feature representation by pre-training based on the sample data set; S2. Evaluator learning: The evaluator uses the second strategy generated by the actuator to collect sample data of states and actions during the interaction between the agent and the environment, uses the basis function to obtain sample features, and uses the projected mean square Bellman error as a truncation indicator to control the use of least squares time-domain difference or linear time-domain difference for parameter update at different stages of strategy evaluation to obtain an approximately optimal strategy evaluator, and the projected Bellman error is calculated based on the sample data set; S3. Actuator learning: using the strategy generated by the actuator to collect samples of interaction with the environment, and using the basis function to obtain sample features, using the evaluator in step S2 as the evaluation function of the strategy actuator to obtain the control strategy output; S4. Path planning: Control the agent to perform path planning according to the control strategy obtained in step S3; In step S2, the projected Bellman mean square error is calculated as the truncation index according to the following formula: Where MSPBE(w) is the projected Bellman mean square error corresponding to the parameter w of the evaluator. represents the expected calculation formula, δ represents the time domain differential error, is the feature matrix, where each vector corresponds to the state s i The specific characteristics of φ(s i ), i=1,2……,m, represents the transpose operator, V w is the approximate state value function with w as parameter, Π is the projection operator that projects any value function onto the representation space, T is the Bellman operator, and D is the weight diagonal matrix; In step S2, the projected mean square Bellman error is used as a truncation indicator and truncation is performed in the following manner: if the increase in the projected mean square Bellman error calculated currently compared with the projected mean square Bellman error calculated last time exceeds the preset discrimination threshold set by the switching condition, the least squares time-domain difference method is used to update the evaluator parameters, otherwise the linear time-domain difference method is used to update the evaluator parameters.
2. The path planning decision optimization method based on least squares truncated time-domain difference learning according to claim 1 is characterized in that: The evaluator parameters in the linear time-domain difference method are specifically updated according to the following formula: In the formula, w t+1 is the updated parameter of the evaluator, w t is the parameter before the evaluator is updated, α is the learning rate, γ is the reward discount factor, and Φ is the feature matrix.
3. The path planning decision optimization method based on least squares truncated time-domain difference learning according to claim 1 is characterized in that: The evaluator parameters in the least squares time-domain difference method are specifically updated according to the following formula: Where w is the calculated evaluator parameter, represents the desired solution, and the matrix A is expressed as b is represented by Φ t is the feature representation matrix at time t, γ is the reward discount factor, r t+1 is the reward at time t+1.
4. The path planning decision optimization method based on least squares truncated time-domain difference learning according to any one of claims 1 to 3, characterized in that: In step S3, the importance sampling coefficient is used as the policy gradient optimization weight coefficient when the actuator is updated. The importance sampling coefficient is expressed as: Among them, ρ is the importance sampling coefficient, π θ (a|o) is the action probability output by the current strategy, π θ′ (a|o) represents the action probability output by the old strategy; And use gradient clipping Limit the update step size, specifically: Where ∈ is the cropping parameter, represents the estimated advantage function; The optimization function of the actuator parameters obtained using the importance sampling coefficient and gradient clipping is specifically: Among them, θ is the actuator parameter.
5. The path planning decision optimization method based on least squares truncated time-domain difference learning according to any one of claims 1 to 3, characterized in that: In the step S1, a batch of data is sampled, a feature representation algorithm based on basis function pre-training is used, and a forward model prediction task, an inverse model prediction task, a reward return prediction task, and an image reconstruction task are used as unsupervised auxiliary tasks to encode high-dimensional state observations to obtain low-dimensional feature representations.
6. The path planning decision optimization method based on least squares truncated time-domain difference learning according to claim 5 is characterized in that: The image reconstruction task is trained using a denoising autoencoder, and the loss function of the image reconstruction task is expressed as: Where o t is the original observed image, is the reconstructed image; The reward prediction task is given by the current observation feature representation φ t With action a t , predict the current reward r t , expressed as: In the formula, is the reward r at the current moment t The predicted value, θ R represents the reward prediction network parameters, θ E represents the encoder network parameters, represents the reward prediction network, represents the encoder network, represents the observed image with noise; The reward prediction task is achieved by training the network parameters θ R With θ E Minimize the reward prediction loss function, expressed as: The inverse model prediction task inputs the encoding features of the system at the current moment And the encoding characteristics of the system at the next moment Predict the action a taken at the current moment t : In the formula To predict action output; The process of minimizing the loss function of the inverse model prediction task is expressed as: In the formula Predicting networks for inverse models; The forward model prediction task is represented by the input state at the current moment With action a t Predict the feature representation φ of the next moment t+1 , expressed as: in It is the state representation of the next moment of prediction; The loss function for minimizing the forward model prediction task is expressed as: In the formula Represents a forward prediction model of the environment.
7. A computer device comprising a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to execute the computer program, wherein: The processor is configured to execute the computer program to perform the method according to any one of claims 1 to 6.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed, the method according to any one of claims 1 to 6 is implemented.
