A role interaction scene generation method and related device
By configuring initial stance parameters and dynamically adjusting them for virtual characters, and combining balanced and diverse constraint selection options, the problems of feedback balance and option diversity in multi-character interaction scenarios are solved, thereby improving the strategic depth and playability of the interaction scenarios.
Patent Information
- Application Number
- CN202610948761.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-26
- Publication Date
- 2026-11-24
AI Technical Summary
Existing technologies struggle to simultaneously satisfy feedback balance and option diversity metrics when generating multi-role interaction scenarios, leading to fluctuations in scenario quality and making the player experience highly dependent on random luck rather than decision-making ability.
By configuring initial stance parameters for multiple virtual characters, high-conflict, wavering, and cooperative faction conditions are formed. The stance distribution is dynamically adjusted based on the current context theme. Candidate options are filtered by combining equilibrium constraints and diversity constraints to generate a list of available options.
The generated interactive scenarios maintain reasonable differences in feedback results, with a rich variety of strategy types, which enhances the strategic depth and playability for players and reduces experience problems caused by extreme or homogeneous feedback.
Smart Images

Figure CN123148643A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of scene intelligent generation technology, and more specifically, to a method and related equipment for generating character interaction scenes. Background Technology
[0002] In applications such as games, virtual reality, and interactive narratives, there are common interactive scenarios where players need to make choices in dynamic situations involving multiple non-player characters and receive differentiated feedback based on the characters' positions. Examples include multi-party debates, factional diplomacy, and persuasion and cooperation among characters. The playability and narrative depth of such scenarios closely depend on two core quality indicators of the generated scenario: first, the balance of feedback, which requires a reasonable distribution of overall feedback from each option in a single interaction, avoiding extreme situations where options excessively cater to the majority of characters, resulting in inflated feedback, or where widespread opposition leads to overall low feedback; second, the diversity of options, which requires that the available options have sufficient differences in strategy types, covering different interaction paradigms such as confrontation, cooperation, compromise, and persuasion, so that decision-making has a substantial strategic choice space.
[0003] Existing technologies typically pre-define a pool of topics, roles, and options, and then combine these elements using random selection or simple conditional rules during runtime. This generation method lacks the ability to quantitatively control the overall balance of feedback within the scenario, leading to drastic fluctuations in scenario quality. In one interaction, randomly generated options might unintentionally align highly with the positions of most roles, allowing players to easily receive positive feedback regardless of their choice, resulting in inflated feedback and a loss of challenge. In another interaction, options might conflict significantly with the positions of the characters present, leading to widespread negative feedback regardless of the player's choice, resulting in a generally low level of feedback and frustration. The player's experience is highly dependent on random luck rather than decision-making ability. Even when some improvements attempt to control the feedback results, they often sacrifice the diversity of option strategy types due to a single optimization objective, resulting in highly homogeneous available options in terms of strategy semantics, making it practically impossible for players to make differentiated strategy choices. Therefore, how to ensure that the generated interactive scenarios simultaneously meet the preset balance index and option diversity index, and solve the problem of decreased playability caused by their mutual exclusion, has become a pressing technical challenge in this field. Summary of the Invention
[0004] This application provides a method and related equipment for generating character interaction scenes. The generated interaction scenes simultaneously meet preset balance and option diversity indicators, significantly improving the strategic depth and playability of multi-character interaction scenes.
[0005] A method for generating character interaction scenes, comprising:
[0006] Multiple virtual characters are acquired, and initial position parameters are configured for the multiple virtual characters according to a preset faction tension structure, so that at least one group of virtual characters meets the high conflict condition, at least one group of virtual characters meets the swing condition, and at least one group of virtual characters meets the cooperation condition.
[0007] Obtain current context theme information, and adjust the initial stance parameters of each virtual character based on the current context theme information to obtain the dynamic stance distribution of each virtual character under the current context theme;
[0008] The role interaction process is divided into multiple consecutive decision-making stages. In each decision-making stage, based on the dynamic position distribution, the candidate option set corresponding to the current situation theme and the current decision-making stage is filtered according to the equilibrium constraint and the diversity constraint to generate a list of available options for each decision-making stage.
[0009] Based on the list of available options obtained in each decision-making stage, an interactive scenario for user interaction is constructed.
[0010] Optionally, based on the dynamic position distribution, the set of candidate options corresponding to the current situation theme and the current decision stage is filtered according to equilibrium constraints and diversification constraints to generate a list of available options for each decision stage, including:
[0011] Retrieve a set of candidate options from a pre-defined pool that correspond to the current context and decision-making stage;
[0012] Based on the dynamic position distribution and the preset tendency representation of each candidate option, the expected feedback contribution value of each candidate option is calculated, and the candidate option set is filtered according to the equilibrium constraint so that the dispersion of the expected feedback contribution value of each candidate option in the filtered candidate option set is within the preset equilibrium interval.
[0013] The candidate option set is filtered according to the diversity constraint, so that the candidate option combination obtained after filtering contains at least one option of different strategy type;
[0014] The options that simultaneously satisfy the equilibrium constraint and the diversification constraint are determined as the available options in the decision-making stage, forming a list of available options.
[0015] Optionally, the step of acquiring multiple virtual characters and configuring initial stance parameters for the multiple virtual characters according to a preset faction tension structure includes:
[0016] Obtain the preset faction tension structure, which stipulates that the multiple virtual characters must simultaneously include conflict relationship type, swing relationship type and cooperative relationship type;
[0017] Based on the aforementioned camp tension structure, corresponding initial position parameter configuration rules are determined for each relationship type. These initial position parameter configuration rules include: for virtual character groups belonging to the conflict relationship type, the initial position parameter is set to maintain the maximum distance constraint within a preset position space; for virtual character groups belonging to the swing relationship type, the initial position parameter is set to maintain a transitional region between the central and peripheral regions within a preset position space, with a random fluctuation range of a preset amplitude; and for virtual character groups belonging to the cooperative relationship type, the initial position parameter is set to maintain the minimum distance constraint within a preset position space.
[0018] Based on the initial position parameter configuration rules, the initial position parameters of the multiple virtual characters are generated respectively.
[0019] Optionally, the conflict condition is determined based on a position conflict index, the wavering condition is determined based on a position wavering index, and the cooperation condition is determined based on a position cooperation index, wherein:
[0020] The position conflict index is determined by calculating the first distance between the initial position vectors of two virtual characters;
[0021] The position swing index is determined based on the second distance between the position vector of the virtual character and the position of the group center of the virtual character, as well as the historical position change range of the virtual character.
[0022] The positional synergy index is determined based on the historical success rate of cooperation between the two virtual characters and the degree of overlap of the same directional dimensions in the initial positional vector.
[0023] Optionally, after generating the initial stance parameters for the plurality of virtual characters, the method further includes:
[0024] Based on the position conflict index, the position swing index, and the position coordination index, the generated initial position parameters are subjected to a camp tension verification. The verification items for the camp tension verification include verifying whether the position conflict index between virtual character groups with conflict relationship type is greater than a preset conflict threshold, whether the position swing index between virtual character groups with swing relationship type is within a preset swing range, and whether the position coordination index between virtual character groups with coordination relationship type is greater than a preset coordination threshold.
[0025] If any verification item fails, the initial stance parameters of the corresponding virtual character will be adjusted until all verification items pass.
[0026] Optionally, the initial stance parameters of each virtual character are adjusted based on the current context theme information to obtain the dynamic stance distribution of each virtual character under the current context theme, including:
[0027] Extract key elements from the current contextual topic information and map the key elements to a high-dimensional semantic space to obtain a contextual semantic vector;
[0028] For each virtual character, the contextual semantic vector is fused with the initial stance parameters of the virtual character to generate a differentiated perturbation vector corresponding to the virtual character, wherein the differentiated perturbation vectors corresponding to different virtual characters differ in at least one dimension of direction and amplitude.
[0029] The differentiated perturbation vectors are superimposed onto the initial stance parameters of each virtual character to obtain the dynamic stance distribution.
[0030] Optionally, the differentiated perturbation vectors are superimposed onto the initial stance parameters of each virtual character to obtain the dynamic stance distribution, including:
[0031] Obtain the sensitivity coefficient of each virtual character to the context theme;
[0032] The amplitude of the differential perturbation vector corresponding to each virtual character is adjusted using the sensitivity coefficient of each virtual character.
[0033] The dynamic position distribution is obtained by weighting and summing the amplitude-adjusted differential perturbation vector with its corresponding initial position parameter.
[0034] Optionally, the preset tendency representation includes the preset tendency vector of each candidate option, and the dynamic stance distribution includes the dynamic stance vector of each virtual character.
[0035] The calculation of the expected feedback contribution value of each candidate option based on the dynamic position distribution and the preset tendency representation of each candidate option includes:
[0036] Obtain a preset tendency vector for each candidate option, wherein the preset tendency vector is used to characterize the degree of bias of the corresponding candidate option toward different positions;
[0037] For each candidate option, the similarity between the preset tendency vector and the dynamic stance vector of each virtual character is calculated.
[0038] The similarity is weighted and summed using the preset influence weights of each virtual character to obtain the expected feedback contribution value of the candidate option.
[0039] Optionally, the step of filtering the candidate option set according to the equilibrium constraint includes:
[0040] Calculate the dispersion index of the expected feedback contribution value of each candidate option in the candidate option set;
[0041] If the dispersion index exceeds the preset equilibrium range, then remove some candidate options from the candidate option set, including those with the highest or lowest expected feedback contribution values, and return to recalculate the dispersion index until the dispersion index falls within the preset equilibrium range.
[0042] Optionally, if the number of candidate options obtained after filtering by the balance constraint and / or the diversification constraint does not meet the preset number requirement, an option supplementation operation is triggered, and the supplemented candidate option set is re-filtered according to the balance constraint and the diversification constraint until a list of available options that meet the conditions is obtained.
[0043] The option supplement operation includes at least one of the following:
[0044] Select supplementary options from the set of options marked as high-quality options in the historical interaction records and add them to the candidate option set;
[0045] New variant options are generated based on the current context theme and the dynamic stance distribution, and added to the candidate option set;
[0046] A perturbation operation with a preset direction is performed on the existing candidate options to obtain derived options, which are then added to the candidate option set.
[0047] Optionally, the different strategy types include a first strategy type, a second strategy type, and a third strategy type;
[0048] The step of filtering the candidate option set based on diversity constraints includes:
[0049] Using a pre-trained strategy classification model, strategy type identification is performed on each candidate option, and a type label is assigned to each candidate option. The type label includes a first strategy type, a second strategy type, and a third strategy type. The first strategy type option is the option whose similarity between the preset tendency vector and the mainstream direction vector of the current dynamic position distribution is higher than a first similarity threshold. The second strategy type option is the option whose similarity is between the first similarity threshold and the second similarity threshold. The third strategy type option is the option whose similarity is lower than the second similarity threshold.
[0050] When generating the list of available options, a set coverage check is performed to verify whether the selected set of options contains options with all three types of labels.
[0051] If the option does not contain all three types of labels, an option replacement operation is triggered, replacing some of the selected options with options of the missing type, until the selected option set covers options of the first, second, and third strategy types.
[0052] Optionally, when there are no options in the preset option pool that meet the conditions of the third strategy type, a generative model is used to generate variant options with a deviation greater than a preset deviation threshold from the mainstream direction vector, based on the current context theme and the dynamic position distribution. The generated variant options are then labeled as the third strategy type and added to the candidate option set.
[0053] Optionally, after constructing the interactive scenarios that users can interact with, it also includes:
[0054] Receive the target options selected by the user from the corresponding list of available options at each decision stage, forming a selection sequence;
[0055] Based on the dynamic position distribution of each decision-making stage and the matching relationship between each target option and the virtual character faction, a weighted calculation is performed on each target option in the selection sequence to obtain the stage interaction score.
[0056] Extract the policy path features of the selected sequence, evaluate the consistency of the policy path features with the predefined policy path template, and generate a cross-stage path consistency index.
[0057] By combining the stage interaction score with the cross-stage path consistency index, a final interaction score is generated, and the interaction result level is output according to the preset mapping relationship between score and level.
[0058] Optionally, the step of weighting each target option in the selection sequence to obtain the stage interaction score includes:
[0059] Determine the preference weight vector corresponding to each target option;
[0060] For the decision-making stage, the matching degree between the preference weight vector and the dynamic stance vector of each virtual character is calculated;
[0061] The contribution adjustment coefficient is determined according to the relationship type to which each virtual character belongs. The contribution adjustment coefficient for virtual characters belonging to the conflict relationship type is the amplification coefficient, the contribution adjustment coefficient for virtual characters belonging to the swing relationship type is the random disturbance coefficient, and the contribution adjustment coefficient for virtual characters belonging to the cooperative relationship type is the smoothing coefficient.
[0062] The matching degree of each virtual character is weighted and accumulated using the contribution adjustment coefficient to obtain the stage interaction score of the decision-making stage.
[0063] Optionally, the step of extracting the policy path features of the selected sequence, evaluating the consistency of the policy path features with a predefined policy path template, and generating a cross-stage path consistency index includes:
[0064] Each target option in the selection sequence is encoded into a state feature sequence according to the decision-making stage order;
[0065] Calculate the state transition probability between adjacent decision stages in the state feature sequence to obtain the policy path feature corresponding to the selection sequence;
[0066] The state transition probabilities between adjacent decision stages in the strategy path features are compared with the reference state transition probability sequence in the predefined strategy path template, and the cross-stage path consistency index is determined based on the degree of deviation of the comparison results.
[0067] A device for generating character interaction scenes, including a memory and a processor;
[0068] The memory is used to store programs;
[0069] The processor is used to execute the program to implement the various steps of the character interaction scene generation method as described in any of the above.
[0070] A readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the character interaction scene generation method as described in any of the preceding claims.
[0071] A computer program product includes a computer program that, when run by a processor, executes the steps of the character interaction scene generation method as described in any of the preceding claims.
[0072] As can be seen from the above technical solutions, the role interaction scene generation method and related equipment provided in this application first configure initial position parameters for multiple virtual characters based on a preset faction tension structure, ensuring that virtual characters with three faction conditions—high conflict, wavering, and cooperation—simultaneously exist in the scene. Then, based on the current situation theme information, the initial positions of each character are dynamically adjusted to form a dynamic position distribution highly related to the situation. Next, the interaction process is divided into multiple consecutive decision-making stages. In each decision-making stage, based on the dynamic position distribution, the candidate option set corresponding to the current situation theme and the current decision-making stage is filtered according to equilibrium constraints and diversification constraints to generate a list of available options for each decision-making stage, and a scene for user interaction is generated. Based on the above solution, the beneficial effects achieved by this application include:
[0073] First, this application explicitly embeds equilibrium constraints into the option selection process, using the expected feedback contribution value of each candidate option as a quantifiable equilibrium indicator and strictly limiting its dispersion to a preset equilibrium range. This eliminates extreme distributions where options are biased towards pleasing the majority of characters or opposing the majority of characters, from the generation mechanism level. Since the expected feedback contribution value is calculated based on a dynamic position distribution, it comprehensively measures the overall expected impact of a certain option on high-conflict, swing, and cooperative factions in the current context. Therefore, the option list selected with dispersion constraints can ensure that each option has a reasonable range of differences in expected feedback results. It will not lead to highly homogeneous feedback results and loss of decision-making differentiation due to excessively small differences, nor will it lead to extreme phenomena such as artificially high or low feedback due to excessively large differences. This ensures that the challenge difficulty and feedback fairness of each interaction scenario remain stable, and transforms the player's experience benchmark from relying on random luck to a direct mapping of their decision-making ability.
[0074] Secondly, this application introduces diversity constraints as parallel conditions into the option selection process, ensuring that the final generated combinations of available options cover differentiated interaction paradigms in terms of strategy type. This transforms the trade-off between equilibrium and diversity from a mutually exclusive single-objective problem into a collaborative selection problem with dual constraints. The equilibrium constraint acts on the feedback result dimension of the options, ensuring a reasonable distribution of expected feedback for each option; the diversity constraint acts on the strategy semantic dimension of the options, ensuring sufficient differentiation in the interactive strategies available to the player. These two constraints act on different dimensions, complementing and not canceling each other out. In the resulting interactive scenario, the player faces a set of diverse options with varying strategy directions but a balanced distribution of expected feedback. This avoids both strategy gaps caused by convergent feedback and misjudgments of abilities due to extreme feedback, significantly enhancing the strategic depth and playability of multi-role interaction scenarios. Attached Figure Description
[0075] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0076] Figure 1 This is a flowchart of a method for generating a role interaction scene disclosed in an embodiment of this application;
[0077] Figure 2 This is a hardware structure block diagram of a character interaction scene generation device disclosed in an embodiment of this application. Detailed Implementation
[0078] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0079] This application can be used in a wide variety of general-purpose or special-purpose computing device environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor devices, distributed computing environments including any of the above devices, etc.
[0080] The following section introduces the solution proposed in this application. The technical solution is as follows, please refer to the text below for details.
[0081] Figure 1 This is a flowchart of a method for generating a role interaction scene disclosed in an embodiment of this application.
[0082] like Figure 1 As shown, the method may include:
[0083] Step S1: Obtain multiple virtual characters, and configure initial position parameters for the multiple virtual characters according to the preset faction tension structure, so that there is at least one group of virtual characters that meet the high conflict condition, at least one group of virtual characters that meet the swing condition, and at least one group of virtual characters that meet the cooperation condition.
[0084] Specifically, at the initial stage of constructing the interactive context, the system first retrieves a batch of virtual characters from the character library or creates them through a generative model. These characters each possess basic attributes and background settings. Based on a pre-designed faction tension structure, which defines several key anchor points in the position space and their interrelationships, the system assigns initial position parameters to each virtual character. The configuration of these initial position parameters follows a differentiated distribution principle; its purpose is not simply random allocation, but rather to intentionally create structural tension within the character group. Specifically, by setting the position parameters of some characters in sharply opposing positions, they satisfy high-conflict conditions, thus forming a natural antagonistic relationship between characters and reserving potential energy for dramatic conflict in subsequent plot developments. Simultaneously, other characters are configured with ambiguous positions, existing in a vacillating state at the boundary of opposing factions or on the verge of collapse. These characters may reconcile conflicts or quickly sway towards either faction due to external influences, becoming key variables driving plot twists. Furthermore, there exists at least one group of virtual characters with similar or complementary position parameters, satisfying synergy conditions and thus establishing allies or tacit partnerships. By embedding these three typical relationship archetypes within the same set of characters, the system is able to establish a multi-layered interactive foundation rich in potential narrative tension from the outset, avoiding a bland plot or a lack of interactive options due to homogenization of positions.
[0085] Step S2: Obtain the current context theme information, and adjust the initial stance parameters of each virtual character based on the current context theme information to obtain the dynamic stance distribution of each virtual character under the current context theme.
[0086] Specifically, when the system loads or randomly generates a specific situation theme, such as a disaster crisis, resource competition, or decision-making, it acquires information about the current situation theme. This information typically includes a semantic description of the situation, its emotional tone, and key event elements. Subsequently, the system examines the correlation between the initial stance parameters of each virtual character and the current situation theme, based on pre-defined stance migration rules. For characters highly correlated with the situation theme, their stance parameters will shift directionally along the path defined by the alignment tension structure. For example, a character initially in a state of flux might lean towards self-preservation or the alignment's main stance under a life-or-death crisis theme. Conversely, for characters with weaker correlations, the adjustment of their stance parameters is relatively limited, or even remains unchanged. This adjustment is not globally uniform but simulates the specific stance changes that different individuals experience when facing the same situation due to differences in personality, experience, and goals. After adjustment, the original initial stance parameters are transformed into a dynamic stance distribution instantly bound to the current situation. This dynamic distribution reflects the set of virtual characters' immediate tendencies under specific narrative pressures, ensuring that the characters' stances are not isolated and static, but rather flow and evolve with changes in the plot context. This allows subsequent interactive content to closely match the dramatic requirements of the current situation, enhancing the realism and immersion of the narrative.
[0087] Step S3: Divide the role interaction process into multiple consecutive decision-making stages. In each decision-making stage, based on the dynamic position distribution, filter the set of candidate options corresponding to the current situation theme and the current decision-making stage according to the equilibrium constraint and the diversity constraint, and generate a list of available options for each decision-making stage.
[0088] Specifically, the system discretizes the complete character interaction process into multiple progressive decision-making stages, each corresponding to a user intervention moment or plot fork. For each decision-making stage, the system pre-sets a set of candidate options matching that stage and the current situation's theme. This set includes various possible behavioral statements, dialogue responses, or strategy choices. In this step, the system does not directly present all candidate options but introduces equilibrium constraints and diversity constraints for intelligent filtering. The equilibrium constraint is mainly used to prevent available options from excessively favoring or suppressing a particular stance. It requires that the filtered options cover different stance inclinations in guiding character attitude changes, so that the plot development does not fall into a one-dimensional ending too early, maintaining the openness and debatability of the narrative line. The diversity constraint acts on the expression form, emotional tone, and behavioral type of the options to prevent options with similar functions or expressions, ensuring that the choices faced by the user have sufficient differentiation and strategic depth. During the filtering process, each candidate option is matched and evaluated against the current dynamic stance distribution, examining whether selecting the option would exacerbate or alleviate high-conflict relations between specific camps, whether it involves the stance influencing of wavering characters, and whether it strengthens or weakens cooperative relationships. Ultimately, those options that pass both the equilibrium and diversity tests are retained, forming a list of available options for this decision-making stage. This list dynamically adapts to the real-time positional landscape, ensuring the continuity of narrative conflict while providing users with a meaningful decision-making space.
[0089] Step S4: Based on the list of available options obtained in each decision-making stage, construct an interactive scenario that allows users to interact.
[0090] Specifically, after obtaining a sequence of available options covering all decision-making stages, the system constructs a complete interactive scenario for the user. This scenario construction process includes laying out the available options corresponding to each decision stage in the form of appropriate interface controls, such as dialog boxes, action wheels, or menu items, and simultaneously loading the character reaction logic, emotional performance resources, environmental feedback events, and triggering conditions for subsequent plot branches associated with each option. The constructed interactive scenario is not a static image, but rather an instance of a narrative engine with causal propagation capabilities: when the user makes a choice at a certain stage, the scenario drives the relevant virtual characters to respond consistently according to their dynamic stance based on the preset script corresponding to that choice, propelling the plot into the next decision stage, where a new, filtered list of available options is presented. In this way, the factional tension, situational adaptability, and option filtering results created in steps S1 to S3 are seamlessly transformed into an experiential interactive narrative flow. This interactive scenario can automatically maintain a dynamic balance between three types of character relationships: high conflict, vacillation, and cooperation. This ensures that the plot development perceived by the user is both varied and does not deviate from the inherent logic of the character's standpoint. As a result, while enhancing the user's sense of immersion and control, it significantly improves the regeneration value and replayability of the narrative content.
[0091] As can be seen from the above technical solutions, the role interaction scene generation method and related equipment provided in this application first configure initial position parameters for multiple virtual characters based on a preset faction tension structure, ensuring that virtual characters with three faction conditions—high conflict, wavering, and cooperation—simultaneously exist in the scene. Then, based on the current situation theme information, the initial positions of each character are dynamically adjusted to form a dynamic position distribution highly related to the situation. Next, the interaction process is divided into multiple consecutive decision-making stages. In each decision-making stage, based on the dynamic position distribution, the candidate option set corresponding to the current situation theme and the current decision-making stage is filtered according to equilibrium constraints and diversification constraints to generate a list of available options for each decision-making stage, and a scene for user interaction is generated. Based on the above solution, the beneficial effects achieved by this application include:
[0092] Third, this application explicitly embeds equilibrium constraints into the option selection process, using the expected feedback contribution value of each candidate option as a quantifiable equilibrium indicator and strictly limiting its dispersion to a preset equilibrium range. This eliminates extreme distributions where options are biased towards pleasing the majority of characters or opposing the majority of characters, from the generation mechanism level. Since the expected feedback contribution value is calculated based on a dynamic position distribution, it comprehensively measures the overall expected impact of a certain option on high-conflict, swing, and cooperative factions in the current context. Therefore, the option list selected with dispersion constraints can ensure that each option has a reasonable range of differences in expected feedback results. It will not lead to highly homogeneous feedback results and loss of decision-making distinction due to excessively small differences, nor will it lead to extreme phenomena such as artificially high or low feedback due to excessively large differences. This ensures that the challenge difficulty and feedback fairness of each interaction scenario remain stable, and transforms the player's experience benchmark from relying on random luck to a direct mapping of their decision-making ability.
[0093] Fourth, this application introduces diversity constraints as parallel conditions into the option selection process, ensuring that the final generated combinations of available options cover differentiated interaction paradigms in terms of strategy type. This transforms the trade-off between equilibrium and diversity from a mutually exclusive single-objective problem into a collaborative selection problem with dual constraints. The equilibrium constraint acts on the feedback result dimension of the options, ensuring a reasonable distribution of expected feedback for each option; the diversity constraint acts on the strategy semantic dimension of the options, ensuring sufficient differentiation in the interactive strategies available to the player. These two constraints act on different dimensions, complementing and not canceling each other out. In the resulting interactive scenario, the player faces a set of diverse options with varying strategy directions but a balanced distribution of expected feedback. This avoids both strategy gaps caused by convergent feedback and misjudgments of abilities due to extreme feedback, significantly enhancing the strategic depth and playability of multi-role interaction scenarios.
[0094] In some embodiments of this application, the process of filtering the set of candidate options corresponding to the current situation theme and the current decision stage based on the dynamic position distribution and according to equilibrium constraints and diversity constraints in step S3 to generate a list of available options for each decision stage is described. Specifically, it may include:
[0095] Step S31: Obtain a set of candidate options corresponding to the current situation theme and the current decision-making stage from the preset option pool;
[0096] Step S32: Based on the dynamic position distribution and the preset tendency representation of each candidate option, calculate the expected feedback contribution value of each candidate option, and filter the candidate option set according to the equilibrium constraint so that the dispersion of the expected feedback contribution value of each candidate option in the filtered candidate option set is within the preset equilibrium interval.
[0097] Step S33: Filter the candidate option set according to the diversity constraint, so that the candidate option combination obtained after filtering contains at least one option of different strategy type;
[0098] Step S34: Determine the options that simultaneously satisfy the equilibrium constraint and the diversification constraint as available options in the decision-making stage, forming a list of available options.
[0099] Specifically, by transforming the abstract dual constraints into an executable, step-by-step filtering mechanism, the final options presented to the user are ensured to have both balanced coverage in terms of position distribution and rich diversity in terms of strategy types, thereby supporting an interactive experience with deep narrative tension.
[0100] The system pre-builds and maintains a structured option pool, which stores a large number of preset option entries covering different context themes and interaction stage types. Each option entry is pre-associated with its applicable context theme tag, applicable decision stage type tag, its own tendency representation vector, and strategy type identifier. When the interaction process progresses to a specific decision stage, the system initiates a joint query to the option pool based on the currently loaded context theme information and the type of the current decision stage, retrieving all options that simultaneously match the context theme and the decision stage type. These are used as the initial candidate option set for this round of filtering. This candidate option set serves as the raw material for filtering and may be quite large, containing multiple possible interaction paths, providing ample selection space for subsequent balanced and diversified filtering.
[0101] After obtaining the set of candidate options, the system enters the first level of screening. Each candidate option carries a preset tendency representation, which can be in the form of a multi-dimensional vector. This tendency representation describes the directional impact of the option on the interacting parties in the position space, such as tending to intensify the conflict between opposing camps, tending to pull wavering characters towards a specific camp, or tending to consolidate the tightness of existing cooperative relationships. The system matches and calculates the preset tendency representation of each candidate option with the current dynamic position distribution, quantitatively assessing the degree of disturbance that the option might cause to the current position pattern if selected and executed by the user, and derives an expected feedback contribution value. This expected feedback contribution value reflects the "position impact direction" and "impact strength" of the option. In a multi-party debate scenario, the expected feedback contribution value can characterize the extent to which a statement, while refuting the opponent's argument, can shake the attitude of a neutral judge. After obtaining the expected feedback contribution values of all candidate options, the system performs screening based on equilibrium constraints. The equilibrium constraint does not require that the contribution values of each option be absolutely averaged, but rather that their values exhibit sufficient dispersion in the direction of influence of the stance. That is, they should not be overly concentrated in a single stance orientation, and this dispersion must fall within a preset equilibrium range. If the expected feedback contribution values of the initial candidate option set are too concentrated—for example, all high-rated options lead to strengthening one's own camp while lacking options that compromise with the other side or seek consensus—the system will trigger a resampling or supplementation mechanism. This involves introducing options with different contribution values from the eliminated candidates as needed, or adjusting the screening threshold, until the option set achieves a reasonable breadth of coverage in the direction of influence of the stance. In this way, the candidate option set filtered by the equilibrium constraint ensures that users face options covering multiple narrative influence directions such as offense, defense, compromise, and cooperation when making decisions, preventing the plot path from being locked too early.
[0102] After completing the equilibrium constraint screening, the system enters the second layer of screening, which further simplifies and guarantees the type of cooperation in the candidate option set based on the diversity constraint. Each candidate option in the option pool is labeled with a strategy type, which is used to classify the options in terms of expression and action logic. These strategies may include, but are not limited to, persuasion, pressure, inducement, misleading, alliance, division, and compromise. The core requirement of the diversity constraint is that the final available option combinations must cover multiple different strategy types, and usually, at least one representative option of each type is retained. In multi-party debate scenarios, strategy types can be further subdivided into logical argumentation, emotional resonance, authoritative citation, moral questioning, and humorous resolution, etc. This constraint ensures that players' debate strategy choices are not limited to a single style of argumentation. In diplomatic mediation scenarios, strategy types can be divided into public commitment, private transaction, multilateral coordination, and cultural appeal, etc. This constraint ensures that players can choose a hardline approach or try soft mediation or exchange of interests when facing diplomatic deadlock. In scenarios involving persuasion and collaboration within role relationships, strategy types can include empathic persuasion, interest-based persuasion, moral persuasion, provocation, and authority suppression. The implementation of diverse constraints can be achieved through type counting checks: the system iterates through the current set of candidate options, counting the number of strategy types present. If certain essential types are missing, typical options of that type are added from previous candidates or the option pool. If a type is overly redundant, only a small number of options with the best expected feedback contribution value under that type are retained. This constraint effectively prevents homogenization of available options in terms of interaction style, giving users narrative freedom to employ different tactics and approaches at different decision-making stages.
[0103] After the aforementioned balanced and diversified constraint screening, the remaining candidate options are considered qualified options that simultaneously satisfy both constraints. The system integrates these options to generate a list of available options corresponding to the final decision-making stage. The options in this list are reasonably distributed in terms of positional influence, avoiding excessive concentration on any single orientation, thus ensuring the openness and uncertainty of the narrative development. Simultaneously, these options are rich and diverse in terms of strategy type, avoiding a monotonous decision-making experience due to repetitive options. In specific interactive scenarios, this list of available options is passed to the user interface layer for rendering. For example, in a debate game interface, it appears as several debate strategy buttons with different styles; in a diplomacy interface, it appears as different types of action command cards; and in a persuasion scenario, it may appear as dialogue options with different tones and entry points. Thus, through a hierarchical and quantifiable screening logic, the system provides users with a set of available options that possess both narrative tension and strategic depth at each decision-making stage, effectively supporting complex multi-party interactions, factional games, and relationship evolution in the game experience.
[0104] Optionally, the preset tendency representation includes the preset tendency vector of each candidate option, and the dynamic stance distribution includes the dynamic stance vector of each virtual character.
[0105] Step S32, calculating the expected feedback contribution value of each candidate option based on the dynamic position distribution and the preset tendency representation of each candidate option, may include:
[0106] Step S321: Obtain the preset tendency vector of each candidate option, wherein the preset tendency vector is used to characterize the degree of bias of the corresponding candidate option towards different stance directions;
[0107] Step S322: For each candidate option, calculate the similarity between the preset tendency vector and the dynamic stance vector of each virtual character;
[0108] Step S323: The similarity is weighted and summed using the preset influence weight of each virtual character to obtain the expected feedback contribution value of the candidate option.
[0109] Specifically, this application provides a vector-based quantitative implementation method for calculating the expected feedback contribution value in step S32. In this implementation, the preset tendency representation is concretized into preset tendency vectors for each candidate option, and the dynamic stance distribution is concretized into dynamic stance vectors for each virtual character, thereby transforming the abstract stance matching process into a computable vector similarity analysis.
[0110] For each candidate option retrieved from the option pool, the system reads its pre-configured preset bias vector. This preset bias vector is a multi-dimensional sequence of representation values, with each dimension corresponding to different stance directions or camp anchors in the stance space. The magnitude and sign polarity of the value in each dimension of the vector collectively characterize the stance bias inherent in the candidate option itself. For example, in a multi-party debate context, the preset bias vector of a debate rhetoric option might have a high positive value in the "radical breakthrough" dimension, a negative value in the "traditional order" dimension, and a value close to zero in the "neutral technology" dimension, indicating that the option strongly supports breakthroughs, opposes conservatism, and is not very concerned about technological neutrality. In a camp-based diplomatic negotiation scenario, a diplomatic option that "proposes a military alliance" will have a preset bias vector that shows a very strong positive correlation and a negative correlation in the "dominant camp alliance" and "checks and balances camp alliance" dimensions, respectively, while possibly exhibiting a moderate negative bias in the "non-aligned autonomy" dimension. By pre-setting a tendency vector, each candidate option naturally carries the direction of its potential impact on the stance, laying a data foundation for subsequent quantitative assessment of its potential disturbance to the stance of the role group.
[0111] Step S322: For each candidate option, calculate the similarity between the preset tendency vector and the dynamic stance vector of each virtual character.
[0112] After obtaining the preset tendency vectors of the candidate options, the system calculates the similarity between each vector and the dynamic stance vectors of each virtual character in the current interaction scenario. Each virtual character's dynamic stance vector is a multi-dimensional representation obtained in step S2, reflecting the character's immediate stance tendency in the current context. Its dimensional definition shares the same stance space as the preset tendency vectors. The similarity calculation essentially measures the directional consistency and strength of the candidate option's stance bias with that of a specific character. If the two vectors are highly aligned, the similarity is a large positive value, indicating that the option is highly compatible with the character's stance and may receive a positive response. If the two vectors are diametrically opposed, the similarity is negative, indicating that the option may encounter strong resistance or opposition from the character. If the two vectors are nearly orthogonal, the similarity is close to zero, indicating that the option has a weak impact on the character's stance, and the character's reaction may be neutral. In multi-party debate scenarios, similarity calculations can reflect the degree to which a particular argument aligns with or deviates from the respective position vectors of the debate opponent, teammates, and referees. In diplomatic mediation scenarios, it can quantify the degree to which a diplomatic proposal matches the position vectors of the dominant camp, the balancing camp, and the swing camp. By performing this calculation on a role-by-role basis, the system obtains an individual impact assessment of each candidate option for each virtual role.
[0113] After calculating the similarity of candidate options relative to all virtual characters, the system retrieves the preset influence weights corresponding to each virtual character and performs a weighted summation to comprehensively derive the expected feedback contribution value of the candidate option. The preset influence weight is a scalar coefficient assigned to each virtual character, representing the character's importance or influence in the overall plot progression and evolution of the stance. For example, in a multi-party debate game, the core character as the head judge may be given the highest weight because their attitude change directly determines the outcome, while the weight of ordinary spectators is relatively low; in factional diplomacy, the dominant large faction has a higher influence weight, while the balancing small faction has a lower weight; in a persuasion scenario involving character relationships, the target character being persuaded usually has the highest weight, while the supporting spectators have a lower weight. The weighted summation process is essentially an integration of the similarity of each character using influence weighting: when a candidate option is highly consistent with the stance of a high-weight character, its weighted expected feedback contribution value will be significantly amplified, indicating that the option may have a significant positive driving effect; conversely, if it contradicts the stance of a high-weight character, it may have a significant negative effect. The final expected feedback contribution value is a metric that comprehensively reflects the intensity and direction of the overall positional disturbance expected to be caused by the candidate options under the current dynamic positional distribution. This value is then input into the equilibrium constraint filtering logic to determine whether the positional influence coverage of the option set is sufficiently discrete and balanced, thereby supporting the equilibrium constraint-based filtering operation described in step S32. Through the above sub-steps, the system organically integrates options, role positions, and role importance, so that the expected feedback contribution value not only reflects the objective attributes of the options but also fully incorporates the dynamic role relationships and power structure in the current context. This ensures that the subsequently filtered list of available options can accurately serve the in-depth experience needs of complex interactive scenarios such as multi-party debates, camp diplomacy, and role relationship persuasion and collaboration while maintaining narrative balance.
[0114] Furthermore, the process of filtering the candidate option set according to the equilibrium constraint includes:
[0115] Calculate the dispersion index of the expected feedback contribution value of each candidate option in the candidate option set;
[0116] If the dispersion index exceeds the preset equilibrium range, then remove some candidate options from the candidate option set, including those with the highest or lowest expected feedback contribution values, and return to recalculate the dispersion index until the dispersion index falls within the preset equilibrium range.
[0117] Specifically, the iterative screening mechanism based on the dispersion index continuously monitors the degree of concentration of the candidate option set in terms of position influence dimension and dynamically removes extreme options that cause distribution imbalance. Ultimately, the expected feedback contribution value distribution of the remaining options returns to a preset reasonable range, thereby ensuring that the options faced by users in the decision-making stage have sufficient position coverage.
[0118] The system first performs an overall analysis of the candidate option set obtained after calculations in steps S322 and S323, calculating the dispersion index of the expected feedback contribution value of each candidate option. The dispersion index is a statistical measure used to quantify the degree of dispersion or concentration of a set of numerical distributions, reflecting the diversity of the current candidate option set in terms of the direction and strength of its positional influence. A low dispersion index means that the expected feedback contribution values of most candidate options are similar, and the positional orientation of the options tends to be similar. If presented directly to the user in this case, it will lead to homogenization of the narrative path, failing to effectively support strategic game-playing in multi-party debates or multi-directional probing in diplomatic mediation. A high dispersion index means that there are significant differences in the positional influence among the candidate options, and the option set can cover multiple narrative directions, from intensifying conflict to promoting reconciliation. The preset equilibrium interval is a threshold range pre-defined by the designer based on the game's balance requirements. The lower limit of this interval ensures that the option set is not too homogeneous, while the upper limit prevents excessively extreme differentiation within the option set, which could disrupt narrative stability.
[0119] After calculating the dispersion index of the current candidate option set, the system compares it with a preset equilibrium interval. If the dispersion index is within the preset equilibrium interval, it indicates that the current candidate option set has reached an equilibrium state in terms of the distribution of positional influence, requiring no additional processing and proceeding directly to the subsequent diversification constraint screening stage. If the dispersion index is below the lower limit of the preset equilibrium interval, it indicates that the positional influence of the option set is too concentrated, lacking sufficient positional divergence. In this case, the system will initiate an option elimination and re-evaluation process: sorting the options in the candidate option set according to their expected feedback contribution values, identifying the options corresponding to the region with the most concentrated expected feedback contribution values, and removing some options that exacerbate homogenization from this set. Typically, priority is given to removing intermediate options that are too close to the mean and are too numerous, or, depending on the specific imbalance, removing some candidate options that are too densely clustered on the side with the highest or lowest expected feedback contribution values. After removal, the composition of the candidate option set changes, and the system recalculates the updated dispersion index and compares it with the preset equilibrium interval again. If the requirements are still not met, the elimination and recalculation cycle continues until the dispersion index falls within the preset equilibrium interval. This iterative process logically ensures that the remaining options form a reasonable gradient distribution in terms of their impact on the position, so that not all options lead to the same type of consequence, nor does it result in a situation where there are only extreme options and no intermediate transitional options.
[0120] Through the iterative equilibrium screening based on the dispersion index, in multi-party debate scenarios, this mechanism effectively prevents all available options at a certain decision-making stage from leaning entirely towards aggressive attacks or passive defense. Instead, it ensures the coexistence of options with different stances, such as aggressive rebuttals, constructive proposals, and conciliatory statements calling for consensus. In diplomatic mediation scenarios, it avoids limiting players' diplomatic choices to a hardline stance or unconditional concessions, ensuring the simultaneous existence of action paths oriented by multiple stances, including strong pressure, exchange of interests, third-party mediation, and delaying tactics. This mechanism provides a reasonably distributed candidate basis in terms of stance for the intervention of diverse constraints in subsequent steps, and works in conjunction with these diverse constraints to ultimately generate a list of available options with rich strategic significance and narrative tension.
[0121] In some embodiments of this application, the different strategy types may further include a first strategy type, a second strategy type, and a third strategy type;
[0122] Based on this, step S33, which filters the candidate option set according to the diversity constraints, may include:
[0123] Step S331: Using a pre-trained strategy classification model, identify the strategy type of each candidate option and label each candidate option with a type label. The type label includes a first strategy type, a second strategy type, and a third strategy type. The first strategy type option is the option whose similarity between the preset tendency vector and the mainstream direction vector of the current dynamic position distribution is higher than a first similarity threshold. The second strategy type option is the option whose similarity is between the first similarity threshold and the second similarity threshold. The third strategy type option is the option whose similarity is lower than the second similarity threshold.
[0124] Step S332: When generating the list of available options, perform a set coverage check to verify whether the selected set of options contains options with all three types of labels;
[0125] Step S333: If the options do not include all three types of labels, then the option replacement operation is triggered, replacing some of the selected options with the missing type options, until the selected option set covers the first strategy type, the second strategy type, and the third strategy type options.
[0126] Specifically, different strategy types are further refined into three categories: the first strategy type, the second strategy type, and the third strategy type. These three categories are not based on fixed option description templates, but are dynamically defined according to the degree to which the stance of the candidate options aligns with the mainstream trend in the current dynamic stance landscape. This dynamic classification method deepens the connotation of diversified constraints from simple differences in action patterns to a requirement covering the degree of conformity or opposition to a stance. Thus, in scenarios such as multi-party debates, camp diplomacy, and persuasion of role relationships, users can choose between different strategic orientations such as going with the flow, gentle probing, and challenging the trend, enhancing the sense of hierarchy and authenticity of interactive decision-making.
[0127] To automatically categorize candidate options into the three strategy types mentioned above, the system invokes a pre-trained strategy classification model. This model uses the mainstream direction vector of the current dynamic position distribution as the classification benchmark. The mainstream direction vector is a comprehensive tendency vector obtained by weighting and integrating the dynamic position vectors of all virtual characters in the scene. It represents the overall positional inclination of the character group in the current context. For example, in multi-party debates, it can reflect the core argument favored by the majority of judges and audience; in diplomatic mediation, it can reflect the dominant camp's position in the current situation; and in character persuasion, it can reflect the initial inclination of the target character and their supporters. During classification, the strategy classification model reads the preset tendency vector for each candidate option and calculates the similarity between this vector and the mainstream direction vector. If the calculated similarity is higher than a first similarity threshold, it indicates that the option's positional bias is highly consistent with the mainstream trend, belonging to options that conform to the general trend and cater to the expectations of the majority, and will be labeled as the first strategy type. If the similarity falls between the first and second similarity thresholds, it indicates that the option's stance partially overlaps with the mainstream trend but also deviates to some extent, representing a moderate correction or limited compromise, and will be labeled as the second strategy type. If the similarity is below the second similarity threshold, or even shows a negative correlation, it indicates that the option's stance significantly contradicts or opposes the mainstream trend, representing a counter-trend challenge or alternative approach, and will be labeled as the third strategy type. Through this classification mechanism based on dynamic stance comparison, each option in the candidate option set receives a type label reflecting the degree of its strategic orientation as radical or conservative, and this label is automatically updated as the context theme changes and the dynamic stance distribution evolves, ensuring that the strategy type classification always remains context-relevant.
[0128] After obtaining a preliminary subset of options through equilibrium constraint filtering, the system performs set coverage detection before constructing the final list of available options. This detection operation examines the type labels carried by each option set to be output, counting whether options of the first, second, and third strategy types exist simultaneously. The purpose of set coverage detection is to ensure that the final available options achieve full coverage in terms of "positional gradients," avoiding a reduction in decision-making dimensions due to the absence of a certain strategy type. For example, in the free offensive and defensive phase of multi-party debate, if the detection finds that the current option set only contains options that strengthen the argument in line with the mainstream position (first strategy type) and a few moderate compromise options (second strategy type), while completely lacking options that refute or challenge the mainstream view (third strategy type), then the coverage detection is deemed to have failed. In the scenario of camp diplomacy and mediation, if the option set at a certain decision stage lacks a counterbalancing camp strategy option that contradicts the mainstream dominant camp's position, it is also considered to have incomplete coverage. This detection mechanism serves as a rigid constraint, mandating that users have the right to choose between three strategic directions—compliance, reconciliation, and opposition—at each decision-making node, thereby ensuring the freedom of interaction and the richness of the narrative path.
[0129] When the set coverage check finds that the current option set fails to cover all three strategy types, the system automatically triggers an option replacement operation. The replacement operation first identifies the missing strategy type, then retrieves options belonging to the missing type and whose expected feedback contribution value meets the current equilibrium requirements from the options previously removed by the equilibrium constraint screening but still in the candidate option pool as replacement candidates. Subsequently, redundant options that need to be replaced are determined from the selected option set. Typically, the system prioritizes options with duplicate types and minimal contribution to the equilibrium dispersion as replacement targets. For example, if the set already has two options of the first strategy type and the third strategy type is missing, the system will remove the first strategy type option whose expected feedback contribution value is closest to the mean and whose removal would have the least impact on the overall distribution dispersion, and add a qualified third strategy type option. The replacement process can be completed in a single step or may require multiple iterations. After each replacement, the equilibrium constraint verification and coverage check are performed again until the selected option set simultaneously meets the dual conditions of dispersion within the equilibrium interval and coverage of all three strategy type labels. In multi-party debates, this mechanism ensures that players can choose not only to align with the mainstream view to solidify their advantage, but also to win over swing voters through moderate compromises, or even launch a fierce attack on the opposing camp to create a breakthrough. In diplomatic maneuvering, players can freely switch between strategies such as following consensus, maneuvering between different camps, or openly challenging the actions of the dominant camp, making each decision feel weighty and having consequences. Through this substitution and completion mechanism, the final list of available options not only has a balanced distribution in terms of positional influence but also achieves comprehensive coverage of both favorable and unfavorable strategic orientations.
[0130] Furthermore, considering that under certain special contexts or when the dynamic position distribution exhibits a highly homogenized mainstream tendency, the pre-set option pool may naturally lack alternatives that significantly deviate from the mainstream position direction, i.e., there are no options that satisfy the third strategy type condition. This will cause the replacement operation in step S333 to fail due to the lack of a matching source, thus preventing the fulfillment of the coverage requirement for the third strategy type in the diversification constraints. To ensure that users can obtain a complete decision space containing multiple strategy orientations (forward and reverse) in any context, a dynamic option compensation mechanism based on a generative model can be added to the system, specifically:
[0131] When there are no options in the preset option pool that meet the conditions of the third strategy type, the generative model is used to generate variant options with a deviation greater than a preset deviation threshold from the mainstream direction vector, based on the current context theme and the dynamic position distribution. The generated variant options are then labeled as the third strategy type and added to the candidate option set.
[0132] Specifically, if a third strategy type option is found to be missing, and further backtracking confirms that there are indeed no candidate options in the pre-set option pool that can be labeled as this type, the system determines to enter the option compensation generation process. The system calls a pre-deployed generation model, which can be the training result based on a large-scale language model or a controllable text generation architecture, and has the ability to produce expressions that conform to the interactive context according to given conditions and constraints. The generation model receives two sets of core condition inputs: the first is the current context theme information, including issue description, emotional tone, and key event elements, to ensure that the generated content is highly consistent with the current narrative context; the second is the current dynamic position distribution information, especially the mainstream direction vector extracted from this distribution, as a reference benchmark for generating deviation content. Under these conditions, the generation model performs constraint generation. The core constraint is that the deviation between the preset tendency vector of the generated option and the mainstream direction vector must be greater than the preset deviation threshold. The deviation can be an inverse measure of similarity or a direct indicator such as the vector angle. The deviation threshold is set according to historical data or design specifications as an empirical value sufficient to ensure that the option's position has obvious reverse characteristics. In specific generation scenarios, in multi-party debates, if the mainstream position strongly favors a particular policy, the generation model will create rebuttal options that challenge the core logic of the policy, reveal its potential risks, or propose disruptive alternatives. In diplomatic mediation scenarios, if the mainstream direction tends towards compromise and reconciliation, the generation model can produce a hardline option that demands adherence to principles, public condemnation of the other party's behavior, or calls for the formation of an adversarial alliance. In role-playing persuasion scenarios, if the person being persuaded and the surrounding characters generally tend to refuse cooperation, the generation model can generate an alternative persuasion method that uses reverse psychology strategies such as provocation or moral questioning.
[0133] After generation, the system encapsulates and annotates the generated variant options. It then generates a corresponding preset tendency vector for each variant option. This vector can be directly mapped from the hidden representation of the generative model or determined by inverse reasoning based on the deviation constraints applied during generation. The system explicitly labels the option's strategy type as the third strategy type. Subsequently, the variant option is formally added to the current candidate option set, enabling it to participate in subsequent set coverage checks and the construction of the available option list. With this option compensation mechanism, the system possesses the ability to autonomously generate options that meet diverse constraints when facing extreme situations with insufficient option pool coverage. It is no longer limited by the completeness of the pre-built resource library, thus consistently providing users with challenging strategies for turning the tide in multi-party debates, offering strong choices against the dominant camp in diplomatic negotiations, and opening up atypical persuasion paths to break through deadlocks in role-playing persuasion. This significantly improves the robustness and narrative adaptability of the interactive system.
[0134] In some embodiments of this application, the process of step S1, obtaining multiple virtual characters and configuring initial position parameters for the multiple virtual characters according to a preset faction tension structure, is described, and may specifically include:
[0135] Step S11: Obtain the preset faction tension structure, wherein the faction tension structure stipulates that the multiple virtual characters must simultaneously include conflict relationship type, swing relationship type and cooperative relationship type;
[0136] Step S12: Determine the corresponding initial position parameter configuration rules for each relationship type according to the camp tension structure. The initial position parameter configuration rules include: between virtual character groups belonging to the conflict relationship type, the initial position parameter is set to maintain the maximum distance constraint in the preset position space; between virtual character groups belonging to the swing relationship type, the initial position parameter is set to maintain a transition area between the central area and the edge area in the preset position space, and has a random fluctuation range of a preset amplitude; between virtual character groups belonging to the cooperative relationship type, the initial position parameter is set to maintain the minimum distance constraint in the preset position space.
[0137] Step S13: Based on the initial position parameter configuration rules, generate the initial position parameters for the multiple virtual characters respectively.
[0138] Specifically, by transforming the abstract camp tension structure into quantifiable position space distance constraints, and by formulating differentiated parameter generation rules for three relationship types—conflict, vacillation, and cooperation—the initial position configuration of multiple virtual characters can be completed in a structured and reproducible manner.
[0139] The system first reads the preset faction tension structure from the design configuration. This faction tension structure is configured during the game narrative design phase. It specifies, in the form of a rule set, that three basic relationship types must exist simultaneously within a group of virtual characters in a complete interactive narrative: conflict relationship, wavering relationship, and cooperative relationship. Conflict relationships refer to antagonistic relationships between characters due to opposing fundamental goals, values, or interests. Examples include the core debaters on the affirmative and negative sides in a multi-party debate, the dominant and balancing factions in faction diplomacy, and the persuader and persuadee with conflicting positions in a persuasion scenario. Wavering relationships refer to characters in an uncertain state between two or more opposing positions, whose attitudes are easily influenced by the interaction process. Examples include neutral judges in debates, non-aligned factions in diplomatic games, and hesitant observers in persuasion scenarios. Cooperative relationships refer to cooperative relationships between characters due to shared goals or complementary interests. Examples include teammates in debates, representatives of allied factions in diplomatic situations, and assisted persuaders with similar positions in persuasion scenarios. The faction tension structure ensures that the character groups are inherently equipped with structural conflicts that drive the plot, enticeable middle forces, and reliable cooperative foundations from the outset by mandating the necessary existence of these three types of relationships.
[0140] After acquiring the faction tension structure, the system invokes a preset initial position parameter configuration rule set. This rule set sets differentiated position parameter generation constraints for conflict relationship types, wavering relationship types, and cooperative relationship types, all of which are built upon the same preset position space. This preset position space is a multi-dimensional abstract semantic space, where each dimension corresponds to the core issue dimension that affects the determination of a character's position, and the coordinates of points in the space represent specific position combinations.
[0141] For virtual character groups in conflict relationships, the initial position parameter configuration rules require each opposing character to maintain maximum distance constraints within a preset position space. Maximum distance constraints mean setting the position parameters of the conflicting parties at the two or more anchor point regions furthest apart within the preset position space, maximizing the positional differences between the two sides on the core issue dimension. In a multi-party debate scenario, this means that the position parameters of the main debater on the affirmative side are configured in the positive extreme value region of the issue support dimension, while the position parameters of the main debater on the negative side are configured in the negative extreme value region of the same dimension, with no overlap in intermediate positions between them. In a diplomatic mediation scenario, the position parameters of the dominant alliance and the standard-bearer of the balancing alliance are set at the opposing endpoints of the alliance tendency dimension and the management autonomy dimension, respectively, ensuring that both sides are in a tense standoff from the outset.
[0142] For virtual character groups belonging to the swing relationship type, the initial position parameter configuration rules require that the position parameters of such characters be set in the transition area between the central and peripheral areas of the preset position space, and on this basis, a preset range of random fluctuations is assigned. The transition area is located in the middle of the line connecting opposing anchor points, not close to the extreme value areas of either side, making the swing characters ambiguous and two-way malleable at the initial moment. The setting of the random fluctuation range ensures that the initial position parameters of different swing characters, and even multiple instantiations of the same swing character, differ within the transition area, avoiding a situation where all swing characters are uniform. For example, in multi-party debates, multiple judges may be configured in transitional positions that are slightly biased towards the affirmative, slightly biased towards the negative, or completely neutral, and these fine-tuned positions will be different each time at the start of the game due to random fluctuations, increasing the uncertainty of the situation. In diplomatic mediation, non-aligned small camps may show slight economic dependence or slight security demands due to random fluctuations, providing differentiated entry points for subsequent division efforts.
[0143] For virtual character groups belonging to the collaborative relationship type, the initial position parameter configuration rules require that the position parameters of each character within the same group maintain a minimum distance constraint within the preset position space. Minimum distance constraint means that the position parameters of collaborative characters are configured in adjacent or overlapping areas of the space, with a distance much smaller than that in a conflict relationship and less dispersed than that in a wavering relationship. In multi-party debates, the position parameters of debaters within the same team are set in highly proximate positions to ensure their consistency on core arguments. In diplomatic mediation, the position parameters of representatives of allied camps exhibit a tight clustering distribution, reflecting their shared diplomatic attitude. In character persuasion scenarios, the distance between the position parameters of the partner character assisting in persuasion and the current position parameters of the target character can be designed, depending on the needs of the plot, to be slightly larger than the distance between the target character and the persuader, but still within a collaborative proximity range.
[0144] After clarifying the configuration rules corresponding to each relationship type, the system generates specific initial position parameters for each virtual character. The generation process follows a traversal allocation logic: First, it identifies all character groups belonging to the conflict relationship type and determines their respective anchor point regions in the preset position space for each opposing group. Typically, it selects the cluster of extreme points furthest apart diagonally in the space, assigns the conflicting characters to the corresponding anchor points, and then fine-tunes them to suit individual character settings. Second, it identifies all characters belonging to the swing relationship type and samples and allocates them within the transition area according to each character's preset individual characteristics and random fluctuation range, ensuring that each swinging character obtains its own initial position coordinates while maintaining sufficient distance buffer between itself and each extreme anchor point. Finally, it identifies all character groups belonging to the cooperative relationship type and compactly configures the characters within the preset clustering area of each group with a small intra-cluster distance, while ensuring that the spatial relationship between the cooperative group as a whole and its corresponding opposing camp or swinging group conforms to the requirements of the overall camp tension structure. Through the above orderly generation process, all virtual characters obtain initial position parameters with clear geometric relationships and narrative meanings within a unified preset position space. These parameters not only satisfy the simultaneous existence of the three types of relationships: conflict, vacillation, and cooperation, but also provide a precise coordinate basis for subsequent steps such as similarity calculation based on position vectors, dynamic position adjustment, and option balancing and selection.
[0145] Furthermore, the conflict condition is determined based on the position conflict index, the wavering condition is determined based on the position wavering index, and the cooperation condition is determined based on the position cooperation index, wherein:
[0146] The position conflict index is determined by calculating the first distance between the initial position vectors of two virtual characters;
[0147] The position swing index is determined based on the second distance between the position vector of the virtual character and the position of the group center of the virtual character, as well as the historical position change range of the virtual character.
[0148] The positional synergy index is determined based on the historical success rate of cooperation between the two virtual characters and the degree of overlap of the same directional dimensions in the initial positional vector.
[0149] Specifically, corresponding quantitative judgment indices were set for high-conflict conditions, wavering conditions, and cooperative conditions, namely, the position conflict index, the position wavering index, and the position cooperative index. Through geometric measurement based on the initial position vector, time series analysis of character positions, and statistical analysis of historical interaction data between characters, the system can automatically and objectively classify the relationship types of virtual characters, ensuring that the initial position tension structure of the character group strictly meets the preset requirements.
[0150] The conflict conditions are determined based on a position conflict index, which is determined by calculating the first distance between the initial position vectors of two virtual characters. After the virtual characters obtain their respective initial position vectors, the system calculates the vector distance between any two characters in a preset position space, which is defined as the first distance. The first distance can be measured using various spatial distance measurement schemes, and its value directly reflects the degree of disagreement between the two characters on the core issue dimension. When the initial position vectors of the two characters are located in opposing extreme anchor point regions in the position space, the value of the first distance is high, indicating that there is an irreconcilable opposition on their fundamental viewpoints. The system presets a conflict index judgment threshold. If the first distance between a pair of characters meets the preset conflict judgment condition, the pair of characters is judged to meet the conflict condition, and the relationship between them is marked as a conflict relationship type. In multi-party debates, the core debaters on the affirmative and negative sides typically exhibit the largest initial distance between their position vectors, leading the system to automatically identify them as a high-conflict group. Similarly, in diplomatic negotiations, the position vectors of representatives from the dominant alliance and the balancing alliance, positioned at opposing anchor points, also receive a high conflict index, thus falling under the category of conflict. By determining the position conflict index based on initial distance, the system can accurately identify naturally antagonistic character combinations from a large pool of virtual characters without human intervention.
[0151] The swing condition is determined based on the position swing index, which is calculated according to the second distance between the virtual character's position vector and the central position of the virtual character group, as well as the historical position change amplitude of the virtual character. The determination of the swing condition comprehensively considers spatial location factors and temporal dynamic factors. The second distance measures the degree of deviation between a virtual character's current position vector and the central position of the group. The central position of the group is a comprehensive reference point obtained by aggregating the position vectors of all virtual characters, representing the average position tendency of the character group. If a character's position vector has a moderate second distance from the central position of the group—neither in an extreme region like conflict characters nor closely aligned with a specific anchor point like cooperative characters—then the character has the potential to swing spatially. Simultaneously, the system also examines the historical position change amplitude of the character. This historical position change amplitude can be obtained by recording the trajectory of the character's position vector changes in past interaction rounds or historical situations, reflecting the stability and variability of the character's position. If a character's position is not only located in a transitional region but also has a relatively large historical position change amplitude, it indicates that the character is easily influenced by external factors and will change its attitude; therefore, its position swing index will be at a high level. The system identifies roles whose positional vacillation index meets preset vacillation criteria as vacillating roles. In multi-party debates, judges who neither firmly support the affirmative nor the negative side, and whose views have fluctuated in previous debates, are automatically marked as vacillating roles due to their high positional vacillation index. In diplomatic mediation, representatives of smaller camps who repeatedly adjust their positions between major camps and lack a consistent diplomatic approach are also identified as vacillating roles due to the combined effect of spatial location and historical fluctuation indicators. This dynamic and static assessment method ensures that the identification of vacillating roles considers both the objective position of their current stance and the volatile characteristics exhibited in their behavioral patterns.
[0152] The collaboration conditions are determined based on a positional collaboration index, which is calculated according to the historical success rate of cooperation between two virtual characters and the overlap of the same directional dimension in the initial position vector. The determination of collaboration conditions relies on dual evidence: existing cooperation experience between the characters and the essential compatibility of their positions. The historical cooperation success rate is derived from the system's statistical analysis of the frequency with which virtual characters acted together and achieved expected results in historical interaction records. A higher index indicates that the two characters were more likely to support each other and achieve common goals in past situations, possessing a practical basis for forming a collaborative relationship. The overlap of the same directional dimension in the initial position vector assesses the consistency of the two characters' positions on core issues from a semantic space perspective. A higher overlap means that the two characters hold the same or similar views on multiple issue dimensions, possessing a cognitive basis for forming a collaborative relationship. The system fuses the historical cooperation success rate and the overlap of position vectors to obtain the positional collaboration index. When the positional collaboration index between a pair of characters reaches the preset collaboration determination condition, the system determines that the pair of characters meets the collaboration condition, and the relationship between them is marked as a collaboration relationship type. In multi-party debates, characters belonging to the same debate team typically exhibit both a high historical success rate of cooperation and a high degree of vector overlap in the core debate topic dimension, thus obtaining a high synergy index. In factional diplomacy, representatives of allied factions that have maintained a long-term alliance and voted unanimously on major issues are also identified as having a synergy relationship due to the prominent dual indicators. In role-playing persuasion scenarios, supporting characters who have collaborated multiple times in the past and share similar positions are also identified as synergy partners with the main characters through this index. By combining behavioral history with positional semantics, the method of determining the positional synergy index effectively avoids misjudging characters without a basis for cooperation as having a synergy relationship based solely on similar positions, or ignoring fundamental positional differences based solely on accidental cooperation, ensuring the accuracy of synergy relationship determination and narrative rationality.
[0153] It is understandable that, even after strictly following the initial position parameter configuration rules to generate the position parameters of each virtual character, the final generated initial position parameter combination may not perfectly achieve the quantitative relationship standard required by the preset faction tension structure due to random sampling, fine-tuning of individual character settings, and complex spatial arrangement interactions between multiple characters involved in the parameter generation process. For example, the random fluctuations of a wavering character may cause it to move too close to a certain extreme anchor point and lose its wavering characteristics; the anchor point allocation of conflicting characters may fail to form a sufficiently large position divergence due to dimensional overlap; and the close configuration of cooperative characters may fail to achieve the appropriate closeness of the cooperative relationship due to deviations in the initialization algorithm. Therefore, in this application, after generating the initial position parameters of the multiple virtual characters respectively, it may further include:
[0154] Based on the position conflict index, the position swing index, and the position coordination index, the generated initial position parameters are subjected to a camp tension verification. The verification items for the camp tension verification include verifying whether the position conflict index between virtual character groups with conflict relationship type is greater than a preset conflict threshold, whether the position swing index between virtual character groups with swing relationship type is within a preset swing range, and whether the position coordination index between virtual character groups with coordination relationship type is greater than a preset coordination threshold.
[0155] If any verification item fails, the initial stance parameters of the corresponding virtual character will be adjusted until all verification items pass.
[0156] Specifically, the alignment tension verification step takes the initial stance parameters of each virtual character output in step S13 as input and calls the aforementioned stance conflict index, stance wavering index, and stance coordination index as quantitative verification tools. The verification process includes three parallel verification items, corresponding to the minimum quality standards for conflict relationship type, wavering relationship type, and coordination relationship type, respectively.
[0157] The first verification item targets conflict relationship types, verifying whether the position conflict index between virtual role groups assigned to conflict relationship types exceeds a preset conflict threshold. The system extracts all role pairings marked as conflict relationships in the role relationship configuration, calculates the first distance between their initial position vectors, and obtains their respective position conflict indexes. If the position conflict index of any conflict role pairing fails to reach the preset conflict threshold, it indicates that although the pairing is characterized as opposing in the relationship design, it has not created sufficient distance in the actual position space, which may lead to insufficient conflict tension in subsequent interactions. The two sides are prone to illogical reconciliation trends due to unexpectedly close positions. In multi-party debate scenarios, this may manifest as the positions of the core debaters on both sides being too close, making the debate lose its adversarial nature; in diplomatic mediation scenarios, it may manifest as the positional differences between the representatives of the dominant camp and the balancing camp not being sharp enough, weakening the tension of diplomatic games.
[0158] The second verification item targets the wavering relationship type, verifying whether the position wavering index of virtual role groups assigned to the wavering relationship type falls within a preset wavering range. The preset wavering range is defined by a lower threshold and an upper threshold. The lower threshold ensures that wavering roles do not become too firm in their positions and lose their malleability, while the upper threshold prevents their positions from becoming too volatile and losing behavioral consistency. For each virtual role marked as having a wavering relationship, the system calculates the second distance between its position vector and the group's central position, and combines this with the historical magnitude of position changes to derive a position wavering index. If a wavering role's index is below the lower limit of the range, it indicates that its position is too rigid and lacks the necessary appeal; in multi-party debates, such roles will not change their attitude due to any arguments, losing their narrative value as a potential ally. If the index is above the upper limit of the range, it indicates that its position is extremely unstable, and its behavior may appear capricious and unreliable, manifesting as an unreliable ally who changes their mind frequently in diplomatic negotiations.
[0159] The third verification item targets the type of collaborative relationship, verifying whether the positional synergy index between virtual character groups assigned to a collaborative relationship exceeds a preset synergy threshold. The system extracts all character pairings marked as collaborative relationships, comprehensively calculates the overlap between their historical cooperation success rates and the same directional dimension of their initial position vectors, and derives the positional synergy index. If the positional synergy index of any collaborative pairing fails to exceed the preset synergy threshold, it indicates that although the pairing is designed as allies, there is a significant difference in their fundamental positions, or a lack of sufficient historical cooperation experience to support it, which may lead to unreasonable scenarios such as collaborative allies turning against each other or improper cooperation in subsequent interactions.
[0160] If any one or more of the above three verification items fail, the system triggers an adjustment process. The adjustment process employs a targeted correction strategy: for pairings with insufficient conflict indices, the system progressively shifts the initial position parameters of the paired characters in a direction away from each other, increasing their initial distance; for characters whose swing indices exceed the range, the system reverts their position parameters to the transition zone and limits their random fluctuations, or resets the reference baseline for their historical position change range; for pairings with insufficient synergy indices, the system fine-tunes the position parameters of both characters in a direction closer to each other, increasing their vector overlap, and, if necessary, generates a cooperative history record that matches the characters' backgrounds to improve the historical cooperation success rate. After each adjustment, the system recalculates the affected indices and re-executes all three verifications. This iterative process continues until all verification items are deemed to have passed.
[0161] By adding the aforementioned alignment tension verification and iterative correction steps, the system achieves closed-loop quality control of the character relationship structure during the initial stance parameter generation stage. This mechanism effectively avoids the problem of misrepresented character relationship types due to initialization randomness or algorithmic bias, ensuring that in various scenarios such as multi-party debates, alignment diplomacy, and character relationship persuasion and cooperation, conflicting characters truly constitute a head-on confrontation, wavering characters genuinely possess the flexibility to navigate between conflicting interests, and cooperating characters stably present a reliable alliance foundation. This provides a solid guarantee for the narrative logic rigor and playability of the entire interactive system.
[0162] In some embodiments of this application, the process of adjusting the initial stance parameters of each virtual character based on the current context theme information in step S2 to obtain the dynamic stance distribution of each virtual character under the current context theme is described, which may specifically include:
[0163] Step S21: Extract key elements from the current context topic information, map the key elements to a high-dimensional semantic space, and obtain a context semantic vector;
[0164] Step S22: For each virtual character, the contextual semantic vector is fused with the initial stance parameters of the virtual character to generate a differentiated perturbation vector corresponding to the virtual character, wherein the differentiated perturbation vectors corresponding to different virtual characters differ in at least one dimension of direction and amplitude.
[0165] Step S23: Superimpose the differentiated perturbation vectors onto the initial position parameters of each virtual character to obtain the dynamic position distribution.
[0166] Specifically, by extracting the semantic connotation of the situation theme into a high-dimensional vector, and using this vector to generate personalized stance perturbations for each virtual character, a smooth transition from a static initial stance to a dynamic situational stance is achieved. This allows the character's stance when facing specific issues to be rooted in its initial setting while also possessing a sensitive response to the situation.
[0167] The system first performs semantic analysis on the current context's thematic information. This information typically describes the background, core conflicts, and key events of the current plot stage in natural language. The system then invokes a pre-built semantic extraction module to identify and extract key elements with positional influence from this thematic information. These key elements may include core vocabulary related to the issue, event type tags, emotional tone, and stakeholder indicators. Subsequently, the system uses a pre-trained high-dimensional semantic mapping model to map these discrete key elements to a high-dimensional semantic space that shares a dimensional definition with or can establish a mapping relationship with a pre-defined positional space, generating a contextual semantic vector that comprehensively represents the semantic connotation of the current context. This contextual semantic vector encodes the inherent positional influence direction of the current context. In multi-party debate scenarios, the contextual semantic vector can capture the degree of emphasis the current debate topic places on different value dimensions; in diplomatic mediation scenarios, it can represent the differentiated pressure exerted by current inter-camp events on dimensions such as management, security, and the economy. The acquisition of the contextual semantic vector provides a unified semantic benchmark for subsequently generating positional perturbations for each virtual character that conform to the contextual logic.
[0168] After obtaining the contextual semantic vector, the system fuses it with the initial stance parameters of each virtual character to generate a unique, differentiated perturbation vector for each character. This fusion process does not simply copy and apply the same contextual semantic vector to all characters; instead, it fully considers individualized factors such as each virtual character's initial stance position, the character's preset stance elasticity coefficient, and the preset correlation strength between the character and key elements of the context. Specifically, the fusion mechanism may include: for virtual characters whose initial stance parameters and contextual semantic vectors are relatively consistent in direction, the generated perturbation vector remains oriented accordingly, but the amplitude may vary depending on their stance elasticity coefficient, resulting in smaller perturbation amplitudes for those with firm core beliefs and larger perturbation amplitudes for those more easily influenced; for characters whose initial stance parameters and contextual semantic vectors deviate in direction, the perturbation vector may exhibit a corrective shift in some dimensions rather than being entirely influenced by the context; for characters whose character settings have a special connection to the current contextual issue—for example, in a multi-party debate, a debater's area of expertise happens to be the core of the current debate topic—the amplitude of their perturbation vector may be amplified to reflect their sensitivity to the issue. Through this personalized fusion process, the differentiated perturbation vectors obtained by different virtual characters may exhibit various forms in terms of perturbation direction, such as conformity, deviation, or even local differentiation. In terms of perturbation amplitude, a gradient distribution is formed according to the different characteristics of the characters. In a factional diplomacy negotiation scenario, when a representative of the dominant faction and a representative of the balancing faction face the same semantic vector of a "resource crisis," the former may generate a perturbation that strengthens the direction of resource control, while the latter may generate a perturbation that strengthens the direction of resistance to resource management; their directions are diametrically opposed. A wavering minority faction may generate a perturbation that shifts towards seeking refuge. In a persuasion scenario involving character relationships, the perturbation vectors obtained by the target persuasion recipient and the assisting persuasion partner may also differ due to their different standpoints, thus simulating the realistic psychological reactions of different characters to the same situation.
[0169] After generating differentiated perturbation vectors for each virtual character, the system performs a vector superposition operation, summing each character's perturbation vector with its initial position parameter dimension by dimension to obtain the character's dynamic position parameter under the current situation theme. The dynamic position parameters of all virtual characters together constitute the dynamic position distribution. Since the perturbation vectors of each character are differentiated in both direction and magnitude, the superimposed dynamic position distribution exhibits rich structural changes: some characters that were originally in the transitional swing zone may shift significantly towards a certain extreme anchor point due to the situation's pull, thus temporarily escaping the swing state in this interaction and becoming a temporary supporter of one side; some conflict characters that were originally in the extreme anchor point zone may experience a slight shift in position due to the harmonizing effect of certain key elements in the situation, but this shift is usually not enough to make them exit the conflict relationship type, only manifesting as a minor adjustment in the intensity of confrontation; within the collaborative character group, slight discrepancies in position clusters may occur due to the differences in the sensitivity of each member to the situation issue, foreshadowing possible internal divisions within the camps later. In multi-party debate scenarios, the superimposed dynamic position distribution can simulate the natural state of debaters having different emphases on specific topics. For example, debaters within the same team may have a consistent overall position, but their preferences for specific argumentation paths may have subtle differences. In diplomatic mediation scenarios, the dynamic position distribution can reflect the slight adjustments made by diplomatic representatives of each camp based on their own camp's interests under specific crises, making the inter-camp structure present a more realistic multipolar situation. Thus, step S2 completes the full transformation from initial position parameters to dynamic position distribution, providing a position data foundation that is deeply bound to the current context and accurately reflects the real-time inclinations of each role for calculating the expected feedback contribution value of options and balancing diversity selection based on the dynamic position distribution in the subsequent step S3.
[0170] Based on this, step S23 may further include:
[0171] Step S231: Obtain the sensitivity coefficient of each virtual character to the context theme;
[0172] Step S232: Adjust the amplitude of the corresponding differential perturbation vector using the sensitivity coefficient of each virtual character;
[0173] Step S233: The amplitude-adjusted differential perturbation vector is weighted and summed with its corresponding initial position parameter to obtain the dynamic position distribution.
[0174] Specifically, step S23 further introduces a refined perturbation adjustment mechanism based on individual character sensitivity differences. This mechanism fully considers that when different virtual characters face the same situational theme, the degree to which their stance is influenced by the situation is not equal, but is closely related to the character's personality traits, background experiences, and the depth of their connection with the situational issue. By assigning differentiated sensitivity coefficients to each character and adjusting and weighting the perturbation vector, the system can generate a more delicate and individualized dynamic stance distribution, thereby further enhancing the realism and strategic depth of the interactive narrative.
[0175] The system pre-sets or dynamically calculates a sensitivity coefficient for each virtual character based on the current situation's topic. This sensitivity coefficient is a scalar parameter characterizing the character's level of attention to and susceptibility to the current situation's issues. The sensitivity coefficient can be derived from a multi-dimensional comprehensive evaluation: firstly, the character's inherent attributes, such as whether their personality tags include traits like "susceptibility," "firm stance," or "situational awareness," which directly influence their tendency to absorb external information; secondly, the depth of the connection between the character's background and the situation's issues, for example, in a multi-party debate, if the current topic involves environmental policy, debaters with relevant work experience or academic backgrounds in environmental protection will be assigned a higher sensitivity coefficient, while those indifferent to this field will have a lower sensitivity coefficient; thirdly, the character's position within the current camp structure, with characters in the swing zone typically assigned a higher baseline sensitivity coefficient to reflect the malleability of their stance, while conflict characters at extreme anchor points have relatively lower sensitivity coefficients to maintain the stability of their core stance. In diplomatic mediation scenarios, representatives from major camps with direct interests in the issue exhibit higher sensitivity coefficients, while representatives from distant camps with weaker ties to the issue show lower sensitivity coefficients. In persuasion scenarios involving role relationships, the degree of personal concern of the target character regarding the issue determines their sensitivity coefficient. Each time a scenario theme is loaded, the system dynamically determines the sensitivity coefficient for each virtual character based on these factors, providing a basis for personalized adjustments to the subsequent perturbation amplitude.
[0176] After obtaining the differentiated perturbation vectors and corresponding sensitivity coefficients for each virtual character, the system performs a personalized scaling operation on the perturbation amplitude. Specifically, the system multiplies the overall differentiated perturbation vector of each virtual character by its sensitivity coefficient, proportionally amplifying or shrinking the magnitude of the perturbation vector. For characters with high sensitivity coefficients, the amplitude of their perturbation vectors is significantly amplified, meaning that the character's stance will shift significantly when facing the current situation, more profoundly reflecting the influence of the situational issue on their stance. For example, in a multi-party debate, a debater highly sensitive to environmental issues may see their stance vector shift significantly towards environmental advocacy due to situational influence. For characters with low sensitivity coefficients, the amplitude of their perturbation vectors is compressed or even approaches zero, meaning that the character's stance is relatively rigid or indifferent to the issue, and situational changes have almost no substantial impact on their stance. In a camp-based diplomatic negotiation scenario, smaller camps with high sensitivity coefficients exhibit drastic stance shifts when facing pressure from larger camps, while strong regional camps with low sensitivity coefficients maintain a relatively independent diplomatic approach. After adjusting the sensitivity coefficient, the perturbation vectors, which were originally differentiated in direction, also formed a gradient distribution in terms of influence that matched the individual characteristics of the characters. This made the position adjustment no longer a synchronous migration that was equal for all characters, but rather a differentiated pattern with primary and secondary aspects and varying degrees of importance.
[0177] After adjusting the amplitude of the perturbation vector, the system performs a weighted summation of the adjusted differentiated perturbation vector with the initial stance parameters of the corresponding virtual character to generate the character's final dynamic stance parameters in the current context. During the weighted summation, the initial stance parameters can be configured with a base weight coefficient. This coefficient controls the degree to which the character's initial stance is maintained when facing contextual perturbations, reflecting the inertial force of the character's core beliefs. The base weight coefficient can complement the sensitivity coefficient: characters with firm stances have high base weights and low sensitivity, resulting in a greater preservation of their initial stance; characters with volatile stances have low base weights and high sensitivity, resulting in their initial stance yielding more to contextual perturbations. Through weighted summation, the system achieves a controllable balance between respecting the character's initial settings and responding to contextual changes. The set of dynamic stance parameters formed by all virtual characters after the above processing constitutes the dynamic stance distribution under the current context theme. This dynamic position distribution precisely encodes the immediate position state of each role under the dual influence of initial settings and situational stimuli: highly sensitive roles exhibit position adaptability that is highly responsive to the situational issues, while low-sensitive roles demonstrate consistency and stability in their positions. Wavering roles may temporarily align themselves with others, while conflicting roles may unexpectedly converge on positions due to specific issues. Within collaborative roles, a gradient stratification of positions may also occur due to differences in sensitivity. In multi-party debates, this simulates the differentiated discourse tendencies of debaters on the same topic due to differences in professional background and personality. In diplomatic mediation, it recreates the diplomatic reality where different camps adopt different tones on the same event due to varying degrees of interest. In role persuasion, it reflects the differences in psychological openness among different persuasive targets to the same persuasive issue. The resulting dynamic position distribution provides position data support with both an overall perspective and individual granularity for subsequent steps in calculating expected feedback contribution values and implementing balanced and diversified screening.
[0178] In some embodiments of this application, considering extreme situations that may occur in practical applications, such as when the number of qualified options remaining after the candidate option set at a certain decision-making stage has undergone dual filtering of equilibrium constraint screening and diversity constraint screening is too small to meet the preset minimum number of options for that decision-making stage, users will face a dilemma of limited choices at that interaction node, affecting the richness of the decision-making experience and the openness of the narrative path. To solve this problem, this application adds an option quantity guarantee and iterative replenishment mechanism to the above screening process, specifically:
[0179] If the number of candidate options obtained after filtering by the balance constraint and / or the diversity constraint does not meet the preset number requirement, an option supplementation operation is triggered, and the supplemented candidate option set is re-filtered according to the balance constraint and the diversity constraint until a list of available options that meet the conditions is obtained.
[0180] The option supplement operation includes at least one of the following:
[0181] Select supplementary options from the set of options marked as high-quality options in the historical interaction records and add them to the candidate option set;
[0182] New variant options are generated based on the current context theme and the dynamic stance distribution, and added to the candidate option set;
[0183] A perturbation operation with a preset direction is performed on the existing candidate options to obtain derived options, which are then added to the candidate option set.
[0184] Specifically, the triggering condition for this mechanism is set as follows: after the diversification constraint screening is completed in step S33, or after the joint screening process of steps S32 and S33 is completed, the system counts and statistics the currently retained candidate options. If the statistical results show that the number of candidate options obtained is lower than the preset number requirement for this decision-making stage type or the overall game design, the system determines that the current option supply is insufficient and immediately triggers the option supplementation operation. The purpose of the option supplementation operation is to dig out or generate new qualified options from the alternative sources and expand the size of the candidate option pool without destroying the established balance and diversity quality. After the supplementation is completed, the system will not skip the screening process directly, but will send the supplemented candidate option set back into the balance constraint and diversification constraint screening pipeline composed of steps S32 and S33 for re-verification and filtering to ensure that the newly added options also meet the quality standards of the dual constraints. If the number of options still does not meet the standard after re-screening, the supplementation and re-screening operations are repeated until the final list of available options meets the preset requirements in both quantity and quality. This iterative closed mechanism effectively ensures that each decision-making stage can provide users with a sufficiently rich selection of strategies.
[0185] The option supplementation operation is designed with multiple parallel supplementation paths, and the system can flexibly adopt at least one of them according to the actual situation.
[0186] The first supplementary path is based on reusing high-quality options from historical interaction records. During long-term operation, the system continuously records the options selected by users at each decision-making stage, the narrative results triggered by those options, and subsequent user behavior feedback. Based on preset criteria for evaluating high-quality options, such as whether they led to key plot advancements, received positive user feedback, or generated a chain reaction with high interaction rates, some options are marked as high-quality and stored in the historical record database. When option supplementation is triggered, the system retrieves a set of high-quality options from the historical interaction records that match the current context and decision-making stage type. From this set, it selects those historically high-quality options whose expected feedback contribution value still aligns with the current dynamic position distribution and adds them to the candidate option set. The advantage of this path is that the selected options have been validated in practice and possess high narrative value and player acceptance. In multi-party debate scenarios, historically high-quality options might be classic rebuttal rhetoric that successfully reversed the judges' attitudes in similar debates before; in diplomatic mediation, they might be mediation strategies that facilitated breakthrough agreements in similar stalemates.
[0187] The second supplementary path involves generating new variant options based on a generative model. The system invokes a pre-defined generative model, using current contextual theme information, current dynamic stance distribution, and the characteristics of currently selected available option types as input conditions, to generate new options in real time that highly fit the current narrative context. The generative model can be constrained to prioritize producing new variant options that can fill gaps in the current option set regarding stance inclination or strategy type. For example, if the currently available options still lean towards a certain stance under equilibrium constraints, the generative model can be guided to produce options with the opposite inclination; if a specific strategy type is missing in the diversification constraints, the generative model is required to generate statements that conform to the characteristics of that strategy type. The generated variant options must undergo pre-defined tendency vector labeling and strategy type classification before entering the candidate option set. This path ensures that the system still has the ability to autonomously produce qualified options even when pre-defined resources are exhausted.
[0188] The third supplementary path involves perturbation and derivation of existing candidate options. The system selects high-quality options from the current candidate option set that have passed equilibrium and diversity constraints, or selects potentially valuable options from eliminated candidates as a base, and performs perturbation operations in a preset direction to derive new options. Perturbation operations can be applied to the expression dimension or the tendency representation dimension of the options. In the expression dimension, derived options can be generated that differ in expression form from the base option but have similar core functions through methods such as paraphrasing, tone adjustment, and argument replacement. In the tendency representation dimension, the values of certain dimensions in the preset tendency vector can be fine-tuned to create slight differences between the derived options and the original options in terms of positional influence, thereby increasing the granularity of the option set in terms of positional influence. In multi-party debate scenarios, a rebuttal option based on logical argumentation can be perturbed to derive a rebuttal variant based on emotional resonance; in diplomatic mediation, an economic aid proposal can be perturbed to derive multiple variant versions with different additional conditions.
[0189] In some embodiments of this application, in order to provide users with quantitative feedback on the quality of their interaction strategies after constructing a complete scene for user interaction, and to enhance the strategic depth and replay value of the interactive narrative, this application may also add an interaction scoring and result feedback function based on multi-dimensional evaluation, specifically as follows:
[0190] After step S4, which involves constructing an interactive scenario for user interaction, the following steps are also included:
[0191] Step S5: Receive the target options selected by the user from the corresponding list of available options in each decision-making stage, forming a selection sequence;
[0192] Step S6: Based on the dynamic position distribution of each decision stage and the matching relationship between each target option and the virtual character faction, perform a weighted calculation on each target option in the selection sequence to obtain the stage interaction score;
[0193] Step S7: Extract the policy path features of the selected sequence, evaluate the consistency of the policy path features with the predefined policy path template, and generate a cross-stage path consistency index.
[0194] Step S8: Combine the stage interaction score with the cross-stage path consistency index to generate the final interaction score, and output the interaction result level according to the preset mapping relationship between score and level.
[0195] Specifically, when a user makes a selection from the list of available options presented by the system after filtering by equilibrium and diversity constraints at each decision stage in the interactive scenario constructed in step S4, the system receives and records the specific target option selected by the user in real time. As the interaction progresses from the initial decision stage to the final decision stage, the system accumulates and records a selection sequence composed of the target options at each stage arranged in chronological order. This selection sequence is a complete mapping of the user's strategy preferences and decision-making style throughout the entire interaction process. In a multi-party debate interactive scenario, the selection sequence may record the user's logical construction options from the "opening statement" stage, to the rebuttal or reconciliation options in the "free attack and defense" stage, and then to the sublimation or compromise options in the "concluding remarks" stage; in a camp diplomacy and mediation scenario, the selection sequence may record the mild contact in the probing stage, the strong pressure in the interest exchange stage, and the flexible concessions in the agreement signing stage; in a role relationship persuasion scenario, the selection sequence may present a gradual progression or strategy shift from building trust and core persuasion to joint commitment.
[0196] For each target option in the selection sequence, the system retrieves a snapshot of the dynamic position distribution at the decision stage corresponding to the selection of that option, as well as the matching relationship between the target option and each virtual character faction. This matching relationship can be obtained by calculating the similarity between the preset tendency vector of the target option and the dynamic position vector of the core characters of each faction, or by directly referencing the expected feedback contribution value of the option to each character calculated in step S32. Based on this, the system performs a weighted calculation on each target option to evaluate the immediate interactive effect achieved by the option under the current positional landscape. The weighted calculation considerations may include: whether the option effectively draws the position of wavering characters towards its own side, whether it successfully weakens the cohesion of the opposing faction, whether it strengthens the unity of its own allied faction, and whether it avoids unnecessary faction relationship breakdowns. In multi-party debates, an option that successfully persuades a majority of judges to lean towards its own side will receive a higher stage score; in diplomatic mediation, an agreement option that gains the support of a key wavering faction at a lower cost will score higher; in character persuasion, an option that successfully causes a substantial change in the target's position will receive a higher evaluation. By performing a step-by-step weighted calculation and aggregation of all target options in the selection sequence, the system obtains a stage interaction score that reflects the overall quality and immediate effectiveness of the user's decision-making at each stage.
[0197] In addition to evaluating the immediate effects of each decision-making stage, the system further extracts cross-stage strategic path characteristics from the overall selection sequence. These strategic path characteristics describe the user's macro-level strategic orientation and style evolution throughout the entire interaction process, including the evolutionary trend of strategy types, the consistency of stance inclinations, and the long-term operational model of opposing or cooperative camps. The system has several predefined strategic path templates, each representing a typical cross-stage strategic paradigm. For example, in a multi-party debate scenario, templates may include a consistently aggressive approach, employing a radical rebuttal strategy throughout to continuously challenge the opponent's position; an attack-then-defense approach, establishing an advantage through strong initial attacks and consolidating victory through robust defense later; and a gradual reconciliation approach, transitioning from attack to seeking consensus, primarily targeting those on the sidelines. In a diplomatic mediation scenario, templates may include hardline pressure, flexible transaction, multilateral coordination, and isolation. In a role-playing persuasion scenario, templates may include empathic gradual approach, interest-driven approach, moral pressure approach, and provocation-based reversal approach. The system evaluates the consistency of extracted strategy path features with each predefined template, calculates the degree of matching between the two, and generates a cross-stage path consistency index. This index reflects the overall logic and stylistic sophistication of the user's strategy. A selection sequence that is highly consistent with a template usually indicates that the user has a clear strategic thinking, while a sequence that frequently jumps between templates may score lower on the consistency index.
[0198] After obtaining the stage interaction score and cross-stage path consistency index, the system merges the two to generate a comprehensive final interaction score. The fusion method can use weighted summation, and the weighting can be adjusted according to the game design goals. To encourage strategic flexibility, the path consistency weight can be reduced; to reward strategic resolve, the path consistency weight can be increased. The final interaction score comprehensively reflects the user's performance in both immediate decision-making effectiveness and long-term strategic planning. The system has a pre-defined mapping relationship between scores and levels, which maps continuous or discrete score ranges to several interaction result levels. Level classification can use multi-level labels such as Excellent, Good, Average, Mediocre, and Mistake, or it can be given more contextualized level names based on the narrative theme. Finally, the system provides the generated interaction result level to the user in an appropriate interface format, and can include brief strategic style comments to help the user understand their decision-making style and areas for improvement. Through the complete scoring and feedback mechanism consisting of steps S5 to S8 above, this application provides an immersive interactive narrative while giving users space to review and refine their interaction strategies, thereby significantly enhancing the depth and replay value of various interactive scenarios such as multi-party debates, camp diplomacy, and persuasion and collaboration in character relationships.
[0199] Furthermore, step S6 involves a weighted calculation of each target option in the selection sequence to obtain the stage interaction score, specifically including:
[0200] Step S61: Determine the preference weight vector corresponding to each target option;
[0201] Step S62: For the decision-making stage, calculate the matching degree between the preference weight vector and the dynamic stance vector of each virtual character;
[0202] Step S63: Determine the corresponding contribution adjustment coefficient according to the relationship type of each virtual character. The contribution adjustment coefficient for virtual characters belonging to the conflict relationship type is the amplification coefficient, the contribution adjustment coefficient for virtual characters belonging to the swing relationship type is the random disturbance coefficient, and the contribution adjustment coefficient for virtual characters belonging to the cooperative relationship type is the smoothing coefficient.
[0203] Step S64: Use the contribution adjustment coefficient to weight and accumulate the matching degree of each virtual character to obtain the stage interaction score of the decision-making stage.
[0204] Specifically, when a user selects a target option from the list of available options at a certain decision-making stage, the system first obtains the preference weight vector corresponding to that target option. This preference weight vector is a multi-dimensional vector, with its dimensions defined in accordance with the preset position space and the dynamic position vectors of the virtual roles. This vector is used to characterize the strength and direction of the preference for the target option across various position dimensions from the user's perspective. The preference weight vector can originate from the preset tendency vector of the target option itself, or it can be a derived vector finely adjusted based on the preset tendency vector and incorporating contextual information from the time the option was selected. In a multi-party debate scenario, if a user selects an option that logically supports environmental policies, its corresponding preference weight vector will have a high positive value in the environmental issue dimension; in a diplomatic mediation scenario, if a user selects a secret military aid commitment, the preference weight vector will exhibit corresponding directional values in dimensions such as military cooperation and administrative autonomy. The determination of the preference weight vector provides a unified quantitative benchmark for subsequently evaluating the degree of alignment or deviation between the user's choice and the positions of each role.
[0205] After obtaining the preference weight vector of the target option, the system calculates the matching degree between the preference weight vector and the dynamic stance vector of each virtual character in the scene, based on the dynamic stance distribution of the current decision-making stage. The matching degree can be calculated using a vector similarity metric, and its value reflects the degree to which the user's chosen option aligns with the current stance of a specific virtual character. When the preference weight vector and a character's dynamic stance vector are in the same direction and have similar numerical distributions, the matching degree is high, meaning the option aligns with the character's expected stance and may elicit a positive response. When the two are in opposite directions, the matching degree is negative, meaning the option may provoke resistance from the character. When the two are almost unrelated, the matching degree approaches zero, indicating that the option has little impact on the character. In multi-party debates, the user's chosen rebuttal option may have a negative matching degree with the opposing debater, a positive matching degree with their own teammate, and a mixed positive and negative matching degree distribution with the judges due to differing current inclinations. In diplomatic maneuvering, the option of pressuring a particular faction has a high match rate with allies of the dominant faction, a very low match rate with allies of the balancing faction, and a match rate with the swing faction that depends on its current stance. By calculating the match rate on a role-by-role basis, the system obtains a detailed impact map of the user's choices on the current positional landscape.
[0206] To reflect the differentiated strategic value of different character types in narrative progression within the scoring system, the system assigns a corresponding contribution adjustment coefficient to each virtual character based on their relationship type within the faction tension structure. The design of the contribution adjustment coefficient follows a differentiated strategy: Virtual characters belonging to the conflict relationship type—i.e., key figures on the opposing side of the user's faction—have their contribution adjustment coefficient set to an amplification coefficient. This amplification coefficient means that interactions with this type of character receive more significant weight in the scoring, as decisions directly influencing the conflict's trajectory are more impactful and risky in the narrative. Virtual characters belonging to the swing relationship type—i.e., middle forces whose positions can be won over—have their contribution adjustment coefficient set to a random perturbation coefficient. This random perturbation coefficient is generated by superimposing small random fluctuations on a baseline coefficient. Its introduction aims to simulate a degree of unpredictability in the swing character's attitude, ensuring that the score may fluctuate slightly even with the same choice in each interaction, enhancing realism and replayability. Virtual characters belonging to the cooperative relationship type—i.e., allies—have their contribution adjustment coefficient set to a smoothing coefficient. The smoothing coefficient serves to buffer changes in the matching degree between allies, preventing drastic fluctuations in ally relationship scores due to a single selection, thus reflecting the relative stability and resilience of collaborative relationships. In multi-party debates, the reactions of the opposing core debaters are amplified in evaluation, the scores of the judging panel members are subject to random perturbation, while the scores of one's own debaters are relatively smoothed out. In diplomatic mediation, the matching degree of representatives from opposing camps is amplified, the matching degree of neutral minor camps fluctuates randomly, while the matching degree of representatives from allied camps is smoothed out.
[0207] After obtaining the matching degree and corresponding contribution adjustment coefficient for each virtual character, the system performs a weighted summation operation. Specifically, the matching degree of each virtual character is multiplied by its corresponding contribution adjustment coefficient, and then the weighted matching degrees of all virtual characters are summed to obtain the stage interaction score for this decision-making phase. This score comprehensively reflects the immediate impact of the target option chosen by the user at this stage on the overall positional landscape. Because the matching degree of conflicting characters is amplified by a coefficient, choosing the option of challenging the core of the opposing camp may bring high-risk, high-reward score fluctuations; because the matching degree of wavering characters is adjusted by a random perturbation coefficient, the process of striving for neutral forces presents a certain element of luck and uncertainty in the score; because the matching degree of cooperative characters is processed by a smoothing coefficient, the option of maintaining stable alliances can continuously contribute a positive but robust score base. In a multi-party debate, a precise rebuttal that exposes the opponent's logical flaws can significantly boost the stage score due to the amplified negative match of the opposing team's key debater. Meanwhile, random fluctuations in the judging panel can bring additional score gains or losses. In factional diplomacy, a proposal for an exchange of interests aimed at a swing camp is scored based on both the camp's current dynamic stance and random fluctuations, reflecting the delicate nature of diplomatic negotiations. Through this weighted cumulative mechanism, the stage interaction score can accurately and differentiatedly measure users' interactive performance at individual decision-making nodes, providing reliable foundational data for subsequent cross-stage comprehensive scoring.
[0208] Further, step S7, extracting the policy path features of the selected sequence, evaluating the consistency of the policy path features with a predefined policy path template, and generating a cross-stage path consistency index, specifically includes:
[0209] Step S71: Encode each target option in the selection sequence into a state feature sequence according to the decision-making stage order;
[0210] Step S72: Calculate the state transition probability between adjacent decision stages in the state feature sequence to obtain the policy path feature corresponding to the selection sequence;
[0211] Step S73: Compare the state transition probabilities between adjacent decision stages in the strategy path features with the reference state transition probability sequence in the predefined strategy path template, and determine the cross-stage path consistency index based on the degree of deviation of the comparison results.
[0212] Specifically, the user's choices at each decision-making stage are regarded as a continuous state evolution process. By quantifying the pattern of strategy state changes between adjacent stages and comparing it with the preset strategy paradigm, a cross-stage path consistency index that can objectively measure the user's strategy logic and style proficiency is obtained.
[0213] The system first acquires the selection sequence formed by the user throughout the entire interaction process. This sequence consists of the target options selected at each decision stage arranged chronologically. For each target option in the sequence, the system maps and encodes it into a discrete state feature based on the strategy type label, stance inclination attribute, or other preset classification dimensions carried by the option. The design of the state feature should be consistent with the classification system adopted by the predefined strategy path template. It can be based on the first, second, and third strategy types divided in step S331 above, or it can be further subdivided at a higher granularity. For example, the first strategy type can be subdivided into subcategories such as aggressive attack and conservative attack, and the third strategy type can be subdivided into subcategories such as open opposition and indirect challenge. In multi-party debate scenarios, a user's choice sequence might be encoded as a state feature sequence of "aggressive attack—aggressive attack—moderate reconciliation—aggressive attack—elevated summary"; in diplomatic mediation scenarios, it might be encoded as "moderate probing—exchange of interests—public pressure—secret commitment—multilateral compromise"; and in role-relationship persuasion scenarios, it might present as a state flow of "empathy building—interest binding—moral persuasion—provocation—joint commitment". By abstracting the original option instances into standardized state features, the system transforms the user's choice sequence into a state feature sequence that is easy to statistically model and pattern matching.
[0214] After obtaining the state feature sequence, the system extracts its core dynamic features from the perspective of sequence evolution. Specifically, the system examines the state change relationship between adjacent decision stages in the state feature sequence pairwise, that is, the transition from the state feature of stage i to the state feature of stage i+1. By traversing and statistically analyzing all adjacent stage pairs, the system generates a set of conditional probability distributions reflecting the flow pattern of user strategy states. This set of state transition probabilities constitutes the strategy path feature corresponding to the selection sequence. The strategy path feature can capture the change pattern of user strategy behavior in the time dimension. For example, it can reveal whether a user tends to maintain the same strategy type in the next stage after selecting a certain strategy type, whether there is a typical tendency to switch from aggression to compromise, whether the user exhibits behavioral characteristics that change from mild to aggressive under specific situational pressure, and whether there is an unstable decision-making pattern of repeated back-and-forth movements. In multi-party debates, strategic path characteristics can reflect the tactical connections between debaters at different stages, such as the frequent shifts from defense to counterattack during the free-for-all phase. In diplomatic mediation, strategic path characteristics can characterize the behavioral paradigms of diplomatic representatives of a camp at different stages of negotiations, such as the usual escalation of pressure after the exchange of interests, or the tendency to retreat to multilateral coordination for support after setbacks. Extracting strategic path characteristics provides a structured and quantitative description of users' cross-stage strategic behavior.
[0215] The system has multiple predefined strategy path templates, each corresponding to a typical cross-stage strategy paradigm. Each strategy path template stores a set of reference state transition probability sequences, which define the idealized or weighted probability distributions of state transitions between adjacent decision stages when adopting that strategy paradigm. For example, in the consistently offensive template, the probability of maintaining an offensive state from an offensive state is close to 100%, while the probability of transitioning to a conciliatory or yielding state is extremely low; in the attack-then-defend template, the probability of maintaining an offensive state in the first half is relatively high, while the probability of transitioning from an offensive to a defensive state in the second half increases significantly; in the progressively conciliatory template, the probability of gradually transitioning from an offensive to a conciliatory state shows an increasing trend. The system compares each state transition probability in the strategy path features extracted in step S72 with the reference state transition probability sequence in the target strategy path template item by item. The comparison process calculates the deviation values of the two at each state transition term, and uses methods such as summing the absolute values of the deviations, weighted sum of squared deviations, or distribution difference measures based on information divergence to comprehensively obtain a total deviation characterizing the degree of deviation between the actual strategy path and the template paradigm. This total deviation, after normalization and direction adjustment, is transformed into a cross-stage path consistency index. The smaller the deviation, the higher the consistency index, indicating that the user's choice sequence highly matches the strategy paradigm; the larger the deviation, the lower the consistency index, indicating that the user's choice sequence fluctuates between different strategy styles and lacks a unified strategy logic. In multi-party debates, if the user's actual state transition pattern highly matches a consistently aggressive template, a high consistency index is obtained, and the system can therefore determine that the user exhibits a clear aggressive debate style; if the user's state transitions show large deviations across multiple templates, the consistency index is low, and the system can determine that their strategy path is relatively chaotic. Through the above comparison mechanism based on state transition probabilities, the cross-stage path consistency index can accurately and quantitatively reflect the purity and logical consistency of the user's strategy throughout the entire interaction process.
[0216] The character interaction scene generation device provided in this application embodiment can be applied to character interaction scene generation equipment. Figure 2 The hardware structure block diagram of the character interaction scene generation device is shown, with reference to... Figure 2 The hardware structure of the character interaction scene generation device may include: at least one processor 1, at least one communication interface 2, at least one memory 3 and at least one communication bus 4;
[0217] In this embodiment of the application, the number of processor 1, communication interface 2, memory 3, and communication bus 4 is at least one, and processor 1, communication interface 2, and memory 3 communicate with each other through communication bus 4;
[0218] Processor 1 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention.
[0219] Memory 3 may include high-speed RAM, and may also include non-volatile memory, such as at least one disk storage device;
[0220] The memory stores a program, which the processor can call. The program is used for:
[0221] Multiple virtual characters are acquired, and initial position parameters are configured for the multiple virtual characters according to a preset faction tension structure, so that at least one group of virtual characters meets the high conflict condition, at least one group of virtual characters meets the swing condition, and at least one group of virtual characters meets the cooperation condition.
[0222] Obtain current context theme information, and adjust the initial stance parameters of each virtual character based on the current context theme information to obtain the dynamic stance distribution of each virtual character under the current context theme;
[0223] The role interaction process is divided into multiple consecutive decision-making stages. In each decision-making stage, based on the dynamic position distribution, the candidate option set corresponding to the current situation theme and the current decision-making stage is filtered according to the equilibrium constraint and the diversity constraint to generate a list of available options for each decision-making stage.
[0224] Based on the list of available options obtained in each decision-making stage, an interactive scenario for user interaction is constructed.
[0225] Optionally, the refined and extended functions of the program can be referred to the above description.
[0226] This application embodiment also provides a readable storage medium that can store a program suitable for execution by a processor, the program being used for:
[0227] Multiple virtual characters are acquired, and initial position parameters are configured for the multiple virtual characters according to a preset faction tension structure, so that at least one group of virtual characters meets the high conflict condition, at least one group of virtual characters meets the swing condition, and at least one group of virtual characters meets the cooperation condition.
[0228] Obtain current context theme information, and adjust the initial stance parameters of each virtual character based on the current context theme information to obtain the dynamic stance distribution of each virtual character under the current context theme;
[0229] The role interaction process is divided into multiple consecutive decision-making stages. In each decision-making stage, based on the dynamic position distribution, the candidate option set corresponding to the current situation theme and the current decision-making stage is filtered according to the equilibrium constraint and the diversity constraint to generate a list of available options for each decision-making stage.
[0230] Based on the list of available options obtained in each decision-making stage, an interactive scenario for user interaction is constructed.
[0231] Optionally, the refined and extended functions of the program can be referred to the above description.
[0232] This application also provides a computer program product, including a computer program, wherein the computer program is executed by a processor using the following method:
[0233] Multiple virtual characters are acquired, and initial position parameters are configured for the multiple virtual characters according to a preset faction tension structure, so that at least one group of virtual characters meets the high conflict condition, at least one group of virtual characters meets the swing condition, and at least one group of virtual characters meets the cooperation condition.
[0234] Obtain current context theme information, and adjust the initial stance parameters of each virtual character based on the current context theme information to obtain the dynamic stance distribution of each virtual character under the current context theme;
[0235] The role interaction process is divided into multiple consecutive decision-making stages. In each decision-making stage, based on the dynamic position distribution, the candidate option set corresponding to the current situation theme and the current decision-making stage is filtered according to the equilibrium constraint and the diversity constraint to generate a list of available options for each decision-making stage.
[0236] Based on the list of available options obtained in each decision-making stage, an interactive scenario for user interaction is constructed.
[0237] Optionally, the refined and extended functions of the program can be referred to the above description.
[0238] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0239] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0240] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for generating character interaction scenes, characterized in that, include: Multiple virtual characters are acquired, and initial position parameters are configured for the multiple virtual characters according to a preset faction tension structure, so that at least one group of virtual characters meets the high conflict condition, at least one group of virtual characters meets the swing condition, and at least one group of virtual characters meets the cooperation condition. Obtain current context theme information, and adjust the initial stance parameters of each virtual character based on the current context theme information to obtain the dynamic stance distribution of each virtual character under the current context theme; The role interaction process is divided into multiple consecutive decision-making stages. In each decision-making stage, based on the dynamic position distribution, the candidate option set corresponding to the current situation theme and the current decision-making stage is filtered according to the equilibrium constraint and the diversity constraint to generate a list of available options for each decision-making stage. Based on the list of available options obtained in each decision-making stage, an interactive scenario for user interaction is constructed.
2. The method according to claim 1, characterized in that, Based on the dynamic position distribution, the candidate option set corresponding to the current situation theme and the current decision stage is filtered according to equilibrium constraints and diversification constraints to generate a list of available options for each decision stage, including: Retrieve a set of candidate options from a pre-defined pool that correspond to the current context and decision-making stage; Based on the dynamic position distribution and the preset tendency representation of each candidate option, the expected feedback contribution value of each candidate option is calculated, and the candidate option set is filtered according to the equilibrium constraint so that the dispersion of the expected feedback contribution value of each candidate option in the filtered candidate option set is within the preset equilibrium interval. The candidate option set is filtered according to the diversity constraint, so that the candidate option combination obtained after filtering contains at least one option of different strategy type; The options that simultaneously satisfy the equilibrium constraint and the diversification constraint are determined as the available options in the decision-making stage, forming a list of available options.
3. The method according to claim 1, characterized in that, The process of acquiring multiple virtual characters and configuring initial stance parameters for these characters according to a preset faction tension structure includes: Obtain the preset faction tension structure, which stipulates that the multiple virtual characters must simultaneously include conflict relationship type, swing relationship type and cooperative relationship type; Based on the aforementioned camp tension structure, corresponding initial position parameter configuration rules are determined for each relationship type. These initial position parameter configuration rules include: for virtual character groups belonging to the conflict relationship type, the initial position parameter is set to maintain the maximum distance constraint within a preset position space; for virtual character groups belonging to the swing relationship type, the initial position parameter is set to maintain a transitional region between the central and peripheral regions within a preset position space, with a random fluctuation range of a preset amplitude; and for virtual character groups belonging to the cooperative relationship type, the initial position parameter is set to maintain the minimum distance constraint within a preset position space. Based on the initial position parameter configuration rules, the initial position parameters of the multiple virtual characters are generated respectively.
4. The method according to claim 3, characterized in that, The conflict condition is determined based on the position conflict index, the wavering condition is determined based on the position wavering index, and the cooperation condition is determined based on the position cooperation index, wherein: The position conflict index is determined by calculating the first distance between the initial position vectors of two virtual characters; The position swing index is determined based on the second distance between the position vector of the virtual character and the position of the group center of the virtual character, as well as the historical position change range of the virtual character. The positional synergy index is determined based on the historical success rate of cooperation between the two virtual characters and the degree of overlap of the same directional dimensions in the initial positional vector.
5. The method according to claim 4, characterized in that, After generating the initial stance parameters for the plurality of virtual characters, the method further includes: Based on the position conflict index, the position swing index, and the position coordination index, the generated initial position parameters are subjected to a camp tension verification. The verification items for the camp tension verification include verifying whether the position conflict index between virtual character groups with conflict relationship type is greater than a preset conflict threshold, whether the position swing index between virtual character groups with swing relationship type is within a preset swing range, and whether the position coordination index between virtual character groups with coordination relationship type is greater than a preset coordination threshold. If any verification item fails, the initial stance parameters of the corresponding virtual character will be adjusted until all verification items pass.
6. The method according to claim 1, characterized in that, Based on the current context theme information, the initial stance parameters of each virtual character are adjusted to obtain the dynamic stance distribution of each virtual character under the current context theme, including: Extract key elements from the current contextual topic information and map the key elements to a high-dimensional semantic space to obtain a contextual semantic vector; For each virtual character, the contextual semantic vector is fused with the initial stance parameters of the virtual character to generate a differentiated perturbation vector corresponding to the virtual character, wherein the differentiated perturbation vectors corresponding to different virtual characters differ in at least one dimension of direction and amplitude. The differentiated perturbation vectors are superimposed onto the initial stance parameters of each virtual character to obtain the dynamic stance distribution.
7. The method according to claim 6, characterized in that, The differentiated perturbation vectors are superimposed onto the initial stance parameters of each virtual character to obtain the dynamic stance distribution, including: Obtain the sensitivity coefficient of each virtual character to the context theme; The amplitude of the differential perturbation vector corresponding to each virtual character is adjusted using the sensitivity coefficient of each virtual character. The dynamic position distribution is obtained by weighting and summing the amplitude-adjusted differential perturbation vector with its corresponding initial position parameter.
8. The method according to claim 2, characterized in that, The preset tendency representation includes the preset tendency vector of each candidate option, and the dynamic stance distribution includes the dynamic stance vector of each virtual character. The calculation of the expected feedback contribution value of each candidate option based on the dynamic position distribution and the preset tendency representation of each candidate option includes: Obtain a preset tendency vector for each candidate option, wherein the preset tendency vector is used to characterize the degree of bias of the corresponding candidate option toward different positions; For each candidate option, the similarity between the preset tendency vector and the dynamic stance vector of each virtual character is calculated. The similarity is weighted and summed using the preset influence weights of each virtual character to obtain the expected feedback contribution value of the candidate option.
9. The method according to claim 8, characterized in that, The step of filtering the candidate option set according to the equilibrium constraint includes: Calculate the dispersion index of the expected feedback contribution value of each candidate option in the candidate option set; If the dispersion index exceeds the preset equilibrium range, then remove some candidate options from the candidate option set, including those with the highest or lowest expected feedback contribution values, and return to recalculate the dispersion index until the dispersion index falls within the preset equilibrium range.
10. The method according to claim 1, characterized in that, If the number of candidate options obtained after filtering by the balance constraint and / or the diversity constraint does not meet the preset number requirement, an option supplementation operation is triggered, and the supplemented candidate option set is re-filtered according to the balance constraint and the diversity constraint until a list of available options that meet the conditions is obtained. The option supplement operation includes at least one of the following: Select supplementary options from the set of options marked as high-quality options in the historical interaction records and add them to the candidate option set; New variant options are generated based on the current context theme and the dynamic stance distribution, and added to the candidate option set; A perturbation operation with a preset direction is performed on the existing candidate options to obtain derived options, which are then added to the candidate option set.
11. The method according to claim 2, characterized in that, The different strategy types include a first strategy type, a second strategy type, and a third strategy type; The step of filtering the candidate option set based on diversity constraints includes: Using a pre-trained strategy classification model, strategy type identification is performed on each candidate option, and a type label is assigned to each candidate option. The type label includes a first strategy type, a second strategy type, and a third strategy type. The first strategy type option is the option whose similarity between the preset tendency vector and the mainstream direction vector of the current dynamic position distribution is higher than a first similarity threshold. The second strategy type option is the option whose similarity is between the first similarity threshold and the second similarity threshold. The third strategy type option is the option whose similarity is lower than the second similarity threshold. When generating the list of available options, a set coverage check is performed to verify whether the selected set of options contains options with all three types of labels. If the option does not contain all three types of labels, an option replacement operation is triggered, replacing some of the selected options with options of the missing type, until the selected option set covers options of the first, second, and third strategy types.
12. The method according to claim 11, characterized in that, When there are no options in the preset option pool that meet the conditions of the third strategy type, the generative model is used to generate variant options with a deviation greater than a preset deviation threshold from the mainstream direction vector, based on the current context theme and the dynamic position distribution. The generated variant options are then labeled as the third strategy type and added to the candidate option set.
13. The method according to claim 1, characterized in that, After constructing interactive scenarios that allow users to interact, the following is also included: Receive the target options selected by the user from the corresponding list of available options at each decision stage, forming a selection sequence; Based on the dynamic position distribution of each decision-making stage and the matching relationship between each target option and the virtual character faction, a weighted calculation is performed on each target option in the selection sequence to obtain the stage interaction score. Extract the policy path features of the selected sequence, evaluate the consistency of the policy path features with the predefined policy path template, and generate a cross-stage path consistency index. By combining the stage interaction score with the cross-stage path consistency index, a final interaction score is generated, and the interaction result level is output according to the preset mapping relationship between score and level.
14. The method according to claim 13, characterized in that, The step of weighting each target option in the selection sequence to obtain the stage interaction score includes: Determine the preference weight vector corresponding to each target option; For the decision-making stage, the matching degree between the preference weight vector and the dynamic stance vector of each virtual character is calculated; The contribution adjustment coefficient is determined according to the relationship type to which each virtual character belongs. The contribution adjustment coefficient for virtual characters belonging to the conflict relationship type is the amplification coefficient, the contribution adjustment coefficient for virtual characters belonging to the swing relationship type is the random disturbance coefficient, and the contribution adjustment coefficient for virtual characters belonging to the cooperative relationship type is the smoothing coefficient. The matching degree of each virtual character is weighted and accumulated using the contribution adjustment coefficient to obtain the stage interaction score of the decision-making stage.
15. The method according to claim 13, characterized in that, The step of extracting the policy path features of the selected sequence, evaluating the consistency of the policy path features with a predefined policy path template, and generating a cross-stage path consistency index includes: Each target option in the selection sequence is encoded into a state feature sequence according to the decision-making stage order; Calculate the state transition probability between adjacent decision stages in the state feature sequence to obtain the policy path feature corresponding to the selection sequence; The state transition probabilities between adjacent decision stages in the strategy path features are compared with the reference state transition probability sequence in the predefined strategy path template, and the cross-stage path consistency index is determined based on the degree of deviation of the comparison results.
16. A device for generating character interaction scenes, characterized in that, Including memory and processor; The memory is used to store programs; The processor is used to execute the program to implement each step of the character interaction scene generation method as described in any one of claims 1-15.
17. A readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements each step of the character interaction scene generation method as described in any one of claims 1-15.
18. A computer program product, comprising a computer program, characterized in that, The computer program is executed by the processor to perform the steps of the character interaction scene generation method as described in any one of claims 1-15.
