Reinforcement learning strategy characterization method and system based on generative intelligence

By using the generative intelligence reinforcement learning strategy representation method in batch reinforcement learning, combined with the diffusion model and random noise perturbation, the distribution shift problem is solved, the learning efficiency and generalization ability are improved, and a wider range of application scenarios are achieved. Excellent performance.

CN118821902APending Publication Date: 2024-10-22NORTHWESTERN POLYTECHNICAL UNIV

Patent Information

Application Number
CN202410916285.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-10-22

AI Technical Summary

Technical Problem

There is a distribution shift problem in existing batch reinforcement learning technology, which limits its performance and application scope.

Method used

The reinforcement learning strategy representation method based on generative intelligence is adopted, the diffusion model is used to represent the strategy network, and strategy learning is carried out through small sample data, combined with random noise disturbance and delayed update of the target network, to reduce the update variance and improve the model stability.

Benefits of technology

It significantly improves learning efficiency, enhances the generalization ability and adaptability of the agent, can better adapt to complex data distribution, and achieves excellent performance in a wider range of application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118821902A_ABST
    Figure CN118821902A_ABST
Patent Text Reader

Abstract

The invention discloses a reinforcement learning strategy characterization method and system based on generative intelligence, and the method comprises the steps: randomly initializing a strategy network # imgabs0 # and a value network W theta of an intelligent agent, randomly initializing a corresponding target network W theta'and # imgabs1 # strategy network # imgabs2 #, and carrying out the modeling of a diffusion model; sampling small sample data from a pre-prepared data set D; sampling and calculating an action a through a strategy network # imgabs3 # according to the state of a track in the small sample data; calculating a Q value based on the action a; and updating the value network Q theta according to the calculated Q value, updating the policy network # imgabs4 # after the value network Q theta is updated for C times every time, and synchronizing parameters of the value network Q theta to the target network Q theta 'until the model converges or reaches a fixed round. According to the method, the learning efficiency can be remarkably improved, the generalization ability and adaptability of the intelligent agent are greatly enhanced, and excellent performance in a wider application scene is realized through accurate approximate complex data distribution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of artificial intelligence technology, and specifically relates to a reinforcement learning strategy characterization method and system based on generative intelligence. Background Art

[0002] With the development of artificial intelligence technology, reinforcement learning has become a key tool for solving complex decision-making problems. It learns the optimal strategy through real-time interaction with the environment and has been successfully applied to many fields, such as games and robot control. At the same time, generative intelligence technologies such as diffusion models are also constantly improving, providing more methods for AI system training. Combining the two can not only improve AI's decision-making ability, but also accelerate the learning process.

[0003] Traditional reinforcement learning methods require a large amount of online interaction data for policy learning, which is often not feasible in real-world applications. For example, in scenarios involving cost and safety considerations such as self-driving cars or industrial robots, frequent trial and error can lead to high costs and potential risks. To address these problems, researchers began to explore batch reinforcement learning methods. Batch reinforcement learning uses a large amount of pre-collected data for policy learning without the need for real-time interaction with the environment, which greatly improves data utilization efficiency and safety.

[0004] However, batch reinforcement learning also faces the problem of distribution shift, which limits the performance and application scope of batch reinforcement learning methods. Summary of the invention

[0005] The technical problem to be solved by the present invention is to provide a reinforcement learning strategy characterization method and system based on generative intelligence in response to the deficiencies in the above-mentioned prior art, so as to solve the technical problem of distribution deviation existing in the existing batch reinforcement learning technology.

[0006] The present invention adopts the following technical solutions:

[0007] A reinforcement learning strategy characterization method based on generative intelligence includes the following steps:

[0008] S1. Randomly initialize the agent’s policy network and value network Q θ , and randomly initialize the corresponding target network Q θ, and Policy Network Modeling using diffusion models;

[0009] S2, sampling small sample data from the pre-prepared data set D;

[0010] S3. According to the state of the trajectory in the small sample data, through the strategy network Sample and calculate an action a;

[0011] S4. Calculate the Q value based on action a;

[0012] S5. Update the value network Q according to the calculated Q value θ , each update of the value network Q θ After C times, update the policy network And the value network Q θ The parameters are synchronized to the target network Q θ′ , until the model converges or reaches a fixed number of rounds.

