Embodied science agent-based scientific discovery verification method and system

By constructing a modular cognitive architecture and asynchronous state synchronization protocol for embodied scientific agents, the problem of lack of active monitoring of large language models in simulated physical environments is solved, enabling real-time error correction and resource optimization, and supporting scientific discovery in complex engineering designs.

CN122263379APending Publication Date: 2026-06-23TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TSINGHUA UNIVERSITY
Filing Date
2026-02-14
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing scientific discovery methods for large language models in simulated physical environments lack proactive monitoring and runtime awareness capabilities, resulting in an inability to effectively handle the transient evolution of complex systems, the inability to correct errors in real time, and thus waste of resources and impractical scientific modeling.

Method used

A modular cognitive architecture for embodied scientific agents is constructed, including problem formalization, strategic planner, primitive generator, runtime perception engine, and reflective decision-maker. Real-time monitoring and error correction of scientific discoveries are achieved through asynchronous state synchronization protocol, forming a tight perception-execution closed loop.

Benefits of technology

It enables real-time monitoring and error correction during simulation, avoiding unnecessary computational waste, supporting process-oriented scientific discovery and complex engineering design tasks, and ensuring the verifiability and feasibility of scientific discoveries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122263379A_ABST
    Figure CN122263379A_ABST
Patent Text Reader

Abstract

The application provides a scientific discovery verification method and system based on an embodied science agent, which comprises the following steps: constructing a modularized cognitive architecture of the embodied science agent, and determining an asynchronous state synchronization protocol based on the modularized cognitive architecture; decomposing a scientific intention into a hierarchical execution plan based on problem formalization, and mapping logical steps corresponding to the hierarchical execution plan into executable primitive actions; simulating a scientific discovery based on the executable primitive actions and the asynchronous state synchronization protocol, continuously receiving observation streams for state inference during the simulation process, and triggering hot repair or active interruption when the state is abnormal; verifying constraint satisfaction of a simulation result after the simulation ends, and selecting partial adjustment or global re-planning of the hierarchical execution plan based on the verification result to realize scientific discovery verification. The application can monitor and correct in real time during transient evolution, avoid invalid calculation waste, and thus support process-oriented scientific discovery and complex engineering design tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method and system for verifying scientific discoveries based on embodied scientific agents. Background Technology

[0002] Currently, there are two main paradigms for applying Large Language Models (LLMs) to scientific discovery in simulated physical environments: the Code-as-Action paradigm and the Application Programming Interface (API) Encapsulation paradigm.

[0003] However, both of these paradigms follow a rigid "execute-then-response" cycle, where feedback is only available after execution is complete. Therefore, they lack the runtime awareness necessary for proactively monitoring, interpreting, and intervening in the transient development of physical processes. Thus, an effective solution is urgently needed to address these issues. Summary of the Invention

[0004] To address the aforementioned technical problems, this invention provides a method and system for verifying scientific discoveries based on embodied scientific agents.

[0005] This invention provides a method for verifying scientific discoveries based on embodied scientific agents, comprising: A modular cognitive architecture for embodied scientific agents is constructed, and an asynchronous state synchronization protocol is determined based on the modular cognitive architecture. The modular cognitive architecture includes problem formalization, strategic planner, primitive generator, runtime awareness engine, and reflective decision-maker. Based on the formalization of the problem, the strategic planner is invoked to decompose the scientific intent of the scientific discovery into a hierarchical execution plan, and the primitive generator is invoked to map the logical steps corresponding to the hierarchical execution plan into executable primitive actions of the set software. Based on the executable primitive actions and the asynchronous state synchronization protocol, the scientific discovery is simulated, and the runtime perception engine is invoked to continuously receive the observation stream for state inference during the simulation process, and to trigger hot repair or active interruption when the state is abnormal. After the simulation is completed, the reflective decision-maker is invoked to verify the constraint satisfaction of the simulation results, and based on the verification results, the hierarchical execution plan is adjusted locally or replanned globally to verify the scientific discovery.

[0006] According to the present invention, a scientific discovery verification method based on embodied scientific agents is provided, wherein the problem is formalized to model the scientific intent as an intent-driven problem-solving approach, forming a quintuple consisting of a state space S, an action space A, an observation space O, a scientific intent I, and a constraint set C.<S,A,O,C,I> ; Wherein, the state space S represents the potential physical state of the simulation environment; the action space A represents the set of executable operations; the observation space O includes at least one continuous observation stream; the scientific intent I is a natural language description of the scientific intent; and the constraint set C contains at least one constraint derived from the scientific intent I. The goal of solving the problem is to synthesize an optimal strategy and generate an execution trajectory such that the final state satisfies all the constraints in the constraint set C.

[0007] According to the present invention, a scientific discovery verification method based on embodied scientific agents is provided, wherein the strategic planner is used to bridge the gap between the scientific intent and the executable procedure, and decomposes the scientific intent into a set of constraints and the hierarchical execution plan; The invocation of the strategic planner decomposes the scientific intent of scientific discovery into a hierarchical execution plan, including: Based on the scientific intent and the current interaction history, the strategic planner prompts the large language model to perform global planning and generate at least one global task corresponding to the scientific intent. For each global task, based on real-time observation history, the strategic planner is invoked to perform local planning for the global task, generating at least one local task corresponding to the global task.

[0008] According to the present invention, a scientific discovery verification method based on embodied scientific agents, wherein the step of calling the primitive generator to map the logical steps corresponding to the hierarchical execution plan to executable primitive actions of the set software includes: The primitive generator is invoked, and the primitive generation function is used to perform topological reasoning and constraint generation on the logical steps corresponding to the hierarchical execution plan to obtain the executable primitive actions of the set software. The action types of the executable primitive actions include computational primitives, topological operation primitives, and system control primitives.

[0009] According to the present invention, a scientific discovery verification method based on embodied scientific agents, wherein the step of invoking the runtime perception engine to continuously receive observation streams for state inference during simulation and triggering hot repair or active interruption when the state is abnormal, includes: The runtime perception engine is invoked during the simulation process to acquire a continuous stream of observations and the actions executed. Based on the observation stream, the action, and the state inference function, state inference is performed to obtain the current execution state, which includes any one of the normal state, risk state, and error state. When the execution state is the normal state, monitor and record the optimal parameters and intermediate results of the environmental state during the simulation process; If the execution state is the risk state, the error state, or the constraint is violated, a hotfix or active interruption is triggered.

[0010] According to the present invention, a scientific discovery verification method based on embodied scientific agents includes, invoking the reflective decision-maker to verify the constraint satisfaction of simulation results, and selecting, based on the verification results, to perform local adjustments or global replanning of the hierarchical execution plan, comprising: The reflexive decision-maker is invoked, and the large language model is used as the evaluation mechanism to verify whether the observation flow in the simulation results satisfies all constraints in the constraint set, thereby obtaining the verification result. If the verification result is that all constraints in the constraint set are not satisfied, a set of unsatisfied constraints is determined, which includes the constraints in the constraint set that the observation flow does not satisfy. If the number of constraints in the unmet constraint set is less than a set value, and the constraints in the unmet constraint set only involve numerical precision, then a partial adjustment to the hierarchical execution plan is selected, whereby the set value is determined based on the number of constraints in the constraint set. If the number of constraints in the unsatisfied constraint set is greater than or equal to the set value, or if the constraints in the unsatisfied constraint set involve structural constraints, then a global replanning of the hierarchical execution plan is selected.

[0011] According to the scientific discovery verification method based on embodied scientific agents provided by the present invention, after verifying whether the observation flow in the simulation results satisfies all constraints in the constraint set and obtaining the verification results, the method further includes: If the verification result satisfies all constraints in the constraint set, the output answer is checked for reasonableness. If the output answer is deemed suspicious, then answer verification feedback will be provided.

[0012] According to the present invention, a scientific discovery verification method based on embodied scientific agents is provided, wherein the asynchronous state synchronization protocol includes an asynchronous decoupling and stateful session mechanism, a real-time multimodal streaming mechanism, a two-way active intervention mechanism, a message format specification, and an operation state mechanism; The asynchronous decoupling and stateful session mechanism includes a stateful session mechanism and an asynchronous decoupling mechanism; the stateful session mechanism is used to define continuous time intervals in a stateful session, and the stateful session includes a session identifier, a persistent variable workspace, an operation history, and a session state; the asynchronous decoupling mechanism is used to decouple command distribution and execution lifecycle, allowing the stateful session to maintain the persistent variable workspace and the operation history across interactions; The real-time multimodal streaming mechanism is used to push observation streams to the runtime perception engine through the operation tracker within the execution interval. The observation streams are encapsulated as standard output streams, system event sets, or dynamic simulation trajectories. The bidirectional active intervention mechanism is used to issue an interruption message when the state is abnormal, so as to actively interrupt the timing before the process crashes. The message format specification follows an enhanced message pattern, which includes at least one of the following fields: a unique message identifier, a message type enumeration, a type-specific data payload, a message creation timestamp, a session identifier for routing, related messages in the associated process, the current operation status, and the identifier of the referenced parent message. The operational state mechanism follows a finite state machine model, which includes a set of states, an input alphabet, a state transition function, an initial state, and a set of final states.

