AI algorithm-based agent cultivation iteration and emotion automatic cultivation method and system
By using an AI-based agent training and iteration method and an automatic emotion training method, combined with policy networks and emotion state vectors, the problem of integrating agent skill learning and emotion training is solved, realizing the comprehensive evolution of the agent and emotion-driven behavior, and improving adaptability and anthropomorphism.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XUZHOU SANMI TECHNOLOGY CO LTD
- Filing Date
- 2026-02-06
- Publication Date
- 2026-05-08
AI Technical Summary
Existing intelligent agents suffer from poor adaptability, lack of emotional dimension, and isolated training process in skill learning and emotion cultivation, failing to form a deep integration and collaborative iterative framework for skill learning and emotion cultivation.
This paper proposes an AI-based agent cultivation and automatic emotion cultivation method. By defining an agent model, combining a policy network and an emotion state vector, reinforcement learning algorithms are used to optimize behavioral strategies. Emotions are dynamically updated through emotion consistency rewards and state transition models, thereby achieving the collaborative iterative cultivation of agent behavioral strategies and internal emotional states.
It enhances the adaptability and robustness of the agent, adds an emotional dimension, makes its decisions more human-like and credible, improves learning efficiency, and realizes the quantification and iterative nature of emotional states, breaking the limitations of traditional rational optimizers.
Smart Images