[0013] Preferably, in step S1, a diffusion model is used as an approximation method of the policy network.

[0014] Preferably, in step S2, the small sample data includes N tracks.

[0015] Preferably, in step S3, random noise is used to perform disturbance calculation to calculate an action a.

[0016] Preferably, the diffusion model is specifically a series of probability-based transition matrices, which are used to describe the transition probability between random variables from one time step to the next time step in a discrete state space.

[0017] Preferably, in step S4, Q is calculated as follows:

[0018]

[0019] Among them, y represents the calculated Q value, r represents the reward in the trajectory, γ represents the discount factor of the reward, and s ′ Indicates the current environment status.

[0020] Preferably, in step S5, the value network is updated as follows:

[0021]

[0022] Among them, y represents the calculated Q, n represents the size of the batch data used for training, and s ′ represents the current environment state, θ i Representing the Value Network Parameters.

[0023] Preferably, the update strategy network is specifically:

[0024]

[0025] Among them, α represents the Q value guidance coefficient, Indicates the loss value updated by the diffusion model. represents the mathematical expectation, Q θ(s,a) represents the environment state pair (s,a) input to the value network Q θ That is, through the state s in the data set D, sample action a from the policy network, and in this case calculate the expected value of the Q value of the (s, a) pair.

[0026] Preferably, after each update of the value network C times, the target network and the strategy network are synchronously updated to the corresponding strategy network.

[0027] In a second aspect, an embodiment of the present invention provides a reinforcement learning strategy characterization system based on generative intelligence, including:

[0028] Initialization module, randomly initializes the agent's policy network and value network Q θ , and randomly initialize the corresponding target network Q θ′ and Policy Network Modeling using diffusion models;

[0029] The sampling module samples small sample data from the pre-prepared data set D;

[0030] The state module uses the strategy network to calculate the state of the trajectory in the small sample data. Sample and calculate an action a;

[0031] Calculation module, calculates the Q value based on action a;

[0032] The update module updates the value network according to the calculated Q value. After updating the value network C times, it updates the strategy network and sets the value network Q θ Synchronize to target network Q θ′ , until the model converges or reaches a fixed number of rounds.

[0033] In a third aspect, a computer device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned reinforcement learning strategy characterization method based on generative intelligence when executing the computer program.

[0034] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, including a computer program, which, when executed by a processor, implements the steps of the above-mentioned reinforcement learning strategy characterization method based on generative intelligence.

[0035] Compared with the prior art, the present invention has at least the following beneficial effects:

[0036] A reinforcement learning strategy characterization method based on generative intelligence, using generative intelligence to learn reinforcement learning strategies, and using diffusion models to characterize reinforcement learning strategy networks. Compared with neural networks that use maximum likelihood estimation and Gaussian distribution to approximate data, Gaussian distribution is a unimodal distribution with a bell-shaped curve, central symmetry, and unimodal properties. The behavior strategies in the reinforcement learning data set are likely not unimodal and can better adapt to complex data sets.

[0037] Furthermore, a diffusion model is used to characterize the policy network of reinforcement learning. Due to the ability of the diffusion model to handle multimodal distribution, the method proposed in the present invention can better adapt to multimodal policy distribution in complex data sets.

[0038] Furthermore, using batch data updates can reduce the variance of each update, making the convergence process of model training more stable. Compared with stochastic gradient descent (SGD), batch processing updates model parameters by averaging the gradients of multiple samples, which can reduce randomness and make the model converge to the optimal solution more smoothly during training.

[0039] Furthermore, random noise perturbations of actions can increase the algorithm’s exploration range in the state space, helping to discover previously unexplored areas or state transition paths. In addition, randomly perturbed actions can enable the model to better adapt to unknown environmental changes, thereby improving the robustness of the algorithm. Finally, adding random perturbations to actions can enhance the algorithm’s generalization ability, enabling it to adapt faster and achieve good performance when faced with new environments or new tasks.

[0040] Furthermore, by adding the Q value to the training target, Q value guidance is provided for the training of the policy network, so that the policy moves in the direction of a higher Q value.