[0013] According to the present invention, a scientific discovery verification method based on embodied scientific agents is provided, wherein the message types defined by the message format specification include operation lifecycle type, streaming output type, state synchronization type, and session management type.

[0014] According to the present invention, a scientific discovery verification method based on embodied scientific agents, wherein triggering hot repair when the state is abnormal includes: Based on the internal circulation self-correction mechanism, hot repair is triggered when the state is abnormal; The inner loop self-correction mechanism includes runtime awareness and error recovery, as well as local iteration for monitoring intermediate variables; The runtime awareness and error recovery are used to detect and fix runtime errors during the same issue; The local iterations for monitoring intermediate variables are used to monitor intermediate variables across iterations and to pass information between rounds.

[0015] According to the present invention, a scientific discovery verification method based on embodied scientific agents, wherein the step of selecting to perform local adjustments or global replanning of the hierarchical execution plan based on the verification results includes: Through the outer loop self-correction mechanism, based on the verification results, the hierarchical execution plan is selected to be locally adjusted or globally replanned. The outer loop self-correction mechanism is used for answer verification feedback. When the operation is determined to be correct but the output answer is incorrect, it automatically triggers reflection and retry and injects diagnostic feedback into the context.

[0016] This invention also provides a scientific discovery verification system based on embodied scientific agents, comprising: The building module is configured to construct a modular cognitive architecture for embodied scientific agents and determine an asynchronous state synchronization protocol based on the modular cognitive architecture, which includes problem formalization, strategic planner, primitive generator, runtime awareness engine and reflective decision maker. The mapping module is configured to, based on the formalization of the problem, call the strategic planner to decompose the scientific intent of the scientific discovery into a hierarchical execution plan, and call the primitive generator to map the logical steps corresponding to the hierarchical execution plan into executable primitive actions of the set software. The simulation module is configured to simulate the scientific discovery based on the executable primitive action and the asynchronous state synchronization protocol, and to call the runtime perception engine to continuously receive the observation stream for state inference during the simulation process, and to trigger hot repair or active interruption when the state is abnormal. The verification module is configured to call the reflective decision-maker after the simulation ends to verify the constraint satisfaction of the simulation results, and select to make local adjustments or global replanning to the hierarchical execution plan based on the verification results, so as to verify the scientific discovery.

[0017] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the scientific discovery verification method based on embodied scientific agents as described above.

[0018] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the scientific discovery verification method based on embodied scientific agents as described above.

[0019] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the scientific discovery verification method based on embodied scientific agents as described above.

[0020] This invention provides a scientific discovery verification method and system based on embodied scientific agents. It constructs a modular cognitive architecture of embodied scientific agents and determines an asynchronous state synchronization protocol based on this architecture. The modular cognitive architecture includes problem formalization, a strategic planner, a primitive generator, a runtime awareness engine, and a reflective decision-maker. Based on the problem formalization, the strategic planner decomposes the scientific intent of the scientific discovery into a hierarchical execution plan, and the primitive generator maps the logical steps corresponding to the hierarchical execution plan to executable primitive actions of the defined software. Based on the executable primitive actions and the asynchronous state synchronization protocol, the scientific discovery is simulated, and the runtime awareness engine continuously receives observation streams during the simulation to perform state inference, triggering hotfix or active interruption when the state is abnormal. After the simulation, the reflective decision-maker verifies the constraint satisfaction of the simulation results and, based on the verification results, selects to locally adjust or globally replan the hierarchical execution plan to verify the scientific discovery. This invention transforms existing scientific software into an active embodied agent and constructs a tight perception-execution closed loop. By maintaining stateful sessions and continuous observation through an asynchronous state synchronization protocol, it can monitor and correct errors in real time during transient evolution, avoiding unnecessary computational waste, thereby supporting process-oriented scientific discovery and complex engineering design tasks. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in this invention 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 some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0022] Figure 1 This is a flowchart illustrating the scientific discovery verification method based on embodied scientific agents provided by the present invention.

[0023] Figure 2 This is a schematic diagram of the scientific discovery verification system based on embodied scientific agents provided by the present invention.

[0024] Figure 3 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0026] First, a brief description of the relevant content involved in this invention will be given.

[0027] Large language models are revolutionizing scientific discovery, demonstrating significant capabilities in areas such as literature review, hypothesis generation, and experimental automation. This advancement is driving a shift in AI for Science from data-driven pattern recognition to a model-driven autonomous reasoning paradigm.

[0028] However, genuine scientific discoveries, especially in process-oriented scenarios such as engineering design, require not only theoretical derivation but also verifiable execution in real-world environments or through high-fidelity simulations. While LLM excels in semantic understanding and logical deduction, its pure textual reasoning is inherently insufficient to capture complex physical dynamics and real-world constraints. Without the ability to combine abstract theory and reasoning with observations during execution, LLM risks producing "illusory" discoveries that fail to hold under rigorous physical verification, thus creating a gap between abstract reasoning and verifiable scientific results.

[0029] The Code as Action paradigm utilizes LLM (Limited Language Modeling) to synthesize executable programs for scientific computing. Its methodology involves an LLM agent generating code, which is then executed independently in a simulation environment, with the execution process opaque to the agent. Representative works include Program-Aided Language Models (PAL) and Chain of Code (CoC) methods.

[0030] API encapsulation paradigms expose simulation functionalities in scientific software as predefined static APIs or tool services through methods such as Model Context Protocols. LLM proxies access these fixed functionalities through restricted calls and obtain the execution results of these fixed functionalities.

[0031] It is evident that existing technologies have the following fundamental limitations: (1) Disembodiment problem: Existing methods suffer from "disembodiment," that is, the mechanical decoupling between LLM's discrete textual reasoning and the real continuous physical dynamic state. This decoupling makes the system blind to intermediate physical anomalies, such as divergent oscillations, numerical instability, and chemical reaction instability. These anomalies may not trigger incorrect return results, but they fundamentally make scientific modeling unfeasible and unverifiable. (2) Waste of computational resources: Due to the lack of runtime awareness, the system cannot detect experiments destined to fail in a timely manner, resulting in a large amount of wasted resources on ineffective computation. (3) Inability to handle process-oriented scientific discovery: For process-oriented scientific discovery tasks such as engineering design and complex system prototypes, critical failures are usually manifested in the transient evolution process (such as voltage instability in circuit design or intermediate convergence failure in numerical optimization), rather than the final state. Existing methods treat the experimental environment as a black box and cannot handle dynamic system modeling that requires continuous awareness.

[0032] To address the disconnect between LLM and physical simulation in existing technologies and to achieve a paradigm shift from passive tool use to active embodied agent, enabling LLM to perform long-sequence operations under physical constraints and continuously perceive during simulation, this invention proposes a scientific discovery verification method and system (referred to as EmbodiedAct) based on embodied scientific agents.

[0033] The following is combined with Figures 1 to 3 This invention describes a scientific discovery verification method and system based on embodied scientific agents.

[0034] Figure 1 This is a flowchart illustrating the scientific discovery verification method based on embodied scientific agents provided by the present invention, as shown below. Figure 1 As shown, the method includes the following: Step 101: Construct a modular cognitive architecture for embodied scientific agents, and determine an asynchronous state synchronization protocol based on the modular cognitive architecture. The modular cognitive architecture includes problem formalization, strategic planner, primitive generator, runtime awareness engine, and reflective decision-maker. Step 102: Based on the formalization of the problem, the strategic planner is invoked to decompose the scientific intent of the scientific discovery into a hierarchical execution plan, and the primitive generator is invoked to map the logical steps corresponding to the hierarchical execution plan into executable primitive actions of the set software. Step 103: Based on the executable primitive action and the asynchronous state synchronization protocol, simulate the scientific discovery, and call the runtime perception engine to continuously receive the observation stream for state inference during the simulation process, and trigger hot repair or active interruption when the state is abnormal; Step 104: After the simulation ends, the reflective decision-maker is invoked to verify the constraint satisfaction of the simulation results, and based on the verification results, the hierarchical execution plan is locally adjusted or globally replanned to verify the scientific discovery.

[0035] In practical applications, we first construct a modular cognitive architecture for embodied scientific agents, including problem formalization, strategic planner module design, primitive generator module design, runtime awareness engine module design, and reflective decision-maker module design, thus obtaining a modular cognitive architecture that includes problem formalization, strategic planner, primitive generator, runtime awareness engine, and reflective decision-maker.

[0036] Furthermore, based on the modular cognitive architecture, an asynchronous state synchronization protocol is implemented, including asynchronous decoupling and stateful session mechanisms, real-time multimodal streaming transmission mechanisms, bidirectional proactive intervention mechanisms, message format specification design, and operation state machine design.

