Multi-agent simulation method, system and terminal based on neural posterior estimation
By constructing a training database and using neural posterior estimation methods to determine target behavior parameters, the problem of high computational cost in existing multi-agent simulation methods is solved, and high simulation accuracy is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-26
- Publication Date
- 2026-03-17
AI Technical Summary
To improve simulation accuracy, existing multi-agent simulation methods require the complete operation of numerous multi-agent simulators, resulting in high computational costs.
By constructing a training database, using observed time-series data and an initial agent model to determine target behavior parameters, and employing a neural posterior estimation method for simulation, the reliance on multi-agent simulators is reduced.
It effectively reduces computational costs, improves simulation accuracy, and reduces the operational requirements for multi-agent simulators.
Smart Images

Figure CN121683207A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of simulation and intelligent control technology, and in particular to a multi-agent simulation method, system, and terminal based on neural posterior estimation. Background Technology
[0002] Agent-based simulation is widely used in dynamic evolution modeling of complex systems such as transportation, energy, emergency evacuation, and swarm robots. Taking transportation systems as an example, each vehicle on a road can be regarded as an independent intelligent agent. By simulating and outputting vehicle trajectories, speed curves, and traffic flow trends, the actual traffic conditions can be reflected, providing a reference for signal timing optimization and congestion management.
[0003] To improve simulation accuracy, existing multi-agent simulation methods employ metaheuristic algorithms such as Particle Swarm Optimization (PSO) and Evolutionary Algorithms (EA) for parameter calibration. However, this approach requires extensive runs of the multi-agent simulator on each iteration, resulting in high computational costs.
[0004] Therefore, existing technologies still need improvement and development. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a multi-agent simulation method, system and terminal based on neural posterior estimation to address the above-mentioned defects of the prior art. The aim is to solve the problem that the prior art requires a large number of multi-agent simulators to be run during parameter calibration in order to improve the accuracy of the simulation, resulting in high computational costs.
[0006] The technical solution adopted by this invention to solve the problem is as follows: In a first aspect, embodiments of the present invention provide a multi-agent simulation method based on neural posterior estimation, wherein the method includes: Obtain the behavior parameter space and simulation model corresponding to the scenario to be simulated, and construct a training database based on the behavior parameter space and the simulation model. Each training sample in the training database includes initial behavior parameters and initial time-series simulation data corresponding to the initial behavior parameters. Acquire observation time series data and an initial agent model, and determine target behavior parameters based on the observation time series data, the training database, and the initial agent model; The simulation model is used to perform simulations based on the target behavior parameters to determine the target time-series simulation data corresponding to the scenario to be simulated.
[0007] In one implementation method, constructing a training database based on the behavioral parameter space and the simulation model includes: Obtain the preset parameter value range, and use Latin hypercube sampling to uniformly sample the behavior parameter space to determine the initial behavior parameters for each group. The simulation model generates time-series simulation data of different durations based on the initial behavioral parameters of each group. The timing simulation data of different time lengths are filled to a preset length using zero-padding to determine the initial timing simulation data; The training database is determined based on the initial behavioral parameters of each group and the initial time-series simulation data of each group.
[0008] In one implementation method, determining target behavior parameters based on the observed time-series data, the training database, and the initial agent model includes: Obtain a first training set from the training database, train the initial agent model based on the first training set, and determine the global agent model; The steps of iteratively executing a preset number of times to determine the candidate behavior parameters for each group based on the training database, the observed time-series data, the global proxy model, and the initial proxy model; The target behavior parameters are determined based on the candidate behavior parameters of each group at the preset iteration number.
[0009] In one implementation method, determining each group of candidate behavior parameters based on the training database, the observed time-series data, the global agent model, and the initial agent model includes: Each local trust domain is determined based on the observed time-series data and the global proxy model; A second training set is selected from the training database based on each local trust domain, and the initial agent model is trained based on the second training set to determine the local agent model; The candidate behavior parameters for each group are determined based on the observed time-series data and the local proxy model.
[0010] In one implementation method, determining each local trust domain based on the observed time-series data and the global proxy model includes: The global proxy model determines the posterior distribution of global parameters based on the observed time-series data. The basin jump global optimization algorithm is used to determine the peak values of each distribution based on the posterior distribution of each global parameter, and each distribution peak value is used as the center of each trust domain. Obtain the trust domain range, and determine each local trust domain based on the trust domain center and the trust domain range.
[0011] In one implementation method, determining each group of candidate behavior parameters based on the observed time-series data and the local proxy model includes: The local trust domains are determined based on the observed time-series data using the local proxy model. Negative correlation search is used to determine the parameters of each candidate behavior based on the local trust domains.
[0012] In one implementation, the method further includes: The simulation model is used to determine candidate time-series simulation data based on the candidate behavioral parameters of each group. Each mean square error is determined based on the observed time series data and each of the candidate time series simulation data; The local trust domain is updated based on the mean squared error of each group and the candidate behavior parameters of each group.
[0013] Secondly, embodiments of the present invention also provide a multi-agent simulation system based on neural posterior estimation, wherein the multi-agent simulation system based on neural posterior estimation includes: The data acquisition module is used to acquire the behavior parameter space and simulation model corresponding to the scenario to be simulated, and to construct a training database based on the behavior parameter space and the simulation model. Each training sample in the training database includes initial behavior parameters and initial time-series simulation data corresponding to the initial behavior parameters. The parameter calibration module is used to acquire observation time-series data and an initial agent model, and to determine target behavior parameters based on the observation time-series data, the training database, and the initial agent model. The target simulation module is used to perform simulation based on the target behavior parameters using a simulation model to determine the target time-series simulation data corresponding to the scenario to be simulated.
[0014] Thirdly, embodiments of the present invention also provide a terminal, the terminal including a memory and one or more processors; the memory stores one or more programs; the programs include instructions for executing the multi-agent simulation method based on neural posterior estimation as described above; the processor is used to execute the programs.
[0015] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a plurality of instructions, wherein the instructions are adapted to be loaded and executed by a processor to implement any of the above-described multi-agent simulation methods based on neural posterior estimation.
[0016] The beneficial effects of this invention are as follows: In this embodiment, the behavioral parameter space and simulation model corresponding to the scenario to be simulated are obtained. A training database is constructed based on the behavioral parameter space and simulation model, with each training sample including initial behavioral parameters and initial temporal simulation data. Observational temporal data and an initial agent model are obtained. Target behavioral parameters are determined based on the observational temporal data, the training database, and the initial agent model. Simulation is performed using the simulation model based on the target behavioral parameters to determine the target temporal simulation data corresponding to the scenario to be simulated. Since this invention obtains the calibrated target behavioral parameters based on the training database and agent model corresponding to the scenario to be simulated, it eliminates the need to run a large number of multi-agent simulators. Therefore, it effectively solves the problem of high computational costs associated with running a large number of multi-agent simulators during parameter calibration to improve simulation accuracy. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present 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 only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart illustrating the multi-agent simulation method based on neural posterior estimation provided in an embodiment of the present invention.
[0019] Figure 2 This is a schematic diagram illustrating the specific implementation process of the multi-agent simulation method based on neural posterior estimation provided in this embodiment of the invention.
[0020] Figure 3 This is a schematic diagram of the internal modules of a multi-agent simulation system based on neural posterior estimation provided in an embodiment of the present invention.
[0021] Figure 4 This is a schematic diagram of the terminal provided in the embodiment of the present invention. Detailed Implementation
[0022] This invention discloses a multi-agent simulation method, system, and terminal based on neural posterior estimation. To make the objectives, technical solutions, and effects of this invention clearer and more explicit, the invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only for explaining the invention and are not intended to limit the invention.
[0023] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this specification means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.
[0024] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0025] Agent-based simulation is widely used in dynamic evolution modeling of complex systems such as transportation, energy, emergency evacuation, and swarm robots. Taking transportation systems as an example, each vehicle on a road can be regarded as an independent intelligent agent. By simulating and outputting vehicle trajectories, speed curves, and traffic flow trends, the actual traffic conditions can be reflected, providing a reference for signal timing optimization and congestion management.
[0026] To improve simulation accuracy, existing multi-agent simulation methods employ metaheuristic algorithms such as Particle Swarm Optimization (PSO) and Evolutionary Algorithms (EA) for parameter calibration. However, this approach requires extensive runs of the multi-agent simulator on each iteration, resulting in high computational costs.
[0027] To address the aforementioned shortcomings of existing technologies, this invention provides a multi-agent simulation method based on neural posterior estimation. The method acquires the behavioral parameter space and simulation model corresponding to the scenario to be simulated; constructs a training database based on the behavioral parameter space and simulation model, with each training sample including initial behavioral parameters and initial temporal simulation data; acquires observed temporal data and an initial agent model; determines target behavioral parameters based on the observed temporal data, training database, and initial agent model; and performs simulation based on the target behavioral parameters using the simulation model to determine the target temporal simulation data corresponding to the scenario to be simulated. Since this invention obtains the calibrated target behavioral parameters based on the training database and agent model corresponding to the scenario to be simulated, it eliminates the need to run a large number of multi-agent simulators. Therefore, it effectively solves the problem of high computational costs associated with running numerous multi-agent simulators during parameter calibration to improve simulation accuracy.
[0028] Exemplary method: like Figure 1 As shown, the method includes: Step S100: Obtain the behavior parameter space and simulation model corresponding to the scenario to be simulated, and construct a training database based on the behavior parameter space and the simulation model. Each training sample in the training database includes initial behavior parameters and initial time-series simulation data corresponding to the initial behavior parameters.
[0029] The simulation scenario refers to a real or virtual scenario to be simulated using simulation technology, such as a traffic simulation scenario, a bridge structure simulation scenario under earthquake action, a factory production line scheduling simulation scenario, and an urban subway passenger flow evacuation simulation scenario. Each simulation scenario corresponds to different behavioral parameters. Behavioral parameters are quantitative indicators used to define the action patterns, interaction rules, and operational laws of various intelligent agents or objects in the scenario. Taking a traffic simulation scenario as an example, each vehicle in the road is considered an independent intelligent agent, driving and interacting in a virtual road network based on behavioral parameters such as reaction time delay, expected speed, distance tolerance, and acceleration threshold, thereby generating macroscopic traffic flow evolution laws. The behavioral parameter space of the simulation scenario is determined by the corresponding behavioral parameters and their value ranges. The simulation model is used to reproduce the state changes, interaction relationships, and evolution laws of each object in the simulation scenario, outputting analyzable time-series simulation data. Different simulation scenarios correspond to different simulation models.
[0030] After obtaining the behavior parameter space and simulation model corresponding to the scenario to be simulated, several initial behavior parameters are obtained from the behavior parameter space. Initial time-series simulation data are obtained through the simulation model based on each set of initial behavior parameters, and a training database is constructed based on the initial behavior parameters and initial time-series simulation data.
[0031] In one implementation, constructing a training database based on the behavioral parameter space and the simulation model includes: Step S101: Obtain the preset parameter value range, and use Latin hypercube sampling to uniformly sample the behavior parameter space to determine the initial behavior parameters for each group; Step S102: Generate time-series simulation data of different durations based on the initial behavioral parameters of each group using the simulation model; Step S103: Fill the timing simulation data of different time lengths to a preset length using zero padding to determine the initial timing simulation data; Step S104: Determine the training database based on the initial behavioral parameters of each group and the initial time-series simulation data of each group.
[0032] Based on the preset parameter value range, Latin Hypercube Sampling (LHS) is used to uniformly sample the behavior parameter space to obtain each set of initial behavior parameters. The simulation model then generates time-series simulation data corresponding to each set of initial behavior parameters. During the generation of time-series simulation data based on different sets of initial behavior parameters, the simulation model can be randomly set to different time windows to obtain time-series simulation data of varying lengths, thus enhancing the temporal coverage of the training samples. The length of the time-series simulation data is less than or equal to the preset maximum length. For time-series simulation data of different lengths, a zero-padding strategy is used to expand them to a uniform length to ensure data consistency and integrity. Each set of initial behavior parameters and the corresponding initial time-series simulation data obtained above are used to construct a training sample. Multiple training samples are constructed to obtain a training database. By uniformly sampling the behavioral parameter space and generating time-series simulation data of different lengths, the constructed training database has a balanced distribution and a wide coverage, which can significantly improve the robustness and generalization ability of subsequent model training and provide reliable data support for parameter estimation and calibration.
[0033] Step S200: Obtain observation time series data and initial agent model, and determine target behavior parameters based on the observation time series data, the training database and the initial agent model; Observational time-series data refers to the scene state, behavioral outcomes, and parameter changes of the simulated scene, collected sequentially over time by detection devices (such as coil detectors, radar, or cameras). This data serves as the basis for calibrating and validating the time-series simulation data generated by the simulation model. Running a complete simulation model requires significant computational resources; using a surrogate model to replace real-world evaluation can reduce computational costs. By obtaining training data from a training database, training the initial surrogate model, and then correcting it using observational time-series data, more accurate target behavior parameters can be obtained with lower computational costs. This allows the simulation model to more accurately simulate the state of the scene to be simulated based on these target behavior parameters.
[0034] In this embodiment, the initial surrogate model uses the APT (Automatic Posterior Transformation) framework as the core tool for surrogate modeling. APT supports the integration of custom embedding networks to extract input features and can be combined with neural density estimation methods such as Mixture Density Networks (MDN) or Normalizing Flows. The two can be trained together to improve the flexibility and accuracy of posterior modeling.
[0035] In one implementation, determining the target behavior parameters based on the observed time-series data, the training database, and the initial agent model includes: Step S201: Obtain the first training set from the training database, train the initial agent model based on the first training set, and determine the global agent model; Step S202: Iteratively execute the step of determining the candidate behavior parameters of each group based on the training database, the observation time series data, the global agent model, and the initial agent model a preset number of times; Step S203: Determine the target behavior parameters based on the candidate behavior parameters of each group at the preset iteration number.
[0036] The first training set is obtained from the training database. The training samples in the first training set can be all training samples in the training database. The initial proxy model is then globally trained using the first training set, and the trained initial proxy model is used as the global proxy model. The global proxy model can realize the transformation from the prior distribution to the posterior distribution of the behavioral parameters. To improve the accuracy of the posterior distribution, the steps of parameter calibration based on the training data, observed time-series data, the global proxy model, and the initial proxy model are iteratively executed to obtain each group of candidate behavioral parameters. In this embodiment, the preset number of iterations is 900. After the preset number of iterations is completed, the simulation model generates candidate time-series simulation data corresponding to each group of candidate behavioral parameters based on the candidate behavioral parameters corresponding to the last iteration. Each candidate time-series simulation data is compared with the observed time-series data, and the candidate behavioral parameter corresponding to the candidate time-series simulation data with the highest accuracy is used as the target behavioral parameter.
[0037] In one implementation, determining each group of candidate behavior parameters based on the training database, the observed time-series data, the global proxy model, and the initial proxy model includes: Step S2021: Determine each local trust domain based on the observed time series data and the global proxy model; Step S2022: Select a second training set from the training database according to each local trust domain, and train the initial agent model according to the second training set to determine the local agent model; Step S2023: Determine the candidate behavior parameters for each group based on the observed time series data and the local proxy model.
[0038] Determining each local trust domain based on the observed time-series data and the global proxy model includes: determining the posterior distribution of global parameters based on the observed time-series data using the global proxy model; determining each distribution peak (the distribution peak with higher probability) based on the posterior distribution of each global parameter using the basinhopping global optimization algorithm, and using each distribution peak as the center of each trust domain; obtaining the range of the trust domain, and determining each local trust domain based on the center of each trust domain and the range of the trust domain.
[0039] Based on each local trust domain, training samples (up to 3000 samples) are selected from the training database as the second training set. The initial agent model is trained using the second training dataset to obtain a local agent model, which allows for more accurate parameter optimization of local regions.
[0040] The posterior distribution of each local parameter is determined based on observed time-series data using a local surrogate model. Negatively Correlated Search (NCS) is employed to determine candidate behavioral parameters based on the posterior distribution of each local parameter, maintaining search diversity across multiple subgroups. In this embodiment, NCS is applied within each local trust domain to generate diverse candidate behavioral parameters under the guidance of the local surrogate model. Even if the surrogate posterior distribution in a certain local trust domain tends to be unimodal, NCS ensures broad coverage of the parameter space by maintaining the negative correlation between search behaviors. This design can obtain candidate behavioral parameters with both high fitness and diverse distributions, thereby helping the surrogate model gradually correct estimation biases and effectively reducing the risk of premature convergence. It avoids the problem of insufficient accuracy in parameter estimation caused by correcting parameters solely based on the similarity between simulation output and observed time-series data.
[0041] In one implementation, the method further includes: The simulation model is used to determine candidate time-series simulation data based on the candidate behavioral parameters of each group. Each mean square error is determined based on the observed time series data and each of the candidate time series simulation data; The local trust domain is updated based on the mean squared error of each group and the candidate behavior parameters of each group.
[0042] During the iteration process, candidate time-series simulation data can be generated based on each set of candidate behavioral parameters using the simulation model. The mean squared error (MSE) is calculated using the observed time-series data and each time-series simulation data. The set of candidate behavioral parameters corresponding to the time-series simulation data with the smallest MSE is selected as the center of each trust domain for the next iteration. A local trust domain is then generated based on this trust domain center and its range for use in the next iteration. Simultaneously, this set of candidate behavioral parameters and candidate time-series simulation data forms training samples and is added to the training database. This increases the number of training samples in the training database, reducing the workload of building the training database in the initial stage. Furthermore, when external observed time-series data undergoes slight changes or the simulation scenario changes (scenario changes within the same domain), the training database can still be reused without needing to be rebuilt each time.
[0043] When the number of times the center of the trust domain is modified exceeds a preset number (e.g., 3 or 5 times), the range of the trust domain is adjusted. This embodiment employs a trust domain mechanism inspired by the Trust Domain Bayesian Optimization Algorithm (TuRBO algorithm) to dynamically adjust the region radius based on the optimization performance of the trust domain: when there are consecutive improvements, the search range is expanded to enhance global exploration; when there are consecutive no improvements, the range is reduced to strengthen local refinement. Through this mechanism, the algorithm can automatically concentrate computational resources on high-potential regions and eliminate inefficient regions, thereby improving evaluation efficiency and accelerating convergence.
[0044] Step S300: Perform simulation based on the target behavior parameters using a simulation model to determine the target time-series simulation data corresponding to the scenario to be simulated.
[0045] In simple terms, a multi-agent simulation model is used to simulate the target behavior parameters based on the calibrated parameters, generating target time-series simulation data to reflect the state change process of the simulated scenario. Specific implementation examples: A path-guided particle sampling framework (PGPS) is used to simulate a double-auction market where agents continuously submit, cancel, and execute orders. This market comprises 250 agents, half of whom are liquidity providers and the other half are liquidity takers. Liquidity providers submit limit orders near the current mid-price, while liquidity takers remove liquidity directly from the order book by generating market orders. Both types of agents operate according to fixed probabilities of order submission, cancellation, and buy / sell direction selection, thus ensuring the continuity and stability of buying and selling activity in the market.
[0047] Data (including order submission, cancellation, and execution data) from the aforementioned two-way auction market over a period of time is obtained as observation time-series data. A proxy model is then constructed based on this observation time-series data to determine the target behavior parameters. The process is as follows: Figure 2 As shown, it includes the simulation and training data generation stage, the global model training stage, and the parameter calibration stage.
[0048] In the simulation and training data generation phase, parameters are sampled according to the range (preset parameter value range) to obtain initial behavioral parameters. After generating time-series simulation data based on each initial behavioral parameter through a simulation model or simulation platform, zero-padding is performed on each time-series simulation data to obtain initial time-series simulation data. A training database is constructed based on each initial behavioral parameter and each initial time-series simulation data. Specifically, in this embodiment, the PGPS model has six adjustable parameters. A total of 20,000 parameters are sampled using the hyper-Latin cube sampling method. For each parameter, six different lengths of time-series data [600, 1200, 1800, 2400, 3000, 3600] are generated, resulting in a total of 120,000 training samples, which are then input into the training database for storage.
[0049] During the global model training phase, the initial surrogate model comprises two parts: a custom neural network and a mixed density network. The custom neural network learns and represents features from the training samples, while the mixed density network (MDN) and normalizing flows transform the prior distribution of behavioral parameters into a posterior distribution. This trained initial surrogate model is then used as the global surrogate model (neural density estimator). Specifically, a five-layer fully connected CNN is used to extract features from 3600-dimensional temporal data to 64 dimensions, with ReLU activation applied between each layer.
[0050] During the parameter calibration phase, observed data (time-series observed data) are input into the neural density estimator to obtain the global parameter posterior distribution. The neural density estimator can also be constructed based on convolutional neural networks (CNN), long short-term memory networks (LSTM), or self-attention networks (Transformers) to enhance the feature extraction capability of the input time-series data. The trust domain control module determines each local trust domain based on the global parameter posterior distribution. This trust domain control module can also be implemented using reinforcement learning or Bayesian optimization mechanisms. The local model training module obtains a second training set from the training database according to each local trust domain. The training set and the initial surrogate model are used to train a local surrogate model. The candidate solution generation module inputs the observed data (time series data) into the local surrogate model to obtain the candidate behavior parameters. The candidate solutions can be obtained by methods such as Markov chain Monte Carlo sampling or aged hypercube sampling to meet the needs of different simulation tasks. The simulation execution module calls the simulation model to generate time series simulation data based on the candidate behavior parameters. The feedback update module compares and calculates the time series simulation data with the observed time series data and feeds the results back to the trust domain control module to adjust the trust domain center and trust domain range. After the iteration is completed, the calibrated target behavior parameters are obtained.
[0051] Based on the above embodiments, the present invention also provides a multi-agent simulation system based on neural posterior estimation, such as... Figure 3 As shown, the system includes: Data acquisition module 01 is used to acquire the behavior parameter space and simulation model corresponding to the scenario to be simulated, and to construct a training database based on the behavior parameter space and the simulation model. Each training sample in the training database includes initial behavior parameters and initial time-series simulation data corresponding to the initial behavior parameters. The parameter calibration module 02 is used to acquire observation time series data and an initial agent model, and to determine target behavior parameters based on the observation time series data, the training database and the initial agent model. The target simulation module 03 is used to perform simulation based on the target behavior parameters through a simulation model to determine the target time-series simulation data corresponding to the scenario to be simulated.
[0052] Based on the above embodiments, the present invention also provides a terminal, the principle block diagram of which can be as follows: Figure 4 As shown, the terminal includes a processor, memory, network interface, and display screen connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides the environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a multi-agent simulation method based on neural posterior estimation. The display screen can be a liquid crystal display (LCD) or an e-ink display.
[0053] Those skilled in the art will understand that Figure 4 The schematic diagram shown is merely a partial structural diagram related to the present invention and does not constitute a limitation on the terminal to which the present invention is applied. A specific terminal may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0054] In one implementation, the terminal's memory stores one or more programs, and these programs are configured to be executed by one or more processors, and the programs contain instructions for performing a multi-agent simulation method based on neural posterior estimation.
[0055] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0056] In summary, this invention discloses a multi-agent simulation method, system, and terminal based on neural posterior estimation. The method acquires the behavioral parameter space and simulation model corresponding to the scenario to be simulated; constructs a training database based on the behavioral parameter space and simulation model, with each training sample including initial behavioral parameters and initial temporal simulation data; acquires observed temporal data and an initial agent model; determines target behavioral parameters based on the observed temporal data, training database, and initial agent model; and performs simulation based on the target behavioral parameters using the simulation model to determine the target temporal simulation data corresponding to the scenario to be simulated. Since this invention obtains the calibrated target behavioral parameters based on the training database and agent model corresponding to the scenario to be simulated, it eliminates the need to run a large number of multi-agent simulators, thus effectively solving the problem of high computational costs associated with running numerous multi-agent simulators during parameter calibration to improve simulation accuracy.
[0057] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.
Claims
1. A method for multi-agent simulation based on neural posterior estimation, characterized in that, The method comprises: acquiring a behavior parameter space and a simulation model corresponding to a to-be-simulated scene, constructing a training database according to the behavior parameter space and the simulation model, each training sample in the training database comprising an initial behavior parameter and initial time-series simulation data corresponding to the initial behavior parameter; acquiring observed time-series data and an initial surrogate model, determining a target behavior parameter according to the observed time-series data, the training database and the initial surrogate model; performing simulation according to the target behavior parameter through a simulation model to determine target time-series simulation data corresponding to the to-be-simulated scene.
2. The multi-agent simulation method based on neural posterior estimation according to claim 1, characterized in that, The method comprises: acquiring a preset parameter value range, uniformly sampling the behavior parameter space by using Latin hypercube sampling to determine each group of initial behavior parameters; generating time-series simulation data of different lengths based on each group of the initial behavior parameters through the simulation model; filling each group of the time-series simulation data of different lengths to a preset length by using zero padding to determine the initial time-series simulation data; determining the training database according to each group of the initial behavior parameters and each group of the initial time-series simulation data.
3. The multi-agent simulation method based on neural posterior estimation according to claim 1, characterized in that, The method comprises: acquiring a first training set from the training database, training the initial surrogate model according to the first training set to determine a global surrogate model; iteratively performing a preset number of times of a step of determining each group of candidate behavior parameters according to the training database, the observed time-series data, the global surrogate model and the initial surrogate model; determining the target behavior parameter according to each group of the candidate behavior parameters of the preset number of iterations.
4. The multi-agent simulation method based on neural posterior estimation according to claim 3, characterized in that, The method comprises: determining each local trust domain according to the observed time-series data and the global surrogate model; selecting a second training set from the training database according to each local trust domain, training the initial surrogate model according to the second training set to determine a local surrogate model; determining each group of candidate behavior parameters according to the observed time-series data and the local surrogate model.
5. The method of claim 4, wherein, The method comprises: determining a global parameter posterior distribution according to the observed time-series data through the global surrogate model; determining each distribution peak value according to each global parameter posterior distribution through a basin-hopping global optimization algorithm, and taking each distribution peak value as a center of each trust domain; acquiring a trust domain range, and determining each local trust domain according to each trust domain center and the trust domain range.
6. The multi-agent simulation method based on neural posterior estimation according to claim 4, characterized in that, The method comprises: determining each local trust domain according to the observed time-series data through the local surrogate model; determining each candidate behavior parameter according to each local trust domain by using a negative correlation search.
7. The multi-agent simulation method based on neural posterior estimation according to claim 5, characterized in that, The method further comprises: determining candidate time sequence simulation data according to each group of the candidate behavior parameters through the simulation model respectively; determining each mean square error according to the observation time sequence data and each candidate time sequence simulation data; updating the local trust domain according to each mean square error and each group of the candidate behavior parameters.
8. A multi-agent simulation system based on neural posterior estimation, characterized in that, The system comprises: a data acquisition module, configured to acquire a behavior parameter space and a simulation model corresponding to a to-be-simulated scene, construct a training database according to the behavior parameter space and the simulation model, and each training sample in the training database comprises initial behavior parameters and initial time sequence simulation data corresponding to the initial behavior parameters; a parameter calibration module, configured to acquire observation time sequence data and an initial agent model, and determine target behavior parameters according to the observation time sequence data, the training database and the initial agent model; a target simulation module, configured to perform simulation according to the target behavior parameters through a simulation model, and determine target time sequence simulation data corresponding to the to-be-simulated scene.
9. A terminal, characterized by comprising: The terminal comprises a memory and one or more processors; the memory stores one or more programs; the programs contain instructions for executing the multi-agent simulation method based on neural posterior estimation according to any one of claims 1-7; and the processor is configured to execute the programs.
10. A computer readable storage medium having stored thereon a plurality of instructions, the plurality of instructions comprising: The instructions are loaded and executed by the processor to implement the steps of the multi-agent simulation method based on neural posterior estimation according to any one of claims 1-7.