[0041] Furthermore, by setting the target network and delaying the update, a stable value estimate is obtained. The delayed update of the target network can give the estimation network a temporary fixed target, making the learning more stable. By delaying the update of the target network, the oscillation and instability in the training process that may be caused by frequent updates of the target network are reduced.

[0042] It can be understood that the beneficial effects of the second aspect mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.

[0043] In summary, the present invention can significantly improve learning efficiency and greatly enhance the generalization ability and adaptability of intelligent agents. By accurately approximating complex data distribution, it achieves excellent performance in a wider range of application scenarios.

[0044] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 It is the overall flow chart of the present invention;

[0046] Figure 2 A schematic diagram of a computer device provided by an embodiment of the present invention;

[0047] Figure 3 The block diagram of a chip provided according to an embodiment of the present invention. DETAILED DESCRIPTION

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

[0049] In the description of the present invention, it should be understood that the terms “include” and “comprises” indicate the presence of described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or collections thereof.

[0050] It should also be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0051] It should be further understood that the term "and / or" used in the present specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present invention generally indicates that the associated objects are in an "or" relationship.

[0052] It should be understood that, although the terms first, second, third, etc. may be used to describe preset ranges, etc. in the embodiments of the present invention, these preset ranges should not be limited to these terms. These terms are only used to distinguish preset ranges from each other. For example, without departing from the scope of the embodiments of the present invention, the first preset range may also be referred to as the second preset range, and similarly, the second preset range may also be referred to as the first preset range.

[0053] The word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.

[0054] Various structural schematic diagrams of the embodiments disclosed in the present invention are shown in the accompanying drawings. These figures are not drawn to scale, and some details are magnified and some details may be omitted for the purpose of clear expression. The shapes of various regions and layers shown in the figures and the relative sizes and positional relationships therebetween are only exemplary, and may deviate in practice due to manufacturing tolerances or technical limitations, and those skilled in the art may additionally design regions / layers with different shapes, sizes, and relative positions according to actual needs.

[0055] The present invention provides a reinforcement learning strategy characterization method based on generative intelligence, which uses a diffusion model to characterize the strategy network of reinforcement learning. Compared with the neural network that uses maximum likelihood estimation and Gaussian distribution to approximate data, it is always assumed that the mapping relationship between state and action in the behavior strategy conforms to the Gaussian distribution. The Gaussian distribution is a unimodal distribution, which is in the shape of a bell curve, centrally symmetrical, and has a unimodal property. The behavior strategy in the reinforcement learning data set is likely not unimodal, and the method proposed by the present invention can better adapt to complex data sets.

[0056] See also Figure 1 The present invention provides a reinforcement learning strategy characterization method based on generative intelligence, comprising the following steps:

[0057] S1. Randomly initialize the agent’s policy network and value network Q θ , and randomly initialize the corresponding target network Q θ′ and Use diffusion models as an approximation of a policy network. In reinforcement learning, a policy network is typically a function approximator (such as a neural network) that estimates which action should be performed given a state, or outputs a probability distribution over an action. The policy network takes a state as input and outputs one or more actions as output.

[0058] In policy-based reinforcement learning methods, the policy network is directly optimized to maximize the cumulative reward, using a special function approximator called the diffusion model as the policy network. The value network is also a function approximator that estimates the long-term expected return (i.e., value) of a given state or state-action pair. The value network takes a state or state-action pair as input and outputs a single value representing the value of that state or state-action pair. This value represents the expected cumulative reward that can be obtained by executing actions according to the current policy starting from the current state.

[0059] S2, sampling a small sample data containing N trajectories from a pre-prepared dataset D, where the dataset D contains a combination of states, actions, and rewards pre-collected from the environment;

[0060] S3. According to the state in the trajectory in the small sample data, an action a is calculated by sampling through the diffusion model and perturbing with random noise, where the trajectory refers to a continuous state-action pair (s, a), and the corresponding action of this state is calculated by the diffusion model;

[0061] S4. Calculate the Q value. Q refers to the value of the action value function in reinforcement learning, which indicates the expected total return that the agent can obtain from the current state to the future state after taking action a and following a certain strategy in a given state s.