[0037] Then, based on a modular cognitive architecture and an asynchronous state synchronization protocol, a self-correcting optimization of the dual-loop control is achieved. Specifically, based on problem formalization, the scientific intent is decomposed into a hierarchical execution plan through a strategic planner; the logical steps corresponding to the hierarchical execution plan are mapped to software-specific executable primitive actions through a primitive generator; the runtime perception engine continuously receives streaming observations and performs state inference during simulation execution, triggering hot repair or active interruption when anomalies are detected; and the reflective decision-maker verifies the satisfaction of physical constraints and selects local adjustment or global replanning.

[0038] This invention proposes a scientific discovery verification method based on embodied action and embodied scientific agents. It constructs a modular cognitive architecture of embodied scientific agents and determines an asynchronous state synchronization protocol based on this architecture. Based on problem formalization, a strategic planner decomposes scientific intent into hierarchical execution plans. A primitive generator maps the logical steps corresponding to the hierarchical execution plans into software-specific executable primitive actions. A runtime perception engine continuously receives streaming observations and performs state inferences during simulation execution, triggering hotfixes or proactive interruptions when anomalies are detected. A reflective decision-maker verifies the satisfaction of physical constraints and selects local adjustments or global replanning. This transforms existing scientific software into an active embodied agent and constructs a tight perception-execution closed loop. Through the asynchronous state synchronization protocol, it maintains stateful sessions and continuous observations, enabling real-time monitoring and error correction during transient evolution, avoiding wasted computation, and thus supporting process-oriented scientific discovery and complex engineering design tasks.

[0039] Optionally, the problem formalization is used to model the scientific intent as an intent-driven problem-solving process, forming a quintuple consisting of a state space S, an action space A, an observation space O, a scientific intent I, and a constraint set C.<S,A,O,C,I> ; Wherein, the state space S represents the potential physical state of the simulation environment; the action space A represents the set of executable operations; the observation space O includes at least one continuous observation stream; the scientific intent I is a natural language description of the scientific intent; and the constraint set C contains at least one constraint derived from the scientific intent I. The goal of solving the problem is to synthesize an optimal strategy and generate an execution trajectory such that the final state satisfies all the constraints in the constraint set C.

[0040] Specifically, the problem is formally defined as follows: autonomous scientific discovery is modeled as intention-driven problem solving, formalized as a sequential decision-making process in a partially observable environment E, and represented by a quintuple.<S,A,O,C,I> Definition: Symbolic modeling of scientific problems.

[0041] State space S: The potential physical state of the simulation environment, including simulation primitive scripts, variable workspace, and dynamic model structure. State s_t∈S represents the complete system state at time t.

[0042] Action space A: The set of executable operations. An action a_t∈A is a synthesized primitive code fragment (such as calling the solver ode45(...)) or a system control command (such as starting the simulation start, stopping the simulation stop).

[0043] Observation Space O: Unlike the discrete static text return in standard tool usage paradigms, this invention defines observation as a continuous observation stream. At any time step t, the agent receives the observation stream (streaming observation) o_t = {v_stdout, v_stderr, Ψ_sys, Ω_sim}, where: v_stdout is the standard output stream, containing the text output of program execution; v_stderr is the error log stream, containing warnings and error messages; Ψ_sys is the set of system events, such as interrupt signals, warning events, etc.; Ω_sim is the dynamic simulation trajectory, i.e., the time-series metadata of the physical simulation (such as the changes of physical quantities such as velocity, voltage, and displacement over time).

[0044] Scientific Intent I: Natural language description of high-level scientific objectives, such as "designing a proportional-integral-derivative (PID) controller that produces a phase margin > 45 degrees".

[0045] Constraint set C: A set of verification functions {c_1, …, c_k} derived from scientific intent I, where k represents the number of constraints in constraint set C, c_1 is the first constraint in constraint set C, and c_k is the kth constraint in constraint set C. The function corresponding to the i-th constraint c_i in constraint set C is defined as c_i: S → {0, 1}, where c_i(s_t) = 1 when the state s_t satisfies constraint c_i, and 0 otherwise.

[0046] It should be noted that the goal of solving the scientific problem based on LLM is to synthesize an optimal policy π*(a_t | o_{0:t-1}, I) to generate an execution trajectory τ = (a_0, o_0, a_1, o_1, …, a_T, o_T) such that the final state s_T (the state at time T) satisfies all constraints in the constraint set C. c_i ∈ C, c_i(s_T) = 1. Where a_0, o_0 represent the action and observation stream at time 0, respectively; a_1, o_1 represent the action and observation stream at time 1, respectively; and a_T, o_T represent the action and observation stream at time T (the final time).

[0047] Optionally, the strategic planner is used to bridge the gap between the scientific intent and the executable procedure by decomposing the scientific intent into a set of constraints and the hierarchical execution plan.

[0048] In practical applications, the strategic planner module acts as the central planner (analogous to the prefrontal cortex). This module bridges the gap between abstract intentions and executable procedures, decomposing the scientific intention I into a set of goal constraints C = {c_1, …, c_k} and a hierarchical execution plan. The planner function family is defined as M_plan = {M_{plan,global}, M_{plan,local}}, where M_plan represents the strategic planner function, M_{plan,global} represents the global planning function, and M_{plan,local} represents the local planning function.

[0049] Optionally, the invocation of the strategic planner to decompose the scientific intent of the scientific discovery into a hierarchical execution plan includes: Based on the scientific intent and the current interaction history, the strategic planner prompts the large language model to perform global planning and generate at least one global task corresponding to the scientific intent. For each global task, based on real-time observation history, the strategic planner is invoked to perform local planning for the global task, generating at least one local task corresponding to the global task.

[0050] In practical applications, the global planning process is as follows: Given the scientific intent I and the current interaction history τ_{0:t}, the strategic planner prompts the LLM to generate a sequence of high-level subtasks (e.g., modeling → simulation → verification): P_global = {p_1, p_2,…, p_n} = M_{plan,global}(I, τ_{0:t}), where n is the number of high-level subtasks, p_1, p_2, …, p_n are the 1st, 2nd, and nth high-level subtasks respectively, and the high-level subtasks are global tasks. P_global represents the global planning.

[0051] The local planning process is as follows: For the i-th global task p_i (i is any integer from 1 to n), the strategic planner generates a detailed sequence of atomic execution steps based on the real-time observation history o_{0:t}: P_local^(i) = {p_{i,1}, p_{i,2}, …, p_{i,m_i}} = M_{plan,local}(p_i, o_{0:t}), where m_i is the number of atomic steps in the global task p_i, p_{i,1}, p_{i,2}, …, p_{i,m_i} represent the first local task, the second local task, and the m_i-th local task in the global task p_i, respectively, and P_local^(i) represents the local planning in the global task p_i.

[0052] Specifically, the complete representation of the hierarchical execution plan is: P = {P_global, P_local^(1), P_local^(2), …, P_local^(n)}, where P is the complete plan, P_global represents the global plan, and P_local^(1), P_local^(2), …, P_local^(n)} represent the first, second, and nth local plans, respectively. In the Matrix Laboratory (MATLAB) instantiation, the above steps are verified (transformed) using software-specific simulation primitives (such as ode45, linprog, and fsolve in the MATLAB toolbox). By utilizing the toolbox documentation as an external knowledge base, the planning steps are ensured to accurately leverage the embedding capabilities of scientific software. Constraints in the prompts use toolbox functions (ode45, fsolve, linprog) instead of handwritten numerical methods, and formulas are derived from first-principles calculations; integrity checks are included for each subtask. The output is structured JavaScript object notation (JSON) data containing the problem type, equations, and computational steps.

[0053] Optionally, the step of calling the primitive generator to map the logical steps corresponding to the hierarchical execution plan to executable primitive actions of the set software includes: The primitive generator is invoked, and the primitive generation function is used to perform topological reasoning and constraint generation on the logical steps corresponding to the hierarchical execution plan to obtain the executable primitive actions of the set software. The action types of the executable primitive actions include computational primitives, topological operation primitives, and system control primitives.

[0054] In practical applications, the primitive generator module (analogous to the parietal cortex) transforms logical sub-steps p_{i,j} (the j-th local task within the i-th global task) into software-specific executable primitive actions a_t within the simulation environment. The primitive generation function M_code is defined as M_code: P_local × S → A, i.e., a_t = M_code(p_{i,j}, s_t). The generated actions directly manipulate the simulation environment using software-specific simulation primitives, M_code.

[0055] Specifically, the action types are first classified, i.e., action type A = A_compute ∪ A_topology ∪ A_control, where: A_compute are computation primitives, such as ode45(...), fsolve(...), linprog(...); A_topology are topology operation primitives, such as add_block(...), add_line(...); and A_control are system control primitives, such as start, stop, pause.

[0056] Then, topology reasoning is performed. Unlike general code generation, M_code can understand spatial semantics in graphical environments (such as the visualization simulation tool Simulink), mapping logical intents to executable two-dimensional topologies. The topology mapping function Topo: LogicalIntent → {(block_id, position, connections)}, where LogicalIntent is the logical intent, → represents the transformation, and {(block_id, position, connections)} is the two-dimensional topology, block_id is the component identifier (such as the component name), position is the location, and connections are the connection relationships. For example: "Connect the controller output to the controlled object input" → add_line('model / Controller / 1', 'model / Plant / 1'), where model is the component class, Controller and Plant are the component names, and 1 is the connection port.