Figure CN121997970A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and machine learning, and in particular to a method and system for iterative cultivation of intelligent agents and automatic emotion cultivation based on AI algorithms. Background Technology
[0002] With the development of artificial intelligence technology, intelligent agents have been widely applied in various fields such as games, virtual assistants, robot control, and automated customer service. Traditional intelligent agents are usually designed as rational decision-makers to complete specific tasks, and their behavioral logic is based on pre-programmed rules or fixed models trained on static datasets. These types of intelligent agents suffer from drawbacks such as poor adaptability, lack of emotional dimension, and isolated training process. Existing technologies have failed to deeply integrate skill learning with emotion cultivation to form a closed-loop, collaborative, iterative training framework. Summary of the Invention
[0003] Purpose of the invention: The purpose of this invention is to solve the technical problems in the prior art and provide a method and system for intelligent agent cultivation iteration and automatic emotion cultivation based on AI algorithms.
[0004] Technical Solution: This application proposes an AI algorithm-based method for iterative cultivation of intelligent agents and automatic emotion cultivation, applicable to the cultivation of emotions in intelligent agents, including the following steps: Step S1: Define an agent model, which includes a policy network for decision-making and an emotion state vector for representing internal states. Step S2: The agent interacts with the environment, selects and executes actions through the policy network based on the current environmental state and the current emotional state vector, and obtains the original task reward from the environmental feedback. Step S3: Calculate the emotional consistency reward based on the consistency between the current event and the current emotional state, and combine it with the original task reward to obtain a comprehensive reward for training. Step S4: Using a reinforcement learning algorithm, with the goal of maximizing the comprehensive reward, update the parameters of the policy network to optimize the agent's behavior policy; Step S5: Based on the preset emotional state transition model, and combined with the current event and the agent's internal goal, dynamically update the emotional state vector; Step S6: Feed the updated emotional state vector back to the next decision cycle, and repeat the above steps to achieve the collaborative iterative cultivation of the agent's behavioral strategies and internal emotional states.
[0005] Preferably, step S3 includes: Calculate the negative distance between the current emotion state vector and the expected emotion vector output by a pre-trained emotion evaluation function for the current event; The calculation formula is: ; in, For the pre-trained emotion evaluation function, Given the current environmental state, For the selected action, Let be the current emotional state vector, and be... The environment state at time t+1; By linearly combining the original task reward with the emotion consistency reward, a comprehensive reward is formed that drives the overall evolution of the intelligent agent. The formula is as follows: ; in, As the original task reward, A hyperparameter greater than 0 is used to balance the weights between task completion and emotional rationality.
[0006] Preferably, step S4 includes: Collect a piece of old strategy The generated interaction trajectory data; Calculate the advantage function estimate at each time step. This value measures the state Next action Advantages and disadvantages relative to the average level; Define importance sampling ratio: ; in, For current environmental status observation With the current emotional state vector The splicing or fusion features output the selection of possible actions given a given state. The probability distribution; Maximize expected cumulative discount total reward To achieve the goal, update the policy network parameters. Near-end strategy optimization algorithm.
[0007] Preferably, the objective function for: ; in, It is a small hyperparameter. The function limits the ratio to Inside.
[0008] Preferably, the policy network is updated by maximizing gradient ascent. To achieve this, a value function network is typically trained. To estimate the state values and jointly optimize them, the total loss function typically includes policy loss, value function loss, and entropy regularization term: ; in, , It is a coefficient. It is the strategy entropy, used to encourage exploration.
[0009] Preferably, step S5 includes: A new emotional state is composed of a weighted combination of three parts: the attenuation of the emotion from the previous moment, the emotional stimulus triggered by the current event, and the active regulation based on internal goals. The specific calculation formula for updating the emotion state vector is as follows: ; in, and Let be the emotional state vectors at time t and time t+1, respectively. This represents the emotional inertia coefficient. For emotional stimulus function, For internal emotion regulation function, To adjust the strength coefficient, This is an estimate of the long-term goal.
[0010] Preferably, the emotional stimulus function The neural network model is trained to make the output of the function approximate the output of a pre-trained emotion evaluation function for the same event, wherein the emotion evaluation function is used to evaluate the degree of matching between the event and the emotion. Emotional stimulus function It learns continuously during the nurturing process, with the learning goal of making its output as close as possible to the pre-trained emotion evaluation function. The output, i.e., minimizing the loss: .
[0011] Preferably, the internal emotion regulation function The input includes the current emotional state. and the expected value of the long-term target estimated by the value function Its output is used to guide emotional states in a direction conducive to achieving the long-term goal.
[0012] Preferably, step S6 includes: Update the obtained emotional state As one of the inputs to the policy network at the next time step; The agent is based on the new state and new emotions Make the next decision ; In this process, the policy network and sentiment models The parameters are continuously optimized, and the emotional state itself evolves dynamically with the interaction history, ultimately achieving the synergistic development of skills and emotions.
[0013] Secondly, embodiments of the present invention provide an AI-based intelligent agent cultivation and iteration system and an automatic emotion cultivation system, comprising: A definition unit is used to define an agent model, which includes a policy network for decision-making and an emotion state vector for representing internal states. An execution unit is used for the agent to interact in the environment. Based on the current environmental state and the current emotional state vector, it selects and executes actions through the policy network to obtain the original task reward from the environmental feedback. The unit is used to calculate the emotional consistency reward based on the consistency between the current event and the current emotional state, and combine it with the original task reward to obtain a comprehensive reward for training. The first update unit is used to update the parameters of the policy network using a reinforcement learning algorithm with the goal of maximizing the comprehensive reward, so as to optimize the agent's behavior policy. The second update unit is used to dynamically update the emotional state vector based on a preset emotional state transition model, combined with the current event and the agent's internal goals. The feedback unit is used to feed the updated emotional state vector back to the next decision cycle, and repeat the above steps in a loop to achieve the collaborative iterative cultivation of the agent's behavioral strategies and internal emotional states.
[0014] Thirdly, embodiments of the present invention provide an electronic device, including a processor and a memory. The memory stores one or more computer programs; when the one or more computer programs stored in the memory are executed by the processor, the electronic device is able to implement any of the possible design methods described in the first aspect.
[0015] Fourthly, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method as described in any of the above embodiments.
[0016] Fifthly, embodiments of the present invention also provide a computer program product that, when run on an electronic device, causes the electronic device to perform any possible design method of any of the above aspects.
[0017] Beneficial effects: This solution elevates "emotion" from an external, attached attribute to a core state variable within the intelligent agent that is quantifiable, iterative, and learnable. This breaks the limitations of traditional intelligent agents as purely "rational optimizers," endowing them with an intrinsic emotional dimension and laying the technological foundation for building next-generation artificial intelligence entities with intrinsic motivation and emotion-driven behavior.
[0018] The solution designs a closed-loop feedback system with parallel and tightly coupled "strategy learning" and "emotional evolution" channels. Skill improvement drives the optimization of the emotional model through event feedback, while the evolved emotional state serves as a key input influencing decision-making and learning efficiency. This mutually shaping and collaborative mechanism simulates the organic process of the coordinated development of cognition and emotion in organisms, making the evolution of the intelligent agent more comprehensive and natural.
[0019] After introducing emotional states and their dynamic models, the agent achieves a qualitative improvement in multiple performance dimensions: its decision-making is more adaptive and robust due to the inclusion of "mood" context; its emotional responses exhibit unprecedented anthropomorphism and credibility due to their continuity, rationality, and hierarchy; and its learning process is more intelligent in balancing exploration and utilization due to the introduction of internal emotion regulation mechanisms, thereby potentially improving learning efficiency.
[0020] All core components are built upon mature deep learning and reinforcement learning frameworks. Policy networks, value functions, and various emotion functions can all be implemented using standard neural networks and optimized through algorithms such as gradient descent. The entire nurturing process is highly automated, eliminating the need for tedious manual adjustments to emotion rules. The technical path is clear, the R&D risk is low, and it is easy to deploy and scale in real-world systems.
[0021] This technology directly addresses the core need for highly human-like human-computer interaction and possesses clear platform application value. It can be widely applied to cultivating game NPCs and virtual idols with rich personalities, developing empathetic educational mentors and mental health support assistants, and embedding more socially compliant emotional decision-making modules into service robots and autonomous driving systems, demonstrating enormous market potential. Attached Figure Description
[0022] Figure 1 A schematic diagram of the method framework for this invention is provided; Figure 2 This is a block diagram of a device structure provided in one embodiment of this application; Figure 3 This is a block diagram of an electronic device structure provided in one embodiment of this application. Detailed Implementation
[0023] To make the technical solution of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0024] Example 1 To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions in the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention. Unless otherwise defined, the technical or scientific terms used herein should have the ordinary meaning understood by those skilled in the art. The terms "including" and similar expressions used herein mean that the element or object preceding the term covers the element or object listed after the term and its equivalents, but do not exclude other elements or objects.
[0025] In response to the problems existing in the current technology, such as Figure 1 As shown, an AI algorithm-based method for iterative cultivation of intelligent agents and automatic emotion cultivation is proposed, applicable to the cultivation of emotions in intelligent agents. The method is characterized by the following steps: Step S1: Define an agent model, which includes a policy network for decision-making and an emotion state vector for representing internal states. The agent model consists of two parts: Policy Network This is a parameter for A deep neural network (e.g., composed of fully connected layers, convolutional layers, or recurrent neural networks). Its input is an observation of the current environmental state. With the current emotional state vector The splicing or fusion features output the selection of possible actions given a given state. The probability distribution, i.e. .
[0026] Emotional state vector This is an N-dimensional real-valued vector. Its value range is usually constrained to Within the interval, for ease of representation and normalization. Each dimension in the vector. This represents a basic, interpretable emotional component or dimension, such as: , , , ,...]⊤. The numerical value indicates the intensity of the emotion, and positive or negative indicates valence (e.g., positive for pleasure, negative for frustration).
[0027] Before training begins, the policy network parameters are... Perform random initialization. Initialize the emotion state vector to a neutral value, such as the zero vector. Or, based on the initial emotions preset for a specific scenario.
[0028] Step S2: The agent interacts with the environment, selects and executes actions based on the current environmental state and current emotional state vector through the policy network, and obtains the original task reward from the environmental feedback; the agent is in the environmental state Next, according to the strategy Sample and perform actions The environment transitions to the next state according to its dynamic model. and provide a feedback of the original task reward. The reward is based solely on mission completion; for example, defeating an enemy in the game earns +10 points, while losing health earns -5 points.
[0029] Step S3: Calculate the emotional consistency reward based on the consistency between the current event and the current emotional state, and combine it with the original task reward to obtain a comprehensive reward for training. Step S3 includes: The core of this step is to introduce emotion consistency rewards. This is used to assess and guide the appropriateness of emotional responses; Emotional assessment function This is a pre-trained neural network with the following parameters: Its input is an event tuple. The output is an N-dimensional vector. The meaning of this vector is: the appropriate emotional state that an agent "should" exhibit after such an event, based on a rational observer or human consensus. (Function) It is pre-trained on a large number of manually labeled datasets through supervised learning, and the loss function is: ;、 in It is a dataset labeled with "event-appropriate emotion" pairs.
[0030] Calculate the negative distance between the current emotion state vector and the expected emotion vector output by a pre-trained emotion evaluation function for the current event; The calculation formula is: ; in, For the pre-trained emotion evaluation function, Given the current environmental state, For the selected action, Let be the current emotional state vector, and be... The environmental state at time t+1; this reward encourages the agent's intrinsic emotional response to match social common sense or expectations. By linearly combining the original task reward with the emotion consistency reward, a comprehensive reward is formed that drives the overall evolution of the intelligent agent. The formula is as follows: ; in, As the original task reward, A hyperparameter greater than 0 is used to balance the weights between task completion and emotional rationality.
[0031] Step S4 includes: Step S4: Using a reinforcement learning algorithm, with the goal of maximizing the comprehensive reward, update the parameters of the policy network to optimize the agent's behavior policy; This step uses a reinforcement learning algorithm to maximize the expected cumulative discount reward. To achieve the goal, update the policy network parameters. The present invention preferably uses, but is not limited to, the Proximal Policy Optimization (PPO) algorithm because it has the advantages of stable training and high sample efficiency; Collect a piece of old strategy The generated interaction trajectory data; Calculate the advantage function estimate at each time step. This value measures the state Next action The relative performance compared to the average level; commonly calculated using the generalized advantage estimation (GAE) method; Define importance sampling ratio: ; in, For current environmental status observation With the current emotional state vector The splicing or fusion features output the selection of possible actions given a given state. The probability distribution; Maximize expected cumulative discount total reward To achieve the goal, update the policy network parameters. Near-end strategy optimization algorithm.
[0032] objective function for: ; in, It is a small hyperparameter (e.g., 0.2). The function limits the ratio to This avoids excessively large update steps due to an excessively high ratio.
[0033] The policy network is updated by maximizing gradient ascent. To achieve this, a value function network is typically trained. To estimate the state values and jointly optimize them, the total loss function typically includes policy loss, value function loss, and entropy regularization term: ; in, , It is a coefficient. It is the strategy entropy, used to encourage exploration.
[0034] Step S5: Based on the preset emotional state transition model, and combined with the current event and the agent's internal goal, dynamically update the emotional state vector; Step S5 includes: The new emotional state is a weighted combination of three components: the attenuation of the emotion from the previous moment, the emotional stimulus triggered by the current event, and the active regulation based on internal goals. This step is the core of automatic emotion cultivation, and it is updated based on a carefully designed emotional state transition model. The model simulates three driving forces of emotional change: inertia, external stimuli, and internal regulation.
[0035] The specific calculation formula for updating the emotion state vector is as follows: ; in, and Let be the emotional state vectors at time t and time t+1, respectively. This represents the emotional inertia coefficient. It is called the emotional inertia coefficient or decay coefficient, which simulates the persistence and smooth change characteristics of emotions. The closer it is to 1, the less likely the emotions are to change abruptly, and the stronger the "memory". For emotional stimulus function, For internal emotion regulation function, To adjust the strength coefficient, Control the intensity of internal regulation. This indicates that the emotion is entirely driven by the event stimulus; This introduces goal-based self-regulation capabilities. This is an estimate of the long-term goal.
[0036] The emotional stimulus function For a neural network model, the training objective is to make the output of the function approximate the output of a pre-trained emotion evaluation function for the same event. The emotion evaluation function is used to evaluate the degree of matching between the event and the emotion. The vector represents the most direct and instinctive effect of the event itself on the emotion (e.g., receiving a gift produces a pleasurable stimulus, encountering danger produces a fearful stimulus). Emotional stimulus function It learns continuously during the nurturing process, with the learning goal of making its output as close as possible to the pre-trained emotion evaluation function. The output, i.e., minimizing the loss: .
[0037] The internal emotion regulation function The input includes the current emotional state. and the expected value of the long-term target estimated by the value function Its output is used to guide emotional states in a direction conducive to achieving the long-term goal.
[0038] This is a learnable function (such as a small neural network or linear model) with parameters. It represents the proactive and conscious regulation of emotions by an intelligent agent based on long-term interests.
[0039] Input: Current mood and long-term goal estimation . Typically provided by a value function network, i.e. It represents the projected cumulative original task rewards that can be obtained in the future under the current state.
[0040] Function: When the value function predicts a good prospect ( High) But when the current mood is negative (such as depressed), It might output a positive adjustment vector to attempt to boost positive emotions, maintaining motivation and exploratory drive. Conversely, when the predicted outlook is bleak but the emotions are overly excited, it might output a moderating vector to appropriately reduce excitement, prompting the agent to adopt a more cautious strategy. This simulates higher-level cognitive emotion regulation capabilities such as "self-motivation" and "calm thinking."
[0041] Training method: parameters Can be used with strategy parameters Together, they are optimized through reinforcement learning. Because... Output impact This, in turn, affects subsequent strategies. And the final cumulative reward, therefore, the cumulative reward can be adjusted using the policy gradient method. The gradient is backpropagated to learn a regulation strategy that is beneficial to the achievement of long-term tasks.
[0042] For internal adjustment function Its gradient can be obtained using the policy gradient theorem. Specifically, the cumulative reward... right The gradient can be approximated as: ; in, Indicates emotional state depends on The historical evolution of the gradient. This gradient can be estimated and updated through backpropagation in time (BPTT) or alternative gradient methods. .
[0043] Step S6: Feed the updated emotional state vector back to the next decision cycle, and repeat the above steps to achieve the collaborative iterative cultivation of the agent's behavioral strategies and internal emotional states.
[0044] Step S6 includes: Update the obtained emotional state As one of the inputs to the policy network at the next time step; The agent is based on the new state and new emotions Make the next decision ; In this process, the policy network and sentiment models The parameters are continuously optimized, and the emotional state itself evolves dynamically with the interaction history, ultimately achieving the synergistic development of skills and emotions.
[0045] In other embodiments of the invention, combined with Figure 2 This invention discloses an AI-based intelligent agent cultivation and automatic emotion cultivation system, comprising: Definition unit 201 is used to define an intelligent agent model, the model including a policy network for decision-making and an emotion state vector for representing internal states; The execution unit 202 is used for the agent to interact in the environment. Based on the current environmental state and the current emotional state vector, it selects and executes actions through the policy network to obtain the original task reward from the environmental feedback. Unit 203 is used to calculate the emotional consistency reward based on the consistency between the current event and the current emotional state, and combine it with the original task reward to obtain a comprehensive reward for training. The first update unit 204 is used to update the parameters of the policy network using a reinforcement learning algorithm with the goal of maximizing the comprehensive reward, so as to optimize the agent's behavior policy. The second update unit 205 is used to dynamically update the emotional state vector according to a preset emotional state transition model, combined with the current event and the agent's internal goal. Feedback unit 206 is used to feed back the updated emotional state vector to the next decision cycle, and repeat the above steps in a loop to achieve the collaborative iterative cultivation of the agent's behavioral strategy and internal emotional state.
[0046] In other embodiments of the present invention, an electronic device 400 is disclosed, such as... Figure 3 As shown, the electronic device may include: one or more processors 401; a memory 402; a display 403; one or more application programs (not shown); and one or more computer programs 404. These devices can be connected via one or more communication buses 405. The one or more computer programs 404 are stored in the memory 402 and configured to be executed by the one or more processors 401. The one or more computer programs 404 include instructions that can be used to perform actions such as... Figure 1 And the steps in the corresponding embodiments.
[0047] Through the above description of the embodiments, those skilled in the art will clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device, and unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0048] In the various embodiments of this invention, the functional units can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0049] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as flash memory, portable hard disk, read-only memory, random access memory, magnetic disk, or optical disk.
[0050] The above description is merely a specific implementation of the embodiments of the present invention, but the protection scope of the embodiments of the present invention is not limited thereto. Any changes or substitutions within the technical scope disclosed in the embodiments of the present invention should be covered within the protection scope of the embodiments of the present invention. Therefore, the protection scope of the embodiments of the present invention should be determined by the protection scope of the claims.
Claims
1. A method for iterative cultivation and automatic emotion training of intelligent agents based on AI algorithms, applicable to the emotion training of intelligent agents, characterized in that, Includes the following steps: Step S1: Define an agent model, which includes a policy network for decision-making and an emotion state vector for representing internal states. Step S2: The agent interacts with the environment, selects and executes actions through the policy network based on the current environmental state and the current emotional state vector, and obtains the original task reward from the environmental feedback. Step S3: Calculate the emotional consistency reward based on the consistency between the current event and the current emotional state, and combine it with the original task reward to obtain a comprehensive reward for training. Step S4: Using a reinforcement learning algorithm, with the goal of maximizing the comprehensive reward, update the parameters of the policy network to optimize the agent's behavior policy; Step S5: Based on the preset emotional state transition model, and combined with the current event and the agent's internal goal, dynamically update the emotional state vector; Step S6: Feed the updated emotional state vector back to the next decision cycle, and repeat the above steps to achieve the collaborative iterative cultivation of the agent's behavioral strategies and internal emotional states.
2. The method for iterative cultivation of intelligent agents and automatic emotion cultivation based on AI algorithms according to claim 1, characterized in that, Step S3 includes: Calculate the negative distance between the current emotion state vector and the expected emotion vector output by a pre-trained emotion evaluation function for the current event; The calculation formula is: ; in, For the pre-trained emotion evaluation function, Given the current environmental state, For the selected action, Let be the current emotional state vector, and be... The environment state at time t+1; By linearly combining the original task reward with the emotion consistency reward, a comprehensive reward is formed that drives the overall evolution of the intelligent agent. The formula is as follows: ; in, As the original task reward, A hyperparameter greater than 0 is used to balance the weights between task completion and emotional rationality.
3. The method for iterative cultivation of intelligent agents and automatic emotion cultivation based on AI algorithms according to claim 1, characterized in that, Step S4 includes: Collect a piece of old strategy The generated interaction trajectory data; Calculate the advantage function estimate at each time step. This value measures the state Next action Advantages and disadvantages relative to the average level; Define importance sampling ratio: ; in, For current environmental status observation With the current emotional state vector The splicing or fusion features output the selection of possible actions given a given state. The probability distribution; Maximize expected cumulative discount total reward To achieve the goal, update the policy network parameters. Near-end strategy optimization algorithm.
4. The method for iterative cultivation of intelligent agents and automatic emotion cultivation based on AI algorithms according to claim 3, characterized in that, objective function for: ; in, It is a hyperparameter. The function limits the ratio to Inside.
5. The method for iterative cultivation of intelligent agents and automatic emotion cultivation based on AI algorithms according to claim 4, characterized in that, The policy network is updated by maximizing gradient ascent. To achieve this, a value function network is typically trained. To estimate the state values and jointly optimize them, the total loss function typically includes policy loss, value function loss, and entropy regularization term: ; in, , It is a coefficient. It is the strategy entropy, used to encourage exploration.
6. The method for iterative cultivation of intelligent agents and automatic emotion cultivation based on AI algorithms according to claim 1, characterized in that, Step S5 includes: A new emotional state is composed of a weighted combination of three parts: the attenuation of the emotion from the previous moment, the emotional stimulus triggered by the current event, and the active regulation based on internal goals. The specific calculation formula for updating the emotion state vector is as follows: ; in, and Let be the emotional state vectors at time t and time t+1, respectively. This represents the emotional inertia coefficient. For emotional stimulus function, For internal emotion regulation function, To adjust the strength coefficient, This is an estimate of the long-term goal.
7. The method for iterative cultivation of intelligent agents and automatic emotion cultivation based on AI algorithms according to claim 6, characterized in that, The emotional stimulus function The neural network model is trained to make the output of the function approximate the output of a pre-trained emotion evaluation function for the same event, wherein the emotion evaluation function is used to evaluate the degree of matching between the event and the emotion. Emotional stimulus function It learns continuously during the nurturing process, with the learning goal of making its output as close as possible to the pre-trained emotion evaluation function. The output, i.e., minimizing the loss: 。 8. The method for iterative cultivation of intelligent agents and automatic emotion cultivation based on AI algorithms according to claim 6, characterized in that, The internal emotion regulation function The input includes the current emotional state. and the expected value of the long-term target estimated by the value function Its output is used to guide emotional states in a direction conducive to achieving the long-term goal.
9. The method for iterative cultivation of intelligent agents and automatic emotion cultivation based on AI algorithms according to claim 1, characterized in that, Step S6 includes: Update the obtained emotional state As one of the inputs to the policy network at the next time step; The agent is based on the new state and new emotions Make the next decision ; In this process, the policy network and sentiment models The parameters are continuously optimized, and the emotional state itself evolves dynamically with the interaction history, ultimately achieving the synergistic development of skills and emotions.
10. A system for iterative cultivation of intelligent agents and automatic emotion development based on AI algorithms, characterized in that, include: A definition unit is used to define an agent model, which includes a policy network for decision-making and an emotion state vector for representing internal states. An execution unit is used for the agent to interact in the environment. Based on the current environmental state and the current emotional state vector, it selects and executes actions through the policy network to obtain the original task reward from the environmental feedback. The unit is used to calculate the emotional consistency reward based on the consistency between the current event and the current emotional state, and combine it with the original task reward to obtain a comprehensive reward for training. The first update unit is used to update the parameters of the policy network using a reinforcement learning algorithm with the goal of maximizing the comprehensive reward, so as to optimize the agent's behavior policy. The second update unit is used to dynamically update the emotional state vector based on a preset emotional state transition model, combined with the current event and the agent's internal goals. The feedback unit is used to feed the updated emotional state vector back to the next decision cycle, and repeat the above steps in a loop to achieve the collaborative iterative cultivation of the agent's behavioral strategies and internal emotional states.