[0062] Q is calculated as follows:

[0063]

[0064] Among them, y represents the calculated Q value, r represents the reward in the trajectory, and γ represents the discount factor of the reward.

[0065] S5. Based on the calculated Q value, use the gradient descent method to update the value network by calculating the gradient (or slope) of the function relative to its parameters and then updating the network parameters in the direction of reducing the function value;

[0066] Update the value network as follows:

[0067]

[0068] S6. Update the policy network every time the value network is updated C times, and the parameters of the target network and the policy network are synchronously updated to the corresponding target network. During the training process, the model parameters are updated through the optimization algorithm combined with the variational lower bound and the auxiliary cross entropy loss.

[0069] The formula is as follows:

[0070]

[0071] Where α is the Q-value guidance coefficient.

[0072] In another embodiment of the present invention, a reinforcement learning strategy characterization system based on generative intelligence is provided, which can be used to implement the above-mentioned reinforcement learning strategy characterization method based on generative intelligence. Specifically, the reinforcement learning strategy characterization system based on generative intelligence includes an initialization module, a sampling module, a state module, a calculation module and an update module.

[0073] Among them, the initialization module randomly initializes the agent's policy network and value network Q θ , and randomly initialize the corresponding target network Q θ′ and Policy Network Modeling using diffusion models;

[0074] The sampling module samples small sample data from the pre-prepared data set D;

[0075] The state module uses the strategy network to calculate the state of the trajectory in the small sample data. Sample and calculate an action a;

[0076] Calculation module, calculates the Q value based on action a;

[0077] The update module updates the value network according to the calculated Q value. After updating the value network C times, it updates the strategy network and sets the value network Q θ Synchronize to target network Q θ′ , until the model converges or reaches a fixed number of rounds.

[0078] In another embodiment of the present invention, a terminal device is provided, which includes a processor and a memory, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc., which are the computing core and control core of the terminal, which are suitable for implementing one or more instructions, and are specifically suitable for loading and executing one or more instructions to implement the corresponding method flow or corresponding functions; the processor described in the embodiment of the present invention can be used for the operation of the reinforcement learning strategy characterization method based on generative intelligence, including:

[0079] Randomly initialize the agent’s policy network and value network Q θ , and randomly initialize the corresponding target network Q θ′ and Policy Network Use diffusion model for modeling; sample small sample data from the pre-prepared dataset D; according to the state of the trajectory in the small sample data, use the policy network Sample and calculate an action a; calculate the Q value based on action a; update the value network Q according to the calculated Q value θ , each update of the value network Q θ After C times, update the policy network And the value network Q θ The parameters are synchronized to the target network Q θ′ , until the model converges or reaches a fixed number of rounds.

[0080] In another embodiment of the present invention, the present invention further provides a storage medium, specifically a computer-readable storage medium (Memory), which is a memory device in a terminal device for storing programs and data. It can be understood that the computer-readable storage medium here can include both the built-in storage medium in the terminal device and the extended storage medium supported by the terminal device. The computer-readable storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory, or a non-volatile memory (Non-Volatile Memory), such as at least one disk memory.

[0081] One or more instructions stored in a computer-readable storage medium may be loaded and executed by a processor to implement the corresponding steps of the method for characterizing a reinforcement learning strategy based on generative intelligence in the above embodiment; one or more instructions in the computer-readable storage medium may be loaded and executed by a processor as follows:

[0082] Randomly initialize the agent’s policy network and value network Q θ , and randomly initialize the corresponding target network Q θ′ and Policy Network Use diffusion model for modeling; sample small sample data from the pre-prepared dataset D; according to the state of the trajectory in the small sample data, use the policy network Sample and calculate an action a; calculate the Q value based on action a; update the value network Q according to the calculated Q value θ , each update of the value network Q θ After C times, update the policy network And the value network Q θ The parameters are synchronized to the target network Q θ′ , until the model converges or reaches a fixed number of rounds.