[0057] Next, constraints are generated: American Standard Code for Information Interchange (ASCII) is used; intermediate variables are recorded using disp(['INTERMEDIATE:', num2str(val,15)]); the final answer is assigned to the result variable; scope safety is ensured by passing external values ​​as function parameters; for topological operations, logical intent is mapped to two-dimensional block coordinates (Simulink mode).

[0058] In this embodiment of the invention, by classifying action types, topological reasoning, and generating constraints, logical steps can be mapped to software-specific executable primitive actions quickly and accurately.

[0059] Optionally, the step of invoking the runtime perception engine to continuously receive observation streams for state inference during simulation, and triggering hotfix or active interruption when the state is abnormal, includes: The runtime perception engine is invoked during the simulation process to acquire a continuous stream of observations and the actions executed. Based on the observation stream, the action, and the state inference function, state inference is performed to obtain the current execution state, which includes any one of the normal state, risk state, and error state. When the execution state is the normal state, monitor and record the optimal parameters and intermediate results of the environmental state during the simulation process; If the execution state is the risk state, the error state, or the constraint is violated, a hotfix or active interruption is triggered.

[0060] In practical applications, to implement the "active embodiment" core of EmbodiedAct, the runtime perception engine (analogous to the amygdala) processes the continuous observation stream o_t and the executed action a_t through the embodied interaction protocol, providing real-time potential state inference z_t = M_perc(a_t, o_t) ∈ {Normal, Error, Warning}. The state inference function M_perc is defined as M_perc: A × O → {Normal, Error, Warning}, and different processing is performed for different states.

[0061] The processing procedure under normal conditions (z_t = Normal) is as follows: The runtime perception engine focuses on the constraint set {c_1,…, c_k}, actively monitoring and recording the optimal parameters and intermediate results of the environment state s_t during the simulation process; for long-term simulations (such as finite element analysis in engineering design), capturing transient optimality is just as important as the final result; intermediate variables are recorded: key intermediate variables are output in the format disp(['INTERMEDIATE:', num2str(val,15)]).

[0062] Risk identification (z_t = Warning), i.e. risk status: The runtime awareness engine parses the execution flow to identify potential risks, including: numerical instability (∃x ∈ Ω_sim, x = ±∞ or x = NaN); algebraic loop; stiffness warning; convergence failure or divergent oscillation.

[0063] The handling process under the error state (z_t = Error) is as follows: a fatal execution error is detected, including: syntax error (function undefined, variable undeclared); runtime error (dimension mismatch, incorrect input / output count); system exception (memory overflow, timeout).

[0064] The hot repair (loop) process is as follows: when a constraint violation (violation of constraint set C) or execution error (state anomaly, i.e. risk state and error state) is detected, the hot repair loop is triggered: a'_t ← Repair(a_t, o_t, z_t), where Repair is the repair function.

[0065] Specifically, the Repair function executes different strategies based on the state type: if z_t = Error (syntax class), then Repair = M_code(fix_syntax, o_t), where fix_syntax is the syntax to be fixed; if z_t = Error (interface class), then Repair = M_code(fix_interface, o_t), where fix_interface is the interface to be fixed; if z_t = Warning, then Repair = M_code(adjust_params, o_t), where adjust_params are the design parameters in the code to be adjusted. This mechanism enables the agent not only to iteratively correct syntax or runtime errors (such as dimension mismatches), but also to drive autonomous parameter tuning to explore better results without changing the high-level plan, thereby ensuring atomic executability.

[0066] Optionally, the step of calling the reflective decision-maker to verify the constraint satisfaction of the simulation results, and selecting to make local adjustments or global replanning to the hierarchical execution plan based on the verification results, includes: The reflexive decision-maker is invoked, and the large language model is used as the evaluation mechanism to verify whether the observation flow in the simulation results satisfies all constraints in the constraint set, thereby obtaining the verification result. If the verification result is that all constraints in the constraint set are not satisfied, a set of unsatisfied constraints is determined, which includes the constraints in the constraint set that the observation flow does not satisfy. If the number of constraints in the unmet constraint set is less than a set value, and the constraints in the unmet constraint set only involve numerical precision, then a partial adjustment to the hierarchical execution plan is selected, whereby the set value is determined based on the number of constraints in the constraint set. If the number of constraints in the unsatisfied constraint set is greater than or equal to the set value, or if the constraints in the unsatisfied constraint set involve structural constraints, then a global replanning of the hierarchical execution plan is selected.

[0067] Specifically, the reflective decision maker (analogous evaluation system) evaluates target alignment. LLM is used as the judge mechanism to verify whether the output o_t satisfies the physical constraint set C, i.e., Feedback_t = M_ref(o_t, C). The feedback generation function M_ref is defined as: O × 2^C → {(satisfied, ∅), (failed, Δ, strategy)}, where O × 2^C is the input, satisfied means satisfied, ∅ is an empty set, and (satisfied, ∅) indicates that no feedback is needed or the feedback is empty when the constraint set C is satisfied; failed means the constraint set C is not satisfied, Δ is the set of unsatisfied constraints, strategy is the recommended correction strategy, and (failed, Δ, strategy) indicates that when the constraint set C is not satisfied, the output error message (set of unsatisfied constraints) and correction strategy are provided. For the constraint set C = {c_1, …, c_k}, compute the unsatisfied constraint set Δ = {c_j ∈ C |c_j(s_t) = 0}. When a failure is detected (Δ ≠ ∅), the reflexive decision maker creates a physical information update to enter a replanning loop, i.e., p'← M_plan(p, Δ, Feedback_t).

[0068] Based on the nature of the error, one of the following self-correction strategies is activated cyclically: Local Adjustment: The triggering condition is that the plan is correct but the performance is sub-optimal, that is, in the case of (failed, Δ, strategy), |Δ| < k / 2 and Δ only involves numerical accuracy, where k / 2 is a set value, k is the number of constraints in the constraint set C, and |Δ| is the number of unmet constraints in the constraint set. Typical scenarios are like "overshoot is 15%, but the target < 10%", "steady-state error = 0.02, but the target < 0.01"; the action to be performed is that M_ref triggers local parameter refinement within the current subtask p_i: p_{i,j}' ← M_code(refine_params, p_{i,j}, Δ).

[0069] Global Replanning: The triggering condition is that failure indicates a fundamental methodological flaw, that is, in the case of (failed, Δ, strategy), |Δ| ≥ k / 2 or Δ involves structural constraints; typical scenarios are like "PID controller cannot stabilize a non-linear system", "first-order model cannot capture high-order dynamics"; the action to be performed is that M_ref reports the problem to M_plan to change the global strategy: P'global ← M{plan,global}(I, τ_{0:t}, Δ, Feedback_t).

[0070] Optionally, after obtaining the verification result by verifying whether the observed stream in the verification simulation result satisfies all the constraints in the constraint set, it further includes: In the case where the verification result is that all the constraints in the constraint set are satisfied, a rationality check determination is performed on the output answer; If the determination result is that the output answer is suspicious, answer verification feedback is performed.

[0071] In practical applications, the reflection decision maker can also perform answer verification feedback (Answer Verification Feedback): The triggering condition is that there is no runtime error (that is, in the case of (satisfied, ∅)) but the output answer is suspicious (determined by rationality check); typical scenarios are that the numerical result exceeds the physically reasonable range or contradicts known constraints; the action to be performed is to automatically trigger reflection retry and inject diagnostic feedback into the context: retry_context = (previous_answer, flagged_as_suspicious, diagnostic_hint).

[0072] Optionally, the asynchronous state synchronization protocol includes an asynchronous decoupling and stateful session mechanism, a real-time multimodal streaming mechanism, a two-way active intervention mechanism, a message format specification, and an operation state mechanism.

[0073] Optionally, the asynchronous decoupling and stateful session mechanism includes a stateful session mechanism and an asynchronous decoupling mechanism; the stateful session mechanism is used to define continuous time intervals in a stateful session, and the stateful session includes a session identifier, a persistent variable workspace, an operation history, and a session state; the asynchronous decoupling mechanism is used to decouple command distribution and execution lifecycle, allowing the stateful session to maintain the persistent variable workspace and the operation history across interactions.

[0074] In practical applications, the stateful session mechanism manifests as follows: the asynchronous state synchronization protocol defines execution as a continuous time interval t ∈ [t_start, t_end] within a stateful session. The session state is defined as Session = (session_id, workspace, history, status), where: workspace is the persistent variable workspace, storing all defined variables and functions; history is the operation history {(a_0, o_0), (a_1, o_1), …}; and status is the current session state.