[0083] See also Figure 2, the terminal device is a computer device, and the computer device 60 of this embodiment includes: a processor 61, a memory 62, and a computer program 63 stored in the memory 62 and executable on the processor 61. When the computer program 63 is executed by the processor 61, the method for calculating the composition of fluid in the reservoir transformation wellbore in the embodiment is realized. To avoid repetition, it is not described one by one here. Alternatively, when the computer program 63 is executed by the processor 61, the functions of each model / unit in the calculation system for the composition of fluid in the reservoir transformation wellbore in the embodiment are realized. To avoid repetition, it is not described one by one here.

[0084] The computer device 60 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The computer device 60 may include, but is not limited to, a processor 61 and a memory 62. Those skilled in the art will appreciate that Figure 2 This is only an example of the computer device 60 and does not constitute a limitation of the computer device 60. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the computer device may also include input and output devices, network access devices, buses, etc.

[0085] The processor 61 may be a central processing unit (CPU), or other general-purpose processors, central processing units, graphics processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, data processing logic based on quantum computing, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0086] The memory 62 may be an internal storage unit of the computer device 60, such as a hard disk or memory of the computer device 60. The memory 62 may also be an external storage device of the computer device 60, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc., equipped on the computer device 60.

[0087] Furthermore, the memory 62 may include both an internal storage unit of the computer device 60 and an external storage device. The memory 62 is used to store computer programs and other programs and data required by the computer device. The memory 62 may also be used to temporarily store data that has been output or is to be output.

[0088] Any reference to memory, database or other media used in the embodiments provided in the present application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

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

[0090] See also Figure 3 , the terminal device is a chip, and the chip 600 of this embodiment includes a processor 622, which may be one or more, and a memory 632 for storing a computer program executable by the processor 622. The computer program stored in the memory 632 may include one or more modules, each corresponding to a set of instructions. In addition, the processor 622 may be configured to execute the computer program to execute the above-mentioned generalizable monocular absolute depth map estimation method.

[0091] In addition, the chip 600 may further include a power supply component 626 and a communication component 650, wherein the power supply component 626 may be configured to perform power management of the chip 600, and the communication component 650 may be configured to implement communication, for example, wired or wireless communication, of the chip 600. In addition, the chip 600 may further include an input / output interface 658. The chip 600 may operate based on an operating system stored in the memory 632.

[0092] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. The components of the embodiments of the present invention described and shown in the drawings here can usually be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0093] The simulation experiment was conducted using the cheetah environment in D4RL, an open source benchmark training set for batch reinforcement learning. The cheetah environment is a simulation environment that simulates the movement (e.g., running) of a two-dimensional robot cheetah. The state space of the cheetah environment is 17-dimensional, covering the position and velocity information of each part of the robot cheetah, such as the z-coordinate, angle, and angular velocity of the front tip, which fully reflects the current state of the cheetah in the simulation. Then, the action space of the environment is 6-dimensional, and each dimension corresponds to the torque that can be applied to the cheetah's joints, including the torque of the thigh, calf, and foot rotors of the hind and front legs, and its value range is -1 to 1.

[0094] Table 1 Cheetah environmental score table

[0095]

[0096] The method proposed in the present invention is used for training in the cheetah environment. After a period of training, the agent gradually learns effective strategies on the data set. The results are shown in Table 1. The agent trained using the method proposed in the present invention performs well in the cheetah environment, and its average score is higher than that of the behavior cloning method. This shows that the method proposed in this article can effectively improve the performance of the agent in a complex environment. Specifically, in the medium data, both algorithms can achieve good performance and faster convergence speed. In the halfcheetah-medium-replay data set, the behavior cloning method cannot learn a good strategy, while the method proposed in the present invention can still maintain good performance. On mixed data sets such as halfcheetah-medium-expert, the behavior cloning method can only learn performance similar to that in the medium data set, while the method proposed in the present invention shows good learning performance.

[0097] Conventional behavior cloning methods tend to cover one mode of the behavior strategy, because the mapping relationship between states and actions in the behavior strategy is assumed to conform to the Gaussian distribution. However, the behavior strategy in the batch reinforcement learning dataset is often not a single Gaussian strategy.

[0098] In summary, the present invention provides a reinforcement learning strategy characterization method and system based on generative intelligence, which uses a diffusion model for strategy approximation and can better approximate non-Gaussian strategies. The diffusion model is based on random walk and probability integral, and gradually approximates complex distributions by simulating the diffusion process of particles in space. By increasing the number of particles and the number of simulations, the model can more accurately cover the target distribution characteristics and improve the learning effect.

[0099] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0100] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0101] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. 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.

[0102] In the embodiments provided by the present invention, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are only schematic. For example, the division of the modules or 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. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0103] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0104] 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.

[0105] If the integrated module / 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 present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0106] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0107] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0108] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0109] The above contents are only for explaining the technical idea of ​​the present invention and cannot be used to limit the protection scope of the present invention. Any changes made on the basis of the technical solution in accordance with the technical idea proposed by the present invention shall fall within the protection scope of the claims of the present invention.

Claims

1. A reinforcement learning strategy characterization method based on generative intelligence, characterized in that: The following steps are involved: S1. Randomly initialize the agent’s policy network and value network Q θ , and randomly initialize the corresponding target network Q θ, and Policy Network Modeling using diffusion models; S2, sampling small sample data from the pre-prepared data set D; S3. According to the state of the trajectory in the small sample data, through the strategy network Sample and calculate an action a; S4. Calculate the Q value based on action a; S5. Update the value network Q according to the calculated Q value θ , each update of the value network Q θ After C times, update the policy network And the value network Q θ The parameters are synchronized to the target network Q θ′ , until the model converges or reaches a fixed number of rounds.

2. The method for characterizing reinforcement learning strategies based on generative intelligence according to claim 1, characterized in that: In step S1, a diffusion model is used as an approximation method for the policy network.

3. The method for characterizing reinforcement learning strategies based on generative intelligence according to claim 1, characterized in that: In step S2, the small sample data includes N trajectories.

4. The method for characterizing reinforcement learning strategies based on generative intelligence according to claim 1, characterized in that: In step S3, random noise is used to perform perturbation to calculate an action a.

5. The method for characterizing reinforcement learning strategies based on generative intelligence according to claim 4, characterized in that: The diffusion model is specifically a series of probability-based transition matrices that are used to describe the transition probabilities between random variables from one time step to the next in the discrete state space.

6. The method for characterizing reinforcement learning strategies based on generative intelligence according to claim 1, characterized in that: In step S4, Q is calculated as follows: Among them, y represents the calculated Q value, r represents the reward in the trajectory, γ represents the discount factor of the reward, and s ′ Indicates the current environment status.

7. The method for characterizing reinforcement learning strategies based on generative intelligence according to claim 1, characterized in that: In step S5, the value network is updated as follows: Among them, y represents the calculated Q, N represents the size of the batch data used for training, and s ′ represents the current environment state, θ i Representing the Value Network Parameters.

8. The method for characterizing reinforcement learning strategies based on generative intelligence according to claim 1, characterized in that: The update strategy network is as follows: Among them, α represents the Q value guidance coefficient, Indicates the loss value updated by the diffusion model. represents the mathematical expectation, Q θ (s,a) represents the environment state pair (s,a) input to the value network Q θ The output after that; that is, through the state s in the data set D, sample action a from the policy network, in this case calculate the expected value of the Q value of the (s, a) pair.

9. The method for characterizing reinforcement learning strategies based on generative intelligence according to claim 1, characterized in that: After updating the value network C times, the target network and the policy network are synchronously updated to the corresponding policy network.

10. A reinforcement learning strategy representation system based on generative intelligence, characterized in that: include: Initialization module, randomly initializes the agent's policy network and value network Q θ , and randomly initialize the corresponding target network Q θ′ and Policy Network Modeling using diffusion models; The sampling module samples small sample data from the pre-prepared data set D; The state module uses the strategy network to Sample and calculate an action a; Calculation module, calculates the Q value based on action a; The update module updates the value network according to the calculated Q value. After updating the value network C times, it updates the strategy network and sets the value network Q θ Synchronize to target network Q θ′ , until the model converges or reaches a fixed number of rounds.

Citation Information

Patent Citations

  • Historical target value integration-based multi-agent reinforcement learning method

    CN114936651A

Cited By

  • Safe automatic driving method based on double-alternative diffusion strategy

    CN120057034A

  • A safe automatic driving method based on a double alternative diffusion strategy

    CN120057034B