[0075] Asynchronous decoupling mechanism: After receiving action a_t, the environment immediately returns an acknowledgment message to the operation tracker, which forwards it to the agent, i.e. (operation_ack): Agent —(a_t)→ Environment —(ack(a_t))→Agent. This asynchronous decoupling mechanism decouples command distribution from the execution lifecycle, allowing sessions to maintain persistent variable workspaces and operation history across interactions, simulating the continuous attention of human researchers.

[0076] Optionally, the real-time multimodal streaming mechanism is manifested as follows: within the execution interval, an observation stream is pushed to the runtime perception engine through an operation tracker, and the observation stream is encapsulated as a standard output stream, a system event set, or a dynamic simulation trajectory.

[0077] Specifically, within the execution interval [t_start, t_end], the software-side Operation Tracker actively pushes a synchronous observation stream to the perception engine, where t_start is the start time and t_end is the end time. The observation stream is defined as the time series O_stream = {o_{t’} | t’ ∈ [t_start, t_end]}. Each observation stream o_{t’} encapsulates: the standard output stream v_stdout(t’) ∈ Σ*, where Σ* is the string sequence; the system event set Ψ_sys(t’) ⊆ {warning, interrupt, exception, …}, where warning represents a danger warning that does not cause an error, interrupt is the terminal, and exception is the captured error information; the dynamic simulation trajectory Ω_sim(t’) ={(var_i, value_i, timestamp_i)}.

[0078] The format of the status update message msg is msg = (type: model_state_update, payload: o_{t’}, timestamp: t’), where type: model_state_update represents that the message type is model state update, payload: o_{t’} represents that the payload is the action o_{t’}, and timestamp: t’ represents that the sampling time is t’. The agent can capture the intermediate state s_{t’} (t_start < t’ < t_end), allowing M_perc to check in real time before the final result is determined: the convergence trend (d||e(t’)|| / dt’ < 0, that is, the error is decreasing); physical violations (∃c_i ∈ C, c_i(s_{t’}) = 0).

[0079] Optionally, the two-way proactive intervention mechanism is used to send an interrupt message when the state is abnormal to actively interrupt the timing before the process crashes.

[0080] In practical applications, the two-way proactive intervention mechanism is manifested as: the full-duplex protocol endows the agent with proactive agency ability.

[0081] Specifically, if \(z_t = M_{perc}(a_t, o_t)\in\{Warning, Error\}\), then active intervention is carried out, and an interruption signal is sent: Agent \(\xrightarrow{(a_{stop})}\) Environment \(\to\) The simulation stops immediately, where \(a_{stop}\in A_{control}\) is a high-priority interruption action. The intervention timing actively intervenes before the process crashes, \(t_{interrupt}<t_{crash}\), where \(t_{interrupt}\) is the interruption time and \(t_{crash}\) is the time when the process crashes. The state transition mechanism is \(IN\_PROGRESS\xrightarrow{(a_{stop})} INTERRUPTED\xrightarrow{(a'_t)} RESTARTED\). This ability enables a hot fix loop, transforming the LLM from a passive tool caller into a responsive supervisor, preventing waste of computation or subsequent system crashes.

[0082] Optionally, the message format specification follows an enhanced message pattern, which includes at least one field among a unique message identifier, a message type enumeration, a type-specific data payload, a timestamp of message creation, a session identifier for routing, related messages in an associated process, a current operation status, and a reference to a parent message identifier.

[0083] Specifically, the design of the message format specification is as follows: all messages follow the enhanced message pattern (EnhancedMessage Schema), including the following fields: id (unique message identifier UUID); type (message type enumeration); payload (type-specific data payload); timestamp (Unix timestamp of message creation); session_id (session identifier for routing); operation_id (related messages in an associated process); status (current operation status); correlation_id (reference to a parent message identifier).

[0084] Optionally, the message types set by the message format specification include operation lifecycle types, streaming output types, status synchronization types, and session management types.

[0085] Specifically, the message types are organized into 16 categories according to functional categories: (1) Operation lifecycle types: operation_request (Agent \(\to\) Server), operation_ack (Server \(\to\) Agent), operation_start (Server \(\to\) Agent), operation_progress (Server \(\to\) Agent), operation_complete (Server \(\to\) Agent), operation_failed (Server \(\to\) Agent).

[0086] (2) Streaming output classes: code_output (server → proxy), code_status (server → proxy), code_debug (server → proxy), code_event (server → proxy).

[0087] (3) State synchronization classes: model_state_update (server → agent), state_verification (agent → server), state_confirmed (server → agent).

[0088] (4) Session management classes: session_init (proxy → server), heartbeat (bidirectional), error (server → proxy).

[0089] Optionally, the operation state mechanism follows a finite state machine model, which includes a set of states, an input alphabet, a state transition function, an initial state, and a set of final states.

[0090] Optionally, the operation state tracking follows a finite state machine model FSM = (Q, Σ, δ, q_0, F): The state set Q = {PENDING, ACKNOWLEDGED, STARTED, IN_PROGRESS, COMPLETED, FAILED}, the input alphabet Σ = {ack, start, progress, done, error, timeout}, and the state transition function δ: Q × Σ → Q; where PENDING represents the standby state (started but not enabled), ACKNOWLEDGED represents the state of receiving information, STARTED represents the start state, IN_PROGRESS represents execution (in process), COMPLETED represents completion, and FAILED represents the failure state. Normal execution path: PENDING —(ack)→ ACKNOWLEDGED —(start)→ STARTED —(progress)→ IN_PROGRESS —(done)→ COMPLETED.

[0091] Error handling path: For all q ∈ Q {COMPLETED, FAILED}, we have q —(error)→FAILED, q —(timeout)→FAILED; Initial state: q_0 = PENDING; Termination state set: F = {COMPLETED, FAILED}.

[0092] Optionally, triggering hotfix when the state is abnormal includes: Based on the internal circulation self-correction mechanism, hot repair is triggered when the state is abnormal; The inner loop self-correction mechanism includes runtime awareness and error recovery, as well as local iteration for monitoring intermediate variables; The runtime awareness and error recovery are used to detect and fix runtime errors during the same issue; The local iterations for monitoring intermediate variables are used to monitor intermediate variables across iterations and to pass information between rounds.

[0093] Specifically, based on the internal loop self-correction mechanism, hot repair is triggered when the state is abnormal, that is, a fast internal loop (runtime-aware drive) is performed.

[0094] The runtime awareness engine-driven fast inner loop triggers instantaneous hotfix, and the execution flow is as follows: The primitive generator sends an action request a_t to the simulation environment; the operation tracker returns an acknowledgment message (operation_ack) and starts execution; during execution, the runtime awareness engine continuously receives the observation stream o_t = {v_stdout, v_stderr, Ψ_sys,Ω_sim}; the runtime awareness engine infers the state z_t = M_perc(a_t, o_t) in real time: if z_t = Normal, continue execution, record intermediate variables and optimal parameters; if z_t = Warning, issue an alarm, trigger the interrupt action a_stop, and stop the simulation to prevent resource waste; if z_t = Error, record the error information and prepare to enter the repair loop; if an anomaly is detected (z_t ∈ {Warning, Error}), calculate the repair action and re-execute: a'_t ← Repair(a_t, o_t, z_t), execute a'_t; after the operation is completed, return the final result.

[0095] The inner loop self-correction mechanism is used to determine whether to continue or terminate the inner loop, including runtime awareness and error recovery and local iterations for monitoring intermediate variables.

[0096] Runtime awareness and error recovery specifically involve detecting and fixing runtime errors (such as undefined functions or input / output mismatches) within the same issue episode. Typical examples include: input / output mismatch recovery (M_perc detects function signature errors → locally adjusts and repairs the interface → self-verifies through closed comparison); and undefined function recovery (M_perc catches undefined function errors → locally adjusts and defines the missing function → no replanning is required).

[0097] The local iteration of intermediate variable monitoring specifically involves: monitoring intermediate variables across iterations, passing information between rounds to solve problems without closed-form solutions; supporting parameter exploration and iterative refinement; typical cases include: threshold verification (such as the 5% criterion), grid search, and bracket refinement.

[0098] Optionally, the step of selecting to perform local adjustments or global replanning of the hierarchical execution plan based on the verification results includes: Through the outer loop self-correction mechanism, based on the verification results, the hierarchical execution plan is selected to be locally adjusted or globally replanned. The outer loop self-correction mechanism is used for answer verification feedback. When the operation is determined to be correct but the output answer is incorrect, it automatically triggers reflection and retry and injects diagnostic feedback into the context.

[0099] Specifically, through the outer loop self-correction mechanism, based on the verification results, the hierarchical execution plan is selected to be locally adjusted or globally replanned, i.e., a slow outer loop (reflective decision-driven).

[0100] A slow outer loop driven by a reflexive decision maker guides global replanning. The execution flow is as follows: The reflexive decision maker M_ref receives the execution result o_t and the constraint set C. It verifies whether the output satisfies all constraints, with the following criteria: For each c_i ∈ C, c_i(s_t) = 1. Calculate the unsatisfied constraint set Δ = {c_j ∈ C | c_j(s_t) = 0}. If Δ ≠ ∅: analyze the error type error_type = classify(Δ); if error_type = performance (suboptimal performance), trigger a local adjustment strategy; if error_type = methodology (methodological flaw), trigger a global replanning strategy; if error_type = suspicious (suspicious answer), trigger answer verification feedback. Generate physical information feedback Feedback_t = (Δ, error_type, recommended_strategy, diagnostic_context). The strategic planner updates the plan based on the feedback: p' ← M_plan(p, Δ, Feedback_t). Enter the next execution loop.

[0101] The outer loop self-correction mechanism is used for answer verification feedback: when M_ref determines that the output answer may be incorrect (even though there is no runtime error), it automatically triggers a retry and injects diagnostic feedback into the context: retry_context =(previous_answer, flagged_as_suspicious, diagnostic_hint). This mechanism addresses samples where there is no error but the answer is wrong, prompting the model to correct its strategy or modeling assumptions without manual intervention.

[0102] For example, a rationality check triggers reprogramming (the model adds a rationality check, comparing the calculated value with the given value to improve confidence); conceptual errors are corrected through reflective judgment (M_ref determines the initial answer is suspicious → automatically triggers a retry → the model reconsiders the modeling assumptions, such as error correction → the correct answer is obtained).

[0103] Furthermore, this invention also provides a dual-loop coordination mechanism for adjusting the relationship between the fast inner loop and the slow outer loop.

[0104] The system coordinates the relationship between the fast inner loop and the slow outer loop as follows: At the time scale separation level: T_inner ≪ T_outer, where the inner loop time scale, T_inner ∈ [10ms, 1s] (single primitive execution); the outer loop time scale, T_outer ∈ [1s, 60s] (task-level evaluation).

[0105] At the information flow level: inner loop → outer loop (hot repair results affect assessment input), i.e., M_ref(o_t, C) ← Result from Repair(a_t, o_t, z_t). This represents whether the requirements are met based on the hot repair results and the original constraints; outer loop → inner loop (replanning decisions reconfigure monitoring focus): C_focus ← M_plan(p', Δ, Feedback_t), where C_focus represents the monitoring corner point.

[0106] At the shared state space level: (S, C) represents the shared context of the two loops.

[0107] At the coordination protocol level: The conversion rule of Loop_inner is as follows: If z_t = Normal, then continue; if z_t ∈ {Warning, Error}, then repair → Loop_inner; if repair_count > threshold, then escalate → Loop_outer, where repair_count is the number of repair attempts and threshold is the threshold for the number of repair attempts.

[0108] At the convergence guarantee level: Within a finite number of steps, the system converges to satisfy all constraints or reaches the maximum number of iterations: ∃T* < ∞, t > T*: Δ_t = ∅ or t = T_max.

[0109] The following further illustrates the scientific discovery verification method based on an embodied scientific agent provided by the present invention in conjunction with specific embodiments.

[0110] First, perform environment configuration: Set the simulation software platform to MATLAB R2024b and the Simulink environment; adopt the WebSocket full-duplex protocol for the communication protocol; adopt JSON for the message serialization format; and adopt the persistent workspace mechanism for session management.

[0111] Then, set the module parameters, including the strategic planner parameters, primitive generator parameters, runtime perception engine parameters, and reflection decision maker parameters.

[0112] Strategic planner parameters: The maximum number of subtasks for global planning n_max = 10; the maximum number of atomic steps for local planning m_max = 10; the planning timeout T_plan = 60s.

[0113] Primitive generator parameters: The code generation temperature temperature = 0.1; the maximum number of tokens max_tokens = 8132; the number of retry attempts retry_limit = 3.

[0114] Runtime perception engine parameters: The observation stream sampling interval Δt = 100ms; the numerical stability threshold ε_stable = 1e-10; the warning trigger threshold θ_warn = 0.8.

[0115] Reflection decision maker parameters: The constraint satisfaction threshold k_satisfy = 0.9; the local adjustment trigger condition |Δ| < k / 2; the global replanning trigger condition |Δ| ≥ k / 2.

[0116] Next, the dual-loop control parameters are set: fast inner loop timescale T_inner ∈ [10ms, 1s]; slow outer loop timescale T_outer ∈ [1s, 60s]; maximum number of hot repair retries repair_max = 3; loop upgrade threshold threshold = 3.

[0117] Furthermore, the communication protocol parameters are set as follows: heartbeat interval = 5s (seconds); operation timeout = 600s; maximum message queue size = 1000; session keep-alive time = 3600s.

[0118] Finally, the evaluation metrics are set: Pass@k (the probability that at least one of the k candidate solutions can pass all test cases correctly) with k = 3 in the evaluation; the accuracy calculation adopts the strict matching mode; and the performance variance calculation adopts the standard deviation measure.

[0119] Compared with existing technologies, the scientific discovery verification method and system based on embodied action and large language model proposed in this invention have the following significant advantages: (1) Significantly improves solution reliability: Through runtime awareness and hot-fix loops, the agent is able to detect potential errors and dynamically recalibrate during execution, maximizing the success rate of each solution attempt. Under the Pass@3 setting, EmbodiedAct consistently outperforms the baseline of Generative Model and Executable Code Actions Elicit Better LLM AgentsCodeAct across all model backbones.

[0120] (2) Significantly reduced performance variance: Experiments show that 81.5% of the tasks fall within a narrow divergence gap (gap≤20), which is significantly better than generative models (73.9%) and CodeAct (63.0%). It effectively avoids the "zero zone" phenomenon, that is, the situation where some attempts fail completely while others succeed.

[0121] (3) Active embodiment is the main driver of verifiable findings: ablation studies show that the performance degradation caused by removing the perceptive engine (M_perc) is far greater than that caused by removing the reflective planner (M_ref), proving that "observing the execution process" is more critical than "reflecting on the results". The w / o M_perc variant performs comparably to CodeAct, indicating that the gains provided by simply switching tools while keeping the agent in an embodied state are limited, and substantial leaps can only be unlocked when tool use is coupled with active runtime perceptiveness.

[0122] (4) Domain-specific primitives enhance the accuracy of scientific computing: The primitive generator translates intents into robust software-specific primitives (such as MATLAB-optimized solvers ode45 and linprog) rather than general-purpose, error-prone programs, ensuring that computational resources are used efficiently for high-level scientific reasoning rather than low-level debugging. On SciBench-107, the average accuracy of Generative Pre-trained Transformer (GPT)-5.2 increased from 34.58% for CodeAct to 48.60% for EmbodiedAct.

[0123] (5) Cross-platform generalization capability: The framework can be effectively generalized to different simulation engines. When switching to open source simulation software, EmbodiedAct still maintains the performance lead (65.4% vs. CodeAct's 49.4%).

[0124] (6) Bridging the performance gap of open source models: EmbodiedAct provides a powerful scaffold for open source models, compensating for their original inference gaps. For example, the open source Qwen3-235B-Instruct improved performance on the EngDesign core set from 39.6% (generative model) to 57.0% (EmbodiedAct), significantly exceeding GPT-5.2's 48.0%.

[0125] (7) Significantly reduce computational resource waste: By continuously sensing and promptly interrupting experiments destined to fail during execution, a large amount of resources are avoided from being wasted on ineffective computation. The hot-fix loop mechanism can intervene and fix problems as soon as they appear, rather than waiting for the entire execution to fail before retrying.

[0126] (8) Supporting process-oriented scientific discovery: For process-oriented scientific discovery tasks such as engineering design and complex system prototyping, this invention can capture key failures in the transient evolution process (such as voltage instability in circuit design or intermediate convergence failure in numerical optimization), rather than focusing only on the final state, thereby achieving full monitoring and optimization of dynamic system modeling.

[0127] The following describes the scientific discovery verification system based on embodied scientific agents provided by the present invention. The scientific discovery verification system based on embodied scientific agents described below can be referred to in correspondence with the scientific discovery verification method based on embodied scientific agents described above.

[0128] Figure 2 This is a schematic diagram of the scientific discovery verification system based on embodied scientific agents provided by the present invention, as shown below. Figure 2 As shown, this scientific discovery verification system based on embodied scientific agents includes: Module 201 is configured to construct a modular cognitive architecture for embodied scientific agents and determine an asynchronous state synchronization protocol based on the modular cognitive architecture, which includes problem formalization, strategic planner, primitive generator, runtime awareness engine and reflective decision maker. The mapping module 202 is configured to, based on the formalization of the problem, call the strategic planner to decompose the scientific intent of the scientific discovery into a hierarchical execution plan, and call the primitive generator to map the logical steps corresponding to the hierarchical execution plan into executable primitive actions of the set software. The simulation module 203 is configured to simulate the scientific discovery based on the executable primitive action and the asynchronous state synchronization protocol, and call the runtime perception engine to continuously receive the observation stream for state inference during the simulation process, and trigger hot repair or active interruption when the state is abnormal. The verification module 204 is configured to call the reflective decision-maker after the simulation is completed to verify the constraint satisfaction of the simulation results, and select to make local adjustments or global replanning to the hierarchical execution plan based on the verification results, so as to verify the scientific discovery.

[0129] The scientific discovery verification system based on embodied scientific agents provided by this invention transforms existing scientific software into an active embodied agent and constructs a tight perception-execution closed loop. By maintaining stateful sessions and continuous observation through asynchronous state synchronization protocols, it can monitor and correct errors in real time during transient evolution, avoiding unnecessary computational waste, thereby supporting process-oriented scientific discovery and complex engineering design tasks.

[0130] Optionally, the problem formalization is used to model the scientific intent as an intent-driven problem-solving process, forming a quintuple consisting of a state space S, an action space A, an observation space O, a scientific intent I, and a constraint set C.<S,A,O,C,I> ; Wherein, the state space S represents the potential physical state of the simulation environment; the action space A represents the set of executable operations; the observation space O includes at least one continuous observation stream; the scientific intent I is a natural language description of the scientific intent; and the constraint set C contains at least one constraint derived from the scientific intent I. The goal of solving the problem is to synthesize an optimal strategy and generate an execution trajectory such that the final state satisfies all the constraints in the constraint set C.

[0131] Optionally, the strategic planner is used to bridge the gap between the scientific intent and the executable procedure by decomposing the scientific intent into a set of constraints and the hierarchical execution plan; The mapping module 202 is specifically configured as follows: Based on the scientific intent and the current interaction history, the strategic planner prompts the large language model to perform global planning and generate at least one global task corresponding to the scientific intent. For each global task, based on real-time observation history, the strategic planner is invoked to perform local planning for the global task, generating at least one local task corresponding to the global task.

[0132] Optionally, the mapping module 202 is specifically configured as follows: The primitive generator is invoked, and the primitive generation function is used to perform topological reasoning and constraint generation on the logical steps corresponding to the hierarchical execution plan to obtain the executable primitive actions of the set software. The action types of the executable primitive actions include computational primitives, topological operation primitives, and system control primitives.

[0133] Optionally, the simulation module 203 is specifically configured as follows: The runtime perception engine is invoked during the simulation process to acquire a continuous stream of observations and the actions executed. Based on the observation stream, the action, and the state inference function, state inference is performed to obtain the current execution state, which includes any one of the normal state, risk state, and error state. When the execution state is the normal state, monitor and record the optimal parameters and intermediate results of the environmental state during the simulation process; If the execution state is the risk state, the error state, or the constraint is violated, a hotfix or active interruption is triggered.

[0134] Optionally, the verification module 204 is specifically configured as follows: The reflexive decision-maker is invoked, and the large language model is used as the evaluation mechanism to verify whether the observation flow in the simulation results satisfies all constraints in the constraint set, thereby obtaining the verification result. If the verification result is that all constraints in the constraint set are not satisfied, a set of unsatisfied constraints is determined, which includes the constraints in the constraint set that the observation flow does not satisfy. If the number of constraints in the unmet constraint set is less than a set value, and the constraints in the unmet constraint set only involve numerical precision, then a partial adjustment to the hierarchical execution plan is selected, whereby the set value is determined based on the number of constraints in the constraint set. If the number of constraints in the unsatisfied constraint set is greater than or equal to the set value, or if the constraints in the unsatisfied constraint set involve structural constraints, then a global replanning of the hierarchical execution plan is selected.

[0135] Optionally, the verification module 204 is further configured to: If the verification result satisfies all constraints in the constraint set, the output answer is checked for reasonableness. If the output answer is deemed suspicious, then answer verification feedback will be provided.

[0136] Optionally, the asynchronous state synchronization protocol includes an asynchronous decoupling and stateful session mechanism, a real-time multimodal streaming mechanism, a two-way active intervention mechanism, a message format specification, and an operation state mechanism; The asynchronous decoupling and stateful session mechanism includes a stateful session mechanism and an asynchronous decoupling mechanism; the stateful session mechanism is used to define continuous time intervals in a stateful session, and the stateful session includes a session identifier, a persistent variable workspace, an operation history, and a session state; the asynchronous decoupling mechanism is used to decouple command distribution and execution lifecycle, allowing the stateful session to maintain the persistent variable workspace and the operation history across interactions; The real-time multimodal streaming mechanism is used to push observation streams to the runtime perception engine through the operation tracker within the execution interval. The observation streams are encapsulated as standard output streams, system event sets, or dynamic simulation trajectories. The bidirectional active intervention mechanism is used to issue an interruption message when the state is abnormal, so as to actively interrupt the timing before the process crashes. The message format specification follows an enhanced message pattern, which includes at least one of the following fields: a unique message identifier, a message type enumeration, a type-specific data payload, a message creation timestamp, a session identifier for routing, related messages in the associated process, the current operation status, and the identifier of the referenced parent message. The operational state mechanism follows a finite state machine model, which includes a set of states, an input alphabet, a state transition function, an initial state, and a set of final states.

[0137] Optionally, the message types defined in the message format specification include operation lifecycle type, streaming output type, state synchronization type, and session management type.

[0138] Optionally, the simulation module 203 is specifically configured as follows: Based on the internal circulation self-correction mechanism, hot repair is triggered when the state is abnormal; The inner loop self-correction mechanism includes runtime awareness and error recovery, as well as local iteration for monitoring intermediate variables; The runtime awareness and error recovery are used to detect and fix runtime errors during the same issue; The local iterations for monitoring intermediate variables are used to monitor intermediate variables across iterations and to pass information between rounds.

[0139] Optionally, the verification module 204 is specifically configured as follows: Through the outer loop self-correction mechanism, based on the verification results, the hierarchical execution plan is selected to be locally adjusted or globally replanned. The outer loop self-correction mechanism is used for answer verification feedback. When the operation is determined to be correct but the output answer is incorrect, it automatically triggers reflection and retry and injects diagnostic feedback into the context.

[0140] Figure 3 This is a schematic diagram of the structure of the electronic device provided by the present invention, such as... Figure 3 As shown, the electronic device may include: a processor 310, a communications interface 320, a memory 330, and a communications bus 340, wherein the processor 310, the communications interface 320, and the memory 330 communicate with each other through the communications bus 340. The processor 310 can invoke logical instructions in the memory 330 to execute a scientific discovery verification method based on embodied scientific agents. This method includes: constructing a modular cognitive architecture of embodied scientific agents and determining an asynchronous state synchronization protocol based on the modular cognitive architecture, wherein the modular cognitive architecture includes problem formalization, a strategic planner, a primitive generator, a runtime awareness engine, and a reflective decision-maker; based on the problem formalization, invoking the strategic planner to decompose the scientific intent of the scientific discovery into a hierarchical execution plan, and invoking the primitive generator to map the logical steps corresponding to the hierarchical execution plan into executable primitive actions of the set software; simulating the scientific discovery based on the executable primitive actions and the asynchronous state synchronization protocol, and invoking the runtime awareness engine to continuously receive observation streams for state inference during the simulation, triggering hot repair or active interruption when the state is abnormal; after the simulation ends, invoking the reflective decision-maker to verify the constraint satisfaction of the simulation results, and selecting local adjustment or global replanning of the hierarchical execution plan based on the verification results to verify the scientific discovery.

[0141] Furthermore, the logical instructions in the aforementioned memory 330 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0142] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the scientific discovery verification method based on embodied scientific agents provided by the above methods. The method includes: constructing a modular cognitive architecture of embodied scientific agents, and determining an asynchronous state synchronization protocol based on the modular cognitive architecture. The modular cognitive architecture includes problem formalization, a strategic planner, a primitive generator, a runtime awareness engine, and a reflective decision-maker. Based on the problem formalization, the strategic planner is invoked to perform scientific discovery verification. The discovered scientific intent is decomposed into a hierarchical execution plan, and the primitive generator is invoked to map the logical steps corresponding to the hierarchical execution plan into executable primitive actions of the set software. Based on the executable primitive actions and the asynchronous state synchronization protocol, the scientific discovery is simulated, and the runtime perception engine is invoked to continuously receive the observation stream for state inference during the simulation, and to trigger hot repair or active interruption when the state is abnormal. After the simulation ends, the reflective decision-maker is invoked to verify the constraint satisfaction of the simulation results, and based on the verification results, the hierarchical execution plan is locally adjusted or globally replanned to verify the scientific discovery.

[0143] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the scientific discovery verification method based on embodied scientific agents provided by the above methods. The method includes: constructing a modular cognitive architecture of embodied scientific agents and determining an asynchronous state synchronization protocol based on the modular cognitive architecture. The modular cognitive architecture includes a problem formalization, a strategic planner, a primitive generator, a runtime awareness engine, and a reflective decision-maker. Based on the problem formalization, the strategic planner is invoked to decompose the scientific intent of the scientific discovery into a hierarchical execution plan, and the primitive generator is invoked to map the logical steps corresponding to the hierarchical execution plan into executable primitive actions of the set software. Based on the executable primitive actions and the asynchronous state synchronization protocol, the scientific discovery is simulated, and the runtime awareness engine is invoked to continuously receive observation streams for state inference during the simulation process, and to trigger hot repair or active interruption when the state is abnormal. After the simulation ends, the reflective decision-maker is invoked to verify the constraint satisfaction of the simulation results, and based on the verification results, a local adjustment or global replanning of the hierarchical execution plan is selected to verify the scientific discovery.

[0144] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across at least one network unit. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0145] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0146] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for scientific discovery verification based on embodied science agent, characterized in that, include: A modular cognitive architecture for embodied scientific agents is constructed, and an asynchronous state synchronization protocol is determined based on the modular cognitive architecture. The modular cognitive architecture includes problem formalization, strategic planner, primitive generator, runtime awareness engine, and reflective decision-maker. Based on the formalization of the problem, the strategic planner is invoked to decompose the scientific intent of the scientific discovery into a hierarchical execution plan, and the primitive generator is invoked to map the logical steps corresponding to the hierarchical execution plan into executable primitive actions of the set software. Based on the executable primitive actions and the asynchronous state synchronization protocol, the scientific discovery is simulated, and the runtime perception engine is invoked to continuously receive the observation stream for state inference during the simulation process, and to trigger hot repair or active interruption when the state is abnormal. After the simulation is completed, the reflective decision-maker is invoked to verify the constraint satisfaction of the simulation results, and based on the verification results, the hierarchical execution plan is adjusted locally or replanned globally to verify the scientific discovery.

2. The embodied science agent based scientific discovery verification method of claim 1, wherein, The formalization of the problem is used to model the scientific intent as an intent-driven problem-solving process, forming a quintuple consisting of a state space S, an action space A, an observation space O, a scientific intent I, and a constraint set C.<S,A,O,C,I> ; Wherein, the state space S represents the potential physical state of the simulation environment; the action space A represents the set of executable operations; the observation space O includes at least one continuous observation stream; the scientific intent I is a natural language description of the scientific intent; and the constraint set C contains at least one constraint derived from the scientific intent I. The goal of solving the problem is to synthesize an optimal strategy and generate an execution trajectory such that the final state satisfies all the constraints in the constraint set C.

3. The embodiment of the present application based on embodied science agent for scientific discovery verification method according to claim 1, wherein, The strategic planner is used to bridge the gap between the scientific intent and the executable procedure by decomposing the scientific intent into a set of constraints and the hierarchical execution plan; The invocation of the strategic planner decomposes the scientific intent of scientific discovery into a hierarchical execution plan, including: Based on the scientific intent and the current interaction history, the strategic planner prompts the large language model to perform global planning and generate at least one global task corresponding to the scientific intent. For each global task, based on real-time observation history, the strategic planner is invoked to perform local planning for the global task, generating at least one local task corresponding to the global task.

4. The scientific discovery verification method based on embodied scientific agents according to claim 1, characterized in that, The step of calling the primitive generator to map the logical steps corresponding to the hierarchical execution plan to executable primitive actions of the set software includes: The primitive generator is invoked, and the primitive generation function is used to perform topological reasoning and constraint generation on the logical steps corresponding to the hierarchical execution plan to obtain the executable primitive actions of the set software. The action types of the executable primitive actions include computational primitives, topological operation primitives, and system control primitives.

5. The scientific discovery verification method based on embodied scientific agents according to claim 1, characterized in that, The process of calling the runtime perception engine to continuously receive observation streams for state inference during simulation, and triggering hot repair or active interruption when the state is abnormal, includes: The runtime perception engine is invoked during the simulation process to acquire a continuous stream of observations and the actions executed. Based on the observation stream, the action, and the state inference function, state inference is performed to obtain the current execution state, which includes any one of the normal state, risk state, and error state. When the execution state is the normal state, monitor and record the optimal parameters and intermediate results of the environmental state during the simulation process; If the execution state is the risk state, the error state, or the constraint is violated, a hotfix or active interruption is triggered.

6. The embodiment of the somatic science agent based scientific discovery verification method according to claim 1, wherein, The step of calling the reflective decision-maker to verify the constraint satisfaction of the simulation results, and selecting to make local adjustments or global replanning to the hierarchical execution plan based on the verification results, includes: The reflexive decision-maker is invoked, and the large language model is used as the evaluation mechanism to verify whether the observation flow in the simulation results satisfies all constraints in the constraint set, thereby obtaining the verification result. If the verification result is that all constraints in the constraint set are not satisfied, a set of unsatisfied constraints is determined, which includes the constraints in the constraint set that the observation flow does not satisfy. If the number of constraints in the unmet constraint set is less than a set value, and the constraints in the unmet constraint set only involve numerical precision, then a partial adjustment to the hierarchical execution plan is selected, whereby the set value is determined based on the number of constraints in the constraint set. If the number of constraints in the unsatisfied constraint set is greater than or equal to the set value, or if the constraints in the unsatisfied constraint set involve structural constraints, then a global replanning of the hierarchical execution plan is selected.

7. The embodiment science discovery verification method based on embodied agent according to claim 6, characterized in that, After obtaining the verification results, the method further includes verifying whether the observed flow in the simulation results satisfies all constraints in the constraint set: If the verification result satisfies all constraints in the constraint set, the output answer is checked for reasonableness. If the output answer is deemed suspicious, then answer verification feedback will be provided.

8. The embodied science agent based scientific discovery verification method according to any one of claims 1-7, wherein, The asynchronous state synchronization protocol includes an asynchronous decoupling and stateful session mechanism, a real-time multimodal streaming mechanism, a two-way active intervention mechanism, a message format specification, and an operation state mechanism. The asynchronous decoupling and stateful session mechanism includes a stateful session mechanism and an asynchronous decoupling mechanism; the stateful session mechanism is used to define continuous time intervals in a stateful session, and the stateful session includes a session identifier, a persistent variable workspace, an operation history, and a session state; the asynchronous decoupling mechanism is used to decouple command distribution and execution lifecycle, allowing the stateful session to maintain the persistent variable workspace and the operation history across interactions; The real-time multimodal streaming mechanism is used to push observation streams to the runtime perception engine through the operation tracker within the execution interval. The observation streams are encapsulated as standard output streams, system event sets, or dynamic simulation trajectories. The bidirectional active intervention mechanism is used to issue an interruption message when the state is abnormal, so as to actively interrupt the timing before the process crashes. The message format specification follows an enhanced message pattern, which includes at least one of the following fields: a unique message identifier, a message type enumeration, a type-specific data payload, a message creation timestamp, a session identifier for routing, related messages in the associated process, the current operation status, and the identifier of the referenced parent message. The operational state mechanism follows a finite state machine model, which includes a set of states, an input alphabet, a state transition function, an initial state, and a set of final states.

9. The embodiment science discovery verification method based on embodied agent according to claim 8, characterized in that, The message types defined in the message format specification include operation lifecycle type, streaming output type, state synchronization type, and session management type.

10. The method for verifying scientific discoveries based on embodied scientific agents according to any one of claims 1-7, characterized in that, The method of triggering hot repair when the state is abnormal includes: Based on the internal circulation self-correction mechanism, hot repair is triggered when the state is abnormal; The inner loop self-correction mechanism includes runtime awareness and error recovery, as well as local iteration for monitoring intermediate variables; The runtime awareness and error recovery are used to detect and fix runtime errors during the same issue; The local iterations for monitoring intermediate variables are used to monitor intermediate variables across iterations and to pass information between rounds.

11. The method for verifying scientific discoveries based on embodied scientific agents according to any one of claims 1-7, characterized in that, The step of selecting whether to make local adjustments or global replanning to the hierarchical execution plan based on the verification results includes: Through the outer loop self-correction mechanism, based on the verification results, the hierarchical execution plan is selected to be locally adjusted or globally replanned. The outer loop self-correction mechanism is used for answer verification feedback. When the operation is determined to be correct but the output answer is incorrect, it automatically triggers reflection and retry and injects diagnostic feedback into the context.

12. A scientific discovery verification system based on embodied scientific agents, characterized in that, include: The building module is configured to construct a modular cognitive architecture for embodied scientific agents and determine an asynchronous state synchronization protocol based on the modular cognitive architecture, which includes problem formalization, strategic planner, primitive generator, runtime awareness engine and reflective decision maker. The mapping module is configured to, based on the formalization of the problem, call the strategic planner to decompose the scientific intent of the scientific discovery into a hierarchical execution plan, and call the primitive generator to map the logical steps corresponding to the hierarchical execution plan into executable primitive actions of the set software. The simulation module is configured to simulate the scientific discovery based on the executable primitive action and the asynchronous state synchronization protocol, and to call the runtime perception engine to continuously receive the observation stream for state inference during the simulation process, and to trigger hot repair or active interruption when the state is abnormal. The verification module is configured to call the reflective decision-maker after the simulation ends to verify the constraint satisfaction of the simulation results, and select to make local adjustments or global replanning to the hierarchical execution plan based on the verification results, so as to verify the scientific discovery.