BattleAgent: Multi-modal Dynamic Emulation on Historical Battles to Complement Historical Analysis
Shuhang Lin Wenyue Hua Lingyao Li Che-Jui Chang Lizhou Fan Jianchao Ji Hang Hua Mingyu Jin Jiebo Luo Yongfeng Zhang





 
    
       
            
       
       
       
      
















[itemize]leftmargin=*
[enumerate]leftmargin=*
 ./images/ 


mystyle
  backgroundcolor=, commentstyle=,
  keywordstyle=,
  numberstyle=,
  stringstyle=,
  basicstyle=,
  breakatwhitespace=false,         
  breaklines=true,                 
  captionpos=b,                    
  keepspaces=true,                 
  numbers=left,                    
  numbersep=5pt,                  
  showspaces=false,                
  showstringspaces=false,
  showtabs=false,                  
  tabsize=2



style=mystyle






demonstration
  
    
    width 2pt
    width 4pt
    
  -
  
  1pt7pt
  




  















[itemize]leftmargin=*
[enumerate]leftmargin=*
 ./images/ 


mystyle
  backgroundcolor=, commentstyle=,
  keywordstyle=,
  numberstyle=,
  stringstyle=,
  basicstyle=,
  breakatwhitespace=false,         
  breaklines=true,                 
  captionpos=b,                    
  keepspaces=true,                 
  numbers=left,                    
  numbersep=5pt,                  
  showspaces=false,                
  showstringspaces=false,
  showtabs=false,                  
  tabsize=2



style=mystyle
















#1@xdefthanksthanks
        #1













BattleAgent: Multi-modal Dynamic Emulation on Historical Battles to Complement Historical Analysis
    
 Shuhang Lin^* 

 Rutgers University
 Wenyue Hua^* 

 Rutgers University
 Lingyao Li

 University of Michigan
 Che-Jui Chang

 Rutgers University
 Lizhou Fan

 University of Michigan
 Jianchao Ji 

 Rutgers University
 Hang Hua 

 University of Rochester
 Mingyu Jin 

 Rutgers University
 Jiebo Luo 

 University of Rochester
 Yongfeng Zhang^*Shuhang Lin and Wenyue Hua have equal contributions. Author Emails: {shuhang.lin,wenyue.hua, yongfeng.zhang}@rutgers.edu 

 Rutgers University

    April 29, 2024
============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================





This paper presents BattleAgent, a detailed emulation demonstration system that combines the Large Vision-Language Model (VLM) and Multi-Agent System (MAS). This novel system aims to simulate complex dynamic interactions among multiple agents, as well as between agents and their environments, over a period of time. It emulates both the decision-making processes of leaders and the viewpoints of ordinary participants, such as soldiers. The emulation showcases the current capabilities of agents, featuring fine-grained multi-modal interactions between agents and landscapes. It develops customizable agent structures to meet specific situational requirements, for example, a variety of battle-related activities like scouting and trench digging. These components collaborate to recreate historical events in a lively and comprehensive manner while offering insights into the thoughts and feelings of individuals from diverse viewpoints. The technological foundations of BattleAgent establish detailed and immersive settings for historical battles, enabling individual agents to partake in, observe, and dynamically respond to evolving battle scenarios. This methodology holds the potential to substantially deepen our understanding of historical events, particularly through individual accounts. Such initiatives can also aid historical research, as conventional historical narratives often lack documentation and prioritize the perspectives of decision-makers, thereby overlooking the experiences of ordinary individuals. This biased documentation results in a considerable gap in our historical understanding, as many stories remain untold. BattleAgent leverages the current advancements in Artificial Intelligence (AI) to provide some insights to bridge this gap. It illustrates AI's potential to revitalize the human aspect in crucial social events, thereby fostering a more nuanced collective understanding and driving the progressive development of human society. Quantitative evaluations are computed on the final emulation result, showing reasonable performance and effectiveness of the approach. The data and code for this project are accessible at <https://github.com/agiresearch/battleagent> and the demo will be released in one  month.





§ INTRODUCTION

An agent is defined as a system that has the ability to perceive its surroundings and make informed decisions based on these perceptions to accomplish specific objectives <cit.>. The recent progress in Large Language Models (LLMs) <cit.> has demonstrated impressive reasoning capabilities <cit.>, indicating their potential to serve as the foundation for agents. These models have shown remarkable proficiency in following instructions <cit.>, interpreting commands, and emulating human reasoning and learning processes <cit.>. Additionally, the development of large Vision Language Models (VLM) <cit.> has facilitated the creation of various agent applications that support multi-modal information interaction <cit.>. When combined with external tools, either physical or virtual, these agents employ LLMs or VLM as their reasoning backbone to determine how tasks should be addressed, how tools should be utilized, and what information should be retained in memory. This enhancement equips agents to manage an array of natural language processing tasks and engage with their environment using language.

A multitude of agent applications have been created using LLM and VLM, with a focus on enhancing reasoning <cit.>, production capabilities <cit.>, gaming <cit.>, and social simulation <cit.>, among others. WarAgent <cit.> is the pioneering LLM-based MAS simulation of historical events, examining the behaviors of systems at the macro level, such as nations and governments, rather than the micro-level simulation of detailed and dynamic events occurring during battles or individual experiences in such dynamic time periods. Therefore, BattleAgent, building on the foundation laid by WarAgent in historical event simulation, investigates the potential of LLM and VLM for detailed historical situation recovery and the exploration of individual experiences within the simulation.



The study of history has long been a pursuit to understand the human experience through the lens of past events. Traditional historical narratives often focus on the perspectives of leaders and decision-makers, leaving the experiences of ordinary individuals in the shadows. This selective approach to history has created a significant gap in our understanding, as the stories and experiences of the common participants, such as soldiers, are frequently overlooked. The motivation behind this research is to address this imbalance and provide a more comprehensive view of historical events by leveraging advancements in AI. Oral history <cit.> has been one method used to capture the experiences of individuals, offering a more personal account of historical events. However, this approach is limited to recent history and is constrained by the availability of witnesses, often leaving many details undiscovered. As we move further away from events in time, the voices of those who lived through them fade, and with them, the richness of history's tapestry. 

In response to these challenges, our study introduces BattleAgent, a novel emulation framework that utilizes LMM-based MAS for the detailed reconstruction of historical events, with an emphasis on delineating the experiences of ordinary individuals, notably soldiers.  BattleAgent emulates historical combats within complex terrains and hierarchical command structures, incorporating sophisticated military logistics and strategic planning. Central to our model, we meticulously craft 30 individual soldier agents, each endowed with a richly detailed background and a distinct personality, thereby infusing them with vibrancy and depth. BattleAgent is designed to emulate and document the experiences of these agents, capturing their actions, injuries, emotional responses, and psychological states throughout the course of the battles. By analyzing these elements, we generate personalized narratives that reflect the multifaceted experiences of ordinary individuals engaged in warfare. This approach not only immortalizes the actions and sentiments of these agents but also furnishes a nuanced, individualized perspective on the common soldier's experience within the broader tapestry of historical conflict.

To emulate such a complex scenario, our emulation incorporates the following three key features:

    
  * Enhanced 2-D Realism Features: BattleAgent simulates detailed interactions within environments, including terrain engagement, temporal progression, and interactions between agents.
    
  * Immersive Multi-agent Interactions: It integrates MAS to facilitate dynamic interactions among agents in battle emulations, accurately reflecting the historical milieu and the intricacies of military engagements, from strategic maneuvers to logistical considerations and communication dynamics.
    
  * Dynamic Agent Structure: The framework introduces adaptable agent configurations and multi-modal interactions. The system can “self improvise” its structure to fork, merge, and prune agents to continuously maintain the emulation effectiveness. It boasts the capability to autonomously adjust its architecture to optimize emulation fidelity.


The contributions of our study to historical analysis and society can be summarized as follows:

    
  * Emphasis on individual perspectives and granularity: Providing a platform for the voices of common people to be heard and understood in historical events. This platform aims to enhance the accuracy of historical reconstructions by incorporating individual perspectives. 
    
  * Connection and resonance with the past: Helping to prevent future conflicts by learning from the detailed analysis of past mistakes and human costs. This platform fosters empathy and a deeper connection to the past by humanizing the experiences of those involved in historical battles. 
    
  * Educational tool for understanding history: Providing an educational tool to help people understand the intricacies of history and the harsh realities of historical events. Its immersive and interactive platform can foster empathy and a more nuanced perspective on the past, making it a valuable resource for students and history enthusiasts. 
    
  * Potential as a next-generation game engine: Providing a fully automated process to create immersive and dynamic historical emulations, making it a potential next-generation game engine. By using LLM-based agents and VLM-based agents, it can generate detailed and realistic environments, characters, and events, offering a unique and engaging gaming experience.






§ RELATED WORK




 §.§ Multi-Agent System


MAS has revolutionized the landscape of AI, offering a platform for simulating complex interactions and scenarios <cit.>. With the development of the reasoning intelligence of LLMs, especially their outstanding reasoning ability in complex scenarios <cit.>, the integration of MAS into AI systems has demonstrated their versatility and efficacy. The initial classification of MAS into reasoning-enhancement, non-player character (NPC) multi-agent players, and production-enhancement systems has been foundational in understanding their diverse applications. Notable developments such as LLM-Debate <cit.>, ChatEval <cit.>, and MAD <cit.> have significantly advanced reasoning-enhancement systems. Similarly, in NPC multi-agent systems, the emergence of Generative Agents <cit.> and GPT-Bargaining <cit.> has paved the way for more human-like agent behaviors. In the production-enhancement domain, innovations like MetaGPT <cit.> and OpenAGI <cit.> have streamlined and enhanced collaborative efforts in software development. Many works have also explored agents' potential in scientific experiments <cit.> setting.

In the context of humanities and historical research, the WarAgent <cit.> initiative has exemplified the application of LLM-based MAS for simulating international conflicts, with each agent representing a different country to explore the dynamics of international relations and conflicts. Building on the humanitarian insights gleaned from WarAgent, our study seeks to refine this approach by concentrating on the granular emulation of historical scenarios from the vantage point of ordinary individuals. This shift towards focusing on the micro-level experiences within historical events aims to provide a more detailed and empathetic understanding of the past, leveraging the advancements in MAS and LLM technologies to capture the nuanced perspectives of common people in historical narratives. By doing so, we aspire to enrich the tapestry of historical understanding with a deeper, more inclusive examination of human experiences during pivotal moments in history.

Recent advancements in multi-modal multi-agent AI systems have further expanded the capabilities of MAS. AppAgent <cit.> demonstrates the use of multimodal agents as smartphone users, enhancing our understanding of human-computer interactions. The integration of generative AI and multi-modal agents in AWS <cit.> has unlocked new potentials in financial markets. LLaVA-Plus's contribution <cit.> in teaching agents to use various tools has opened up new avenues for agent adaptability and functionality. Furthermore, the implementation of “multimodal chain-of-action agents” <cit.> has provided a novel perspective on agent interaction with digital interfaces, contributing to more intuitive user interface designs and realistic simulations in digital realms.

BattleAgent emulation is the first large multimodal model-based multi-agent application that introduces a novel quantitative dimension to historical and humanities studies and underscores the broader impact of AI in understanding human history and shaping future scenarios. By exploring alternative historical pathways and key determinants, our work demonstrates the significant contributions of LMM and MAS in enhancing our comprehension of the past and potentially guiding a more informed and peaceful future.



 §.§ Challenges in Granular Historical Analysis


The pursuit of simulating historical events using computational methods has evolved significantly over the years. Beginning with human simulations, transitioning to human-program hybrid systems, and finally arriving at fully computerized simulations, each stage has brought unique insights and challenges <cit.>. Human simulations, as outlined by Dickson <cit.>, provided a foundational approach. In educational scenarios, such simulations involved role-playing exercises, enabling students to delve into the complexities of historical events, such as the United States' entry into WWI. The advent of human-program hybrid systems, exemplified by the Inter-Nation Simulation model <cit.> and its various applications <cit.>. These systems merged human decision-making with computational processes, creating a more dynamic and interactive environment for simulating international conflicts. However, the reliance on human input still presented limitations in terms of scalability and the possible depth of analysis. 

In the past decade, there has been a significant shift in leveraging computing power to create more sophisticated simulations. The OneSAF Objective System (OOS) <cit.> and the JAVA-based simulation of the Bay of Biscay submarine war <cit.> are prime examples. These simulations used detailed models of military operations and game theory, enhancing the accuracy and depth of historical analysis. More recently, through the development of generative AI methods, high-level simulation of social system dynamics becomes a reality <cit.>. Despite these advancements, the complexity of human behavior and the vastness of historical data remained challenging to fully encapsulate in these models. Moreover, while fully computerized simulations can achieve the most detailed and accurate simulation among all of the three stages, they still are focuses on the panoramic and high-level simulation of historical analysis, often unable to delve deeper into the individual witnesses' reflection and granular analysis beyond countries' or famous leaders' perspectives.

The ideas of “agent-based computational models” and “generative social science” have been well-known theories before the start of the 21st century <cit.>. Rule-based agents, while can reconstruct complex social behaviors, to some extent, to investigate “backward to the future” <cit.>, are often unable to maintain human-like intelligence, which is the key to simulating and understanding human society. Granular historical analysis with generative methods seems to be unrealistic even with the most cutting-edge Computational Social Science (CSS) methodologies. The current landscape of CSS, particularly in fields like sentiment analysis <cit.>, primarily operates on contemporary data sources. This presents a significant challenge in historical analysis, as historical data often lacks the granularity and digital format required for computational analysis. 

Our research confronts this challenge by employing an LLM within a MAS framework. This approach represents a novel step in historical simulation, blending the comprehensive data processing capabilities of modern AI with the intricate modeling of MAS. This integration marks a significant departure from traditional methods, as it attempts to overcome the limitations of data scarcity and quality in historical research. By utilizing advanced language models, we can infer, reconstruct, and simulate historical narratives and events with a level of depth and accuracy previously unattainable. Thus, we refer to this granular simulation approach as “history emulation”. 

Our MAS framework not only models individual agents and their interactions but also incorporates broader socio-political and economic contexts derived from limited historical data. This approach allows for a more nuanced and granular exploration of historical events, shedding light on the complex interplay of factors that shaped these occurrences. Our work, therefore, stands at the forefront of historical emulation, or as we redefined “history emulation,” offering a unique blend of AI-powered analysis and traditional historical scholarship. This synergy aims to provide new perspectives on historical events, facilitating a granular, diverse, and deeper understanding of the past and its implications for the future.




§ EMULATION SETTING

This section outlines the emulation framework and setting for our research demonstration. We commence with an exposition of the historical context of the four significant European battles that our emulation seeks to emulate: the Battle of Crécy, the Battle of Agincourt, the Battle of Poitiers, and the Battle of Falkirk. Each battle has been selected for its notable use of cold weapons and the strategic bipartite confrontations that characterized warfare during their respective periods. Building upon the historical context, we elaborate on the configuration of agents and their designated roles within our emulation framework. Our model incorporates two distinct categories of agents to capture the complexity of the battlefield: commanding agents and soldier agents. This dual-layered agent structure enhances the emulation's fidelity, offering nuanced insights into the command and control hierarchies, as well as the individual soldier experiences of historical warfare. To accurately emulate the historical engagements, each agent type has a specific set of actions available.



 §.§ Battle Histories



  
Battle of Crécy <cit.> a pivotal clash during the Hundred Years' War, occurred on 26 August 1346 in northern France. The English forces under King Edward III confronted the French army led by King Philip VI. The English army is believed to have consisted of  around 10,000 to 15,000 men, while the French forces are estimated to have been  between 20,000 and 35,000 strong. As the English army marched through northern France, they were assaulted by the French, leading to a decisive English victory marked by substantial French casualties. As for casualties, the English losses were relatively light, with estimates ranging from a few hundred to around 2,000 men. On the other hand, the French suffered heavy losses, with estimates suggesting that  between 10,000 and 15,000 French soldiers were killed, including many high-ranking nobles. The Battle of Crécy marked a significant turning point in the Hundred Years' War and demonstrated the effectiveness of the longbow against traditional knightly charges.






  
Battle of Agincourt <cit.> fought on 25 October 1415 near Azincourt in northern France, stands as a landmark English triumph in the Hundred Years' War. The English army consisted of around 6,000 men, primarily made up of archers armed with longbows. The French, on the other hand, had a force of approximately 12,000 to 36,000 men, composed of knights, men-at-arms, and infantry. Estimates of casualties vary, but it is generally agreed that the English suffered relatively light losses, with up to 600 men killed. In contrast, the French suffered heavy casualties, with estimates suggesting that between 4,000 and 10,000 French soldiers were killed, including many high-ranking nobles. The confrontation took place on Saint Crispin's Day and ended with a surprising victory for the outnumbered English forces. This victory significantly elevated English morale and status, inflicted severe damage on France, and initiated a phase of English ascendancy in the war that persisted for 14 years. This period ended with England's defeat at the hands of France in 1429 during the Siege of Orléans.





  
Battle of Poitiers <cit.> On 19 September 1356, the Battle of Poitiers was waged between the French army, commanded by King John II, and an Anglo-Gascon contingent led by Edward, the Black Prince. The battle unfolded in western France, near Poitiers, where a French force numbering between 14,000 to 16,000 men launched an attack against a strategically fortified position held by a 6,000-strong Anglo-Gascon army. It is generally agreed that the English suffered relatively light losses, with around 40 men-at-arms killed. In contrast, the French suffered heavy casualties, with estimates suggesting that around 4,500 French soldiers were killed, including many high-ranking nobles.




  
Battle of Falkirk <cit.> a major engagement in the First War of Scottish Independence, took place on 22 July 1298. The English army, commanded by King Edward I, achieved a significant victory over the Scots, who were led by William Wallace. The English army consisted of around 12,000 to 15,000 men, primarily made up of heavy infantry and archers. The Scottish forces were believed to have numbered around 5,000 to 8,000 men, composed mainly of spearmen and some cavalry. English had around 2,000 men killed. In contrast, the Scottish suffered heavy casualties, with estimates suggesting that between 2,000 Scottish soldiers were killed, including many high-ranking nobles. The defeat at Falkirk led to Wallace's resignation as Guardian of Scotland.




 §.§ Agent Definition

Our basic emulation setting contains the profile definition of agents and their action space. Our emulation encompasses two types of agents:

    
  * Commanding Agents: These agents symbolize the individuals or collective entities responsible for strategic decision-making in the theater of war. They are programmed to emulate the tactical acumen and leadership styles of historical commanders, thereby influencing the broader outcome of the simulated conflict. 
    
  * Soldier Agents: These agents personify the rank-and-file soldiers who executed the battle plans on the ground. Each soldier agent is equipped with a comprehensive profile that includes personal history, psychological traits, and potential responses to combat stimuli.




  
Commanding Agents These agent profiles include general information about an army (a group of soldiers). Decisions and Strategies of the commanding agent will be made based on the whole army information, which includes the following aspects:

    
  * ID: The ID of a commanding agent is represented by a hash code that is generated to uniquely identify each commanding agent within the emulation sandbox. This is necessary due to the dynamic agent structure employed in our emulation, which allows for the creation of additional agents beyond the initial (two) commanding agents as the emulation progresses. The use of a hash code ensures that each agent can be accurately identified and tracked throughout the course of the emulation.
    
  * Military Command Structure: This involves the hierarchical organization and leadership dynamics within each military faction.
    
  * Morale and Discipline: An assessment of the troops' psychological readiness, their discipline levels, and overall morale. 
    
  * Military Strategy: The overarching tactical approaches and plans employed by each side in the conflict.
    
  * Military Capability: An inventory of the weapons and defense tools at each side's disposal.
    
  * Force size and composition: This aspect includes the total number of soldiers and their composition including information about the types of troops, their roles, and their proportions in the overall force. 
    
  * Location: The current location of the agent is represented by its coordinates. These coordinates provide a precise indication of the agent's position within the simulated environment, allowing for accurate tracking and analysis of its movements and interactions with other agents and the environment.


Below is an example of an English army agent which is initialized at the very start of the emulation for the Battle of Crécy:
[language=HTML, caption=An example of commanding agent profile]
1. ID: ARMY-13e370a8

2. Command Structure: experienced commanders with significant autonomy

3. Morale and Discipline:
(1) High morale and strict discipline
(2) Enhanced by tactical innovations and effective use of the longbow

4. Military Strategy:         
(1) Aggressively defensive posture, emphasizing strategic high ground for offensive strikes. Vigorously exploits terrain advantages for combative engagements.         
(2) Forceful application of longbows, enabling a confrontational yet adaptive offense, underscored by ambitious tactical innovations.

5. Military Capability:
(1)Longbow: Exhibits a rapid rate of firing and extensive range, with the capability to pierce armor.
(2)Gunpowder Weapons: Encompasses a range of types, incorporating dismounted men-at-arms and selective deployment of cannons.

6. Force Size and Composition:
Size: 10,000. Includes men-at-arms, longbowmen, hobelars, and spearmen.

6. Armament and Protection:
(1) Armor: Men-at-arms wore quilted gambeson under mail armor, supplemented by plate armor, bascinets with movable visors, and mail for throat, neck, and shoulders.
(2) Shields: Heater shields made from thin wood overlaid with leather.
(3) Weapons: included lances used as pikes, swords, and battle axes.
(4) Special Weapon: Longbow.

7. Location: [0, 0]




  
Soldier Agents Soldier agents are characterized by a wide range of attributes, including name, age, familial ties, occupation, personality traits, social standing, potential health conditions, physical fitness, hobbies and interests, conversational style, unique idiosyncrasies, and personal secrets or controversies. These attributes are designed to provide a comprehensive and nuanced representation of the soldier agents.



 §.§ Anonymization of Battle Details

To prevent providing explicit hints to the LLM and VLM regarding the specific battle being emulated, in case it has memorized certain battle information, we anonymize various battle details. This includes the names of countries, leaders, specific year and date of the battle, and location names. By doing so, we ensure that the LLM's decisions are based solely on the information provided in the prompt and not influenced by any prior knowledge it may have. 



 §.§ Action Space
 


  
Action Space of Commanding Agents 
Our emulation framework is characterized by its comprehensive detail, featuring an action space that encompasses 51 distinct actions. Agents within the emulation have the flexibility to select any combination of these actions at each decision point. The actions available in the action space are organized into seven categorically distinct groups:

    
  * Reposition. This category includes actions that involve the movement of an army or a subsection thereof to a different location: Reposition Forces, Create Decoy Units
    
  * Preparation. Actions in this group are geared towards readying forces for an impending attack: Deploy Longbows, Rally Troops, Employ Artillery, Use of Gunpowder Weapons, Resupply Archers, Destroy Enemy Morale, Deploy Archers in Flanking Positions, Organize Night Raids, Organize Raiding Parties, Digging trenches
    
  * Attack. This group encapsulates a variety of common attack strategies, such as skirmishing, ambushing, besieging, cavalry charges, and direct firing, among others: Initiate Skirmish, Charge Cavalry, Ambush Enemy, Launch Full Assault, Archery Duel, Siege Tactics, Hand-to-Hand Combat, Counterattack, Conduct Reconnaissance, Direct Artillery Fire, Engage in Siege Warfare, Execute Flanking Maneuvers, Use Cavalry for Shock Tactics, Employ Archers Strategically
    
  * Defense. Encompasses actions such as shielding, fortification, and the creation of obstacles: Construct Defenses, Prepare Defenses, Develop Counter-Siege Measures, Form Defensive Shields, Establish Defensive Fortifications, Fortify Rear Guards, Fortify Position, Create Obstacles for Enemy Cavalry, Form Defensive Pike Formations, Set Traps
    
  * Observation. Focused on gathering information about the surrounding area and the current situation of the enemy: Scout Enemy Position, Gather Intelligence, Intercept Enemy Supplies, Establish Communication Lines
    
  * Retreat. Actions related to strategic withdrawal in the face of adverse conditions: Retreat and Regroup, Tactical Retreat, Plan Feigned Retreat


Each action requires 3 inputs: initiator, location, and recipient. For each action, the agent is required to (1) identify the specific agent or entity responsible for emulation of the action. It defines who is carrying out the action within the emulation. (2) the geographical point or area within the emulation where the action takes place. It is crucial for contextualizing the action within the broader landscape of the battle scenario. (3) the target or beneficiary of the action. It specifies towards whom or what the action is directed, whether it is an opposing force, a specific unit, or another entity within the emulation.




  
Action Space of Soldier Agents
These soldier agents follow the orders given by their commanding agents and are affected by combat outcomes based on the general fatality rate, which is calculated according to the actions taken, the size of the armies, and the types of weapons involved. By going through this process, the individual agents provide a more granular view of the battlefield dynamics, allowing for a better understanding of the experiences and feelings of soldiers on the ground.




§ EMULATION SANDBOX

In our emulation framework, we concentrate on a relatively straightforward scenario: a bipartite battle. The process begins with the establishment of the geographical context for the entire scenario, both textual description as well as a visual map. Subsequently, we define the two initial opposing commanding agents, considering seven profile aspects to ensure a comprehensive and realistic representation. Notice that in this section, we simply use “agent” to refer to “commanding agent”.



 §.§ Time and Space in Sandbox

In order to accurately simulate the dynamics of historical battles, it is crucial to effectively manage the time and space within the sandbox environment. In this section, we will discuss our approach to time and space management in the sandbox.



  
Quantized Time Management
The battlefield environment is characterized by continuous dynamic changes as shown in both Figure <ref> and Figure <ref>, with agents frequently altering their actions and positions. To accurately emulate these dynamics while preserving the discrete decision-making process in our agent-based emulation, we employ a time quantization approach. Specifically, we discretize the continuous flow of time <cit.> into 15-minute intervals. For each quantized time block, agents have the flexibility to either maintain their current action or adapt their actions based on the unfolding situation.



  
Coordinate Generation based on Map
We obtain the initial map of the battlefield from historical documents [<https://en.wikipedia.org/wiki/Battle_of_Crecy>, <https://en.wikipedia.org/wiki/Battle_of_Agincourt>, <https://en.wikipedia.org/wiki/Battle_of_Falkirk>, <https://en.wikipedia.org/wiki/Battle_of_Poitier>]. To generate the coordinates from the original image, we use one army position as the reference point, designated as the (0,0) position. We then use a scale of 10 yards as one unit of the coordinate system. The coordinates of key landscapes on the map are estimated and expressed with a range in the textual description.

For example, in the Battle of Crécy, the coordinates of a river are generated as follows:


[language=HTML, caption=An example of coordinates of a river in the battlefield of Battle of Crécy]
RiverB: 
path: 
    
    start: [-100, -200],
    end: [100, 50],
    description: Flow path of the river begins from the southwest corner towards the northeast.
    ,
properties: 
    
    type: River
    ,
description: Meandering waterway providing natural boundaries and obstacles.



The coordinates of these key positions, including both key landscapes and existing agents on the battlefield, serve as reference points for agent movement decisions. When making decisions on agent movement, the agent will refer to the coordinates of these key positions and choose the target position to move to. This approach enables agents to navigate the battlefield in a realistic and contextually appropriate manner, taking into account the presence of natural boundaries and obstacles.




 §.§ General Sandbox Process

Here we provide a very simple and crude overview of the emulation sandbox, as presented in Figure <ref>. We initiate the emulation based on historical map which contain information about geography as well as the position of the armies. The following represents a high-level overview of the steps involved in the emulation process:

    
  * Step 1: Each agent starts by observing its surroundings and gathering information. This observation process involves text-based reasoning from the agent's prompt as well as obtaining visual information from the map.
    
  * Step 2: Based on the gathered information, each agent decides on its actions, such as preparing for battle (e.g., digging trenches, reinforcing troops), collecting further information, or making organizational agent structure changes like forking, merging, or being pruned to dynamically create new agents or diminish existent agents.
    
  * Step 3: For every 15-minute interval in the emulation sandbox, the general information, including agent locations and properties, is updated according to the actions taken by all agents.
    
  * The process then loops back to Step 1, with agents continuing to observe, make decisions, and act based on the updated information and evolving battlefield situation.


By following this iterative process, our agent-based emulation can effectively capture the complex dynamics of the battlefield while maintaining the discrete decision-making process inherent to the emulation.





 §.§ Detailed Emulation Process


In this subsequent section, we delve into a more comprehensive explication of the general sandbox process previously introduced, elaborating on several key aspects. These include the management of time in a quantized manner, the process of making observations grounded in the map, the planning and execution of actions by the agents, the evaluation of casualty for each agent at every quantized time interval and the methodology behind updating the properties of each agent.



  §.§.§ Observation based on Map Information




In line with the behavior of all agents, the initial step prior to planning or executing any actions involves observing the overall environment information. To achieve this, we adopt a multi-modal approach that amalgamates both textual and visual representations of the environment. A visual map is presented to the agents, depicting their starting locations and specific places of interest, such as villages. In addition, the agents are provided with corresponding textual descriptions of the coordinates in their prompts. Subsequently, each agent proceeds to collect data in two primary aspects:

    
  * Geographic landscapes: Geographic information offers a macroscopic view, providing agents with critical insights for strategic planning and navigation.
    
  * Nearby agents: Agents information including affiliation (friend or foe), current actions, precise positioning (distance and bearing), and detailed agent profiles including the remaining number of soldiers and their composition.


Together, these observation streams form a comprehensive situational awareness framework, crucial for the agents' adaptive responses and operational effectiveness in diverse settings. An example is presented in Figure <ref>.


To simulate the agents' limited field of view, each agent's prompt only includes the coordinates of agents and places within a 10k-meter range. All agents then calculate the relative distance of other agents and places within their 10k-meter sight range using both textual and visual information. It is important to note that if obstacles like forests or villages come into an agent's sight, the agent will not be able to see through these obstacles. By combining textual and visual descriptions, our multi-modal approach enables agents to interact effectively with their surroundings while maintaining a realistic representation of their limited field of view. 

If sub-agents collect information and communicate with the parent agent, the parent agent's knowledge can extend beyond its immediate sight range. This information exchange allows the parent agent to make more informed decisions based on the broader context provided by its sub-agents, enabling more effective coordination and strategic planning. In such cases, the parent agent's awareness of the battlefield is not strictly limited to its own 1,000-meter sight range but can be expanded through the information gathered by its sub-agents. This extended knowledge can include details about enemy positions, terrain features, or other relevant factors that might influence the parent agent's decision-making process. As a result, the dynamic multi-agent system can better adapt to the complex and evolving battlefield environment by leveraging the combined knowledge of its constituent agents.




  §.§.§ Action Planning


At each discrete time point, an agent has the ability to choose from a multitude of potential actions. In this part, we will outline four common actions that agents typically engage in: location movement, dynamic agent structure, interaction with the landscape, and interaction with other agents. These actions encompass a range of strategic and tactical considerations that agents must take into account when making decisions in the context of the battlefield.




  
Location Movement In the context of location movement, an agent possesses the capability to traverse to a different location for strategic purposes. This may involve moving closer to enemy agents to initiate an attack, or distancing itself from potential threats. In terms of the mechanics of location movement, the agent will generate the coordinates of its intended final destination, which it aims to reach within the subsequent 15-minute timeframe.

The following represents an illustrative output of a location movement action for an agent belonging to England with the ID ARMY-a606969b. In this scenario, the agent moves from its current location, represented by the coordinates [95, -55], to a new location with coordinates [100, -50]. During the course of this movement, the agent sustains losses of 30 soldiers. 
[language=HTML, caption=An example output of location movement action]

identity: England,
id: ARMY-a606969b,
action_description: Reposition Forces Reposition to [100, -50] to utilize ForestF for cover and longbow deployment, supporting nearby friendly units and executing flanking maneuvers,
current_location: [95, -55],
target_location: [100, -50],
remaining_number: 170,
original_number: 200,
lost_number: 30





  
Dynamic Agent Structure
The battlefield environment is highly dynamic and fluid, with a multitude of situations arising unpredictably. To address this complexity, we propose a dynamic agent structure <cit.> that enables agents to adapt their organizational configurations according to the current situation. Our proposed dynamic agent structure supports several adaptive mechanisms, as shown in Figure <ref>:




    
  * Fork: An agent may decide to fork another autonomous agent for a specific task, effectively splitting its forces and allocating resources to address multiple objectives simultaneously.
    
  * Merge: In scenarios where an agent is under significant pressure but chooses to continue fighting, it may merge with the closest allied agent to consolidate forces and enhance its resilience.
    
  * Prune: In cases where an agent is overwhelmed or retreats from the battlefield, the dynamic agent structure accommodates this change by pruning the agent from the active force.


This dynamic agent structure allows for flexible and adaptive decision-making in response to the ever-changing conditions of the battlefield. For instance, an agent may fork a sub-agent by allocating a portion of its soldiers to create an autonomous agent responsible for collecting information about the surroundings and communicating it back. Additionally, the agent may dispatch autonomous sub-agents to focus on handling specific segments of the incoming enemy forces based on the situation's requirements. In cases where agents lack the necessary strength to address the current situation, they may choose to retreat from the map or merge with other agents to bolster their combined power. Therefore, our project introduces a dynamic multi-agent system in which the structure and number of agents adapt according to the needs of the given situation. This adaptive approach allows the system to effectively respond to the diverse and unpredictable challenges that arise in the battlefield environment.


The following represents an example of a forking action, where the current agent with the ID ARMY-4c9b5218 decides to split its army into two distinct agents. The first new agent consists of 500 soldiers, all of whom are light cavalry, and is assigned the mission of initiating a skirmish at the location of [25, -75] with an enemy agent with the ID ARMY-ac57a3f0. This new agent is assigned the ID ARMY-ac57a3f0. The second new agent consists of 4,000 soldiers, all of whom are heavy cavalry, and is assigned the mission of rallying troops at the location of [25, -75]. This new agent is assigned the ID ARMY-70b7fa20. This example demonstrates the dynamic nature of agent structure within the emulation sandbox, where agents can split and form new agents with distinct properties and missions.
[language=HTML, caption=An example of forking of agents]
Current agent: 

identity: France,
agent_id: ARMY-4c9b5218,  
troop_number: 6000, 
current_location: [20, -70]


Given the current battlefield situation, where the enemy is deploying longbows and fortifying positions to counter our cavalry charge, we need to adapt our strategy. Our initial mission was to charge cavalry, but the enemy's longbows pose a significant threat to our heavily armored knights, especially if we charge without dealing with them first.

## Thought for Action:
1. We need to disrupt the enemy's longbowmen, who are currently thebiggest threat to our cavalry.
2. We should avoid charging directly into fortified positions or where longbowmen are deployed.
3. Coordinating with friendly forces is crucial to create a unified front and increase the effectiveness of our actions.
4. Considering the terrain and the positioning of our forces, we should aim to flank the enemy where possible.
5. We must maintain high morale among our troops to ensure the effectiveness of our charge.

## The Actions to Perform:
- **Reposition Forces**: To avoid a head-on charge into the enemy's longbows, we will reposition our forces to prepare for a flanking maneuver.

fork agents: 
[

subAgent_NextActionType: Initiate Skirmish,
troopType: Light Cavalry,
deployedNum: 500,
target_position: [25, -75],
target_agent_id: ARMY-75b59d12,
agent_id: ARMY-ac57a3f0,
remarks: Engaging enemy longbowmen to disrupt their formation and 
reduce their effectiveness.
,


subAgent_NextActionType: Rally Troops,
troopType: Heavy Cavalry,
deployedNum: 4000,
target_position: [20, -70],
target_agent_id: None,
agent_id: ARMY-70b7fa20,
remarks: Rallying the main force to maintain high morale and prepare for the charge.

]




In Section 3.2, the general profile of commanding agents has been delineated. However, we can see from the dynamic agent structure here that agents are dynamic entities in our sandbox, and within a single country's army, there may be numerous distinct agents, each engaged in different tasks. Therefore, in addition to the general information inherited from the overall commanding agent profile as defined in Section 3.2, each agent possesses more granular and unique information, as defined by the following dynamic properties:



  * Initial mission assigned when being created

  * Current location represented by coordinates

  * The number of soldiers at its disposal

  * The type of soldiers under its command


These properties are subject to evolution over time. For instance, the number of soldiers associated with an agent may fluctuate as a result of soldiers joining the agent, thereby increasing its forces, or from soldiers being killed or wounded in battle, leading to a decrease in its forces. The current location of the agent may also change as it navigates the battlefield, and its initial mission may adapt in response to shifting circumstances and strategic considerations.





  
Interaction with Landscape Environment
To accurately emulate battle dynamics, it is crucial for agents to be able to interact with the physical surroundings as shown in Figure <ref> (c), such as rivers, forests, villages, and other features. For example, when encountering a river, agents may build a bridge to cross it; when encountering a forest, agents might choose to hide within it to ambush enemies; and when encountering a village, agents could decide to circumvent it. To facilitate these interactions, it is essential to maintain a relative distance between agents and specific locations on the map, as well as between agents themselves. 

The following represents an example of an agent utilizing the natural cover provided by a forest. In this scenario, the agent strategically positions itself within the forest to gain a tactical advantage, such as concealment from enemy agents or protection from ranged attacks.
[language=HTML, caption=An example of an agent interacting with the landscape of forest]

identity: England,
id: ARMY-53c7a137,
action_description: Fortify Position Constructing defenses in ForestF to utilize the natural cover against cavalry charges and to bolster the position of our longbowmen,
location: [100, -50],
remaining_number: 300,
original_number: 300,
lost_number: 0





  
Interaction with Other Agents
Given the observation agents make about their surrounding situations, agents will make decisions regarding whether and when to engage in interactions with other agents, particularly those identified as enemies, as depicted in Figure <ref> (d). The specific nature and timing of these interactions are not predetermined; rather, they are initiated by the agents themselves. For instance, when an enemy agent is within close proximity, an agent may opt to engage in combat or launch an attack. The outcome of these interactions between agents is contingent upon various factors, such as the number of soldiers at their disposal and the types of weapons they possess.

The following represents two examples of offensive interactions between two enemy agents. In the first example, an agent executes a flanking maneuver against another agent, as shown in the code snippet below:
[language=HTML, caption=An example of an agent interacting with a target agent with attacks]

identity: France,
id: ARMY-d2ff280c,
action_description: Execute Flanking Maneuvers Flanking enemy unit 'ARMY- 9418a275' in the midst of a Tactical Retreat to destabilize their fortification efforts,
location: [10, -100],
remaining_number: 8200,
original_number: 12000,
lost_number: 3800



In this scenario, the agent with the ID ARMY-d2ff280c, representing France, executes a flanking maneuver against the enemy unit with the ID ARMY-9418a275. The maneuver is intended to destabilize the enemy's fortification efforts while they are in the midst of a tactical retreat. The agent's current location is represented by the coordinates [10, -100], and it has a remaining force of 8,200 soldiers out of an original force of 12,000, having lost 3,800 soldiers.

The second example involves an agent ambushing an enemy cavalry unit, as shown in the code snippet below:

[language=HTML, caption=Another example of an agent interacting with a target agent with attacks]

identity: England,
id: ARMY-2508af97,
action_description: Ambush Enemy Proactively engaging enemy cavalry at [83.8, -17.4] to disrupt their maneuvers and prevent them from supporting their troops,
location: [20, -25],
remaining_number: 600,
original_number: 600,
lost_number: 0



Notice that there are numerous actions that agents can undertake even when they are not directly interacting with each other. These actions may include fortifying their position, rallying troops, and other similar activities that contribute to their overall strategic advantage on the battlefield.




  §.§.§ Casualty Evaluation by Observer

In the event that one agent initiates an aggressive action towards another, hereafter referred to as the target agent, both parties may sustain corresponding casualty losses. The loss is evaluated by an objective evaluator supported by GPT-4, which can be seen as an observer. The observer determines the casualties based on several factors:



  * Current profile information from the agents, including their force size, force composition, command architecture, and location.

  * The actions undertaken by the agents, including the action name and a more detailed description of the action generated alongside the action name by the agent. For example, “Deploy Longbows: Deploying longbows in coordination with nearby friendly forces to initiate a skirmish against the nearest enemy cavalry unit and disrupt their advance.”

  * The location and relative distance between the agents, as well as relevant landscape information surrounding them. This information is used to assess the tactical advantages or disadvantages of the agents' positions.

  * Objective information about the specific weapon utilized, including performance metrics such as the range and accuracy of the weapon. This information is obtained from reputable sources such as Wikipedia.


In order to improve the accuracy and reliability of casualty assessments, it is recommended that future iterations of the emulation sandbox incorporate an expert system with a more comprehensive understanding of the weapons involved. Such a system would be able to provide more nuanced and accurate evaluations of casualties based on a deeper understanding of the capabilities and limitations of different weapons, as well as the tactics and strategies employed by the agents. 




  §.§.§ Agent Profile Update

The profile information of each agent, encompassing force size, force composition, command architecture, and location, is dynamically updated based on the actions undertaken by the agent at the current time. The profile information is updated for every quantized time period.

The factors taken into account to update the agent profile include the actions undertaken by the agent, their interactions with other agents, and any movement that occurs. Specifically, the force size of an agent is determined by three key factors: the change in casualty numbers, the forking of the agent, or the merging of other agents. An agent can decide whether to fork more agents or to merge with other agents, which will result in an increase or decrease in force size, respectively. The location of an agent is contingent upon their movement. If a movement action is executed, the agent's location is updated accordingly. The updates to the agent profile ensure that the emulation sandbox accurately reflects the current state of the battlefield and the evolving dynamics of the conflict.



  §.§.§ Historical Action Trajectory

For all agents, once decisions regarding actions have been made at each quantized time period, these actions are subsequently recorded into a historical action trajectory, which is then incorporated into the general prompt. As a result, all future decision-making processes will be informed not only by the current environmental information but also by the historical trajectory of actions that have been previously undertaken. This approach enables agents to make informed decisions that are grounded in both the current context and the historical record of actions on the battlefield.



 §.§ Emulation of Single Soldier

Our sandbox also simulates the experiences of individual soldiers and reflects their personal perspectives. Throughout the emulation, these soldier agents document their experiences and emotions based on their current actions, previous action trajectories, and any wounds they may have sustained from enemy attacks on the agent to which they belong. This process provides valuable insights into the personal aspects of warfare that complement the higher-level strategic decision-making processes carried out by the commanding agents.

By adopting a multi-layered approach, our emulation is able to capture both the macro-level strategic dynamics and the micro-level personal experiences of the battlefield. This results in a more comprehensive representation of the complexities of war, encompassing both the broader strategic considerations and the individual experiences of soldiers on the ground.



§ EXPERIMENT

The primary objective of these experiments is to investigate the extent to which agents based on LLMs and VLMs can reasonably simulate historical battles, which are characterized by a high degree of complexity and dynamism. Specifically, we aim to evaluate the ability of agents to effectively navigate and adapt to the rapidly evolving and unpredictable situations that typically arise during battles. By doing so, we hope to gain insights into the potential of LLMs and VLMs as tools for simulating and analyzing historical conflicts.

We conduct experiments on 4 distinct historical scenarios, namely the Battle of Crécy, the Battle of Agincourt, the Battle of Falkirk, and the Battle of Poitiers. The experiments are performed using 3 strong language models and vision-language models: Claude-3-opus <cit.>, GPT-4-1106-preview <cit.>, and GPT-4-vision <cit.>. For each scenario and each language model, we execute the emulation 5 times using the same setting within a sandbox environment to account to randomness, continuing until the casualty figures for both armies converge, or in other words, reach a state of stability.



 §.§ Evaluation Metrics


As historical battles often lack comprehensive records and documentation, and are typically characterized by unpredictable events that are challenging to replicate in an emulation, our evaluation methodology is divided into three distinct components.





  
Battle Final Casualty The first aspect focuses on the final battle casualty, where we compare the simulated casualty figures with historical data. Specifically, we evaluate the casualty of each army for every quantized time period, recording the casualty for each time for both armies. We then compute the mean and variance at each time and compare the final result with historical data to determine the degree of alignment between the emulation results and the historical record. This approach allows us to assess the accuracy and reliability of the emulation sandbox in replicating historical battles.



  
Human Analysis on Location Movement The second part of the evaluation involves a human analysis of the agents' behavior on the battlefield, specifically their location movements and dynamic structure. To facilitate an intuitive assessment of whether the agents can rationally interact with the environment and make decisions about where to go, we present images of the action dynamics and the positions of the agents across time. This allows us to evaluate the agents' ability to adapt to changing circumstances and execute historically plausible strategies, providing insights into the effectiveness of the emulation sandbox in simulating realistic battle scenarios.



  
Human Analysis on Agent Action The third aspect of the evaluation involves checking the actions taken by the agents. To provide a clear and understandable representation, we present a sequence of diagrams that track the action trajectories taken by specifically two agents. 

Although the latter two aspects are challenging to quantitatively evaluate, hopefully by presenting the agents' behavior and actions in a visual format, we can offer insights into the agents' decision-making processes and their ability to execute historically plausible strategies. 




 §.§ First Aspect: Battle Result Performance


In this section, we present the results of the first aspect of the evaluation, which focuses on comparing the simulated casualty figures with historical data. Figures <ref>, Figures <ref>, <ref>, and <ref> illustrate the results of simulating the four battles using the three LLM-based and VLM-based agents. 

For each battle emulation, we utilize 3 different backbone models to generate results. The results are presented in 3 separate images, with the leftmost figure showing the results from the Claude-3 simulations, the middle figure showing the results from the GPT-4 simulations, and the rightmost figure showing the results from the GPT-4-vision simulations. This allows us to compare the performance of the different language models in replicating historical battles and to evaluate the impact of the choice of language model on the accuracy and reliability of the simulation results. For each image, the x-axis represents the process of time in emulation, recorded in minutes, while the y-axis represents the casualty figures for armies belonging to the two countries. The casualty of each army is represented by a mean line and a variance band, where the mean and variance are computed based on the 5 simulations run in the sandbox in the current setting. This allows us to assess the accuracy and reliability of the emulation sandbox in replicating historical battles and to evaluate the impact of the choice of language model on the simulation results.

Overall, the results indicate that Claude-3 predicts a significantly higher casualty rate compared to GPT-4 and GPT-4-vision. This discrepancy suggests that the choice of backbone language model can have a significant impact on the accuracy and reliability of the emulation sandbox in replicating historical battles.



  
Battle of Crécy

In the emulated Battle of Crécy, the results indicate that all three models predict a higher casualty rate for the French soldiers compared to the English soldiers, which aligns with historical records.  Specifically, Claude-3's prediction suggests that the final casualty figure for the French army is approximately 2.4 times that of the English army. However, the prediction is characterized by high variance, which increases as the emulation progresses, suggesting a high degree of randomness in the emulation process. In contrast, GPT-4's prediction suggests that the final casualty figure for the French army is approximately 2.75 times that of the English army, with a relatively low variance, indicating a stable emulation process. Similarly, GPT-4-vision's prediction suggests that the final casualty figure for the French army is approximately 3.5 times that of the English army, with an acceptable level of variance.

Overall, the results suggest that all three agents are able to simulate the casualty figures for the Battle of Crécy with varying degrees of accuracy and stability. While Claude-3's prediction is characterized by high variance, GPT-4 and GPT-4-vision's predictions are more stable and align more closely with historical records.




  
Battle of Agincourt

In the emulated Battle of Agincourt, the results indicate that all three models predict a higher casualty rate for the French soldiers compared to the English soldiers, which aligns with historical records. Based on historical documentation, only a few hundred died in the English army and about 4,000 to 10,000 died in the French army. Among the three models, GPT-4 and GPT-4-vision predict a closer casualty result, though the casualty of the English is still much higher than historical fact, but the casualty in French are relatively similar. The variance in the predictions is within an acceptable range. However, Claude-3 predicts a much higher casualty for both English and French armies, with the French army almost dying out, which is not very reasonable.

Overall, the results suggest that GPT-4 and GPT-4-vision can provide a relatively reasonable result for the Battle of Agincourt, while Claude-3's predictions are less accurate. This highlights the importance of selecting an appropriate language model for the emulation sandbox to achieve historically plausible results.




  
Battle of Poitiers

In the emulated Battle of Poitiers, the results show a much higher casualty for the French than the English army, conforming to historical documentation: only around 40 soldiers died in this battle in the English army, but more than 4,500 men-at-arms were killed or captured. GPT-4 and GPT-4-vision predict an acceptable result for the French army, which is around 4,000 to 6,000, but too high for the English army, which is close to 2,000 for both models. Claude-3 again predicts too high casualty for both English and French armies.

Overall, the results suggest that GPT-4 and GPT-4-vision can provide a relatively reasonable result for the Battle of Poitiers, while Claude-3's predictions are less accurate.





  
Battle of Falkirk
In the emulated Battle of Falkirk, the results show a similar casualty for the English army and the Scottish army, conforming to historical documentation: around 2,000 soldiers died in this battle in both the English and Scottish armies. GPT-4 and GPT-4-vision predict a very close result, with the casualty rate for both English and Scottish armies around 2,000. Again, Claude-3 predicts too high casualty for both armies, with English around 8,000 and Scottish around 6,000.

Overall, the results suggest that GPT-4 and GPT-4-vision can provide a relatively reasonable result for the Battle of Falkirk, while Claude-3's predictions are less accurate. 




 §.§ Spatial Movement Result Performance



Figure. <ref> illustrates the general agent location dynamics of a single emulation of the Battle of Crécy using GPT-4. The English army is represented by red symbols, while the French army is represented by blue symbols. The sizes of the symbols are normalized to correspond to the number of soldiers contained in each agent. Different line type

At a glance, we can observe that as the emulation progresses, both armies are gradually split into smaller teams, especially the English army. Notably, some of the longbowmen tend to maintain a safe distance from the enemy for extended periods, using their longbows to inflict casualties from afar. As time progresses, the advantage of the French army's larger number of soldiers is diminishing over time, particularly in the case of the heavy cavalry and heavy knights. This is likely due to the effectiveness of the English longbowmen in inflicting casualties from a safe distance, as well as the challenging terrain of the battlefield, which made it difficult for the heavily armored French knights to maneuver effectively.


To further evaluate the performance of the LLMs and VLMs in simulating historical battles, we can examine the paths taken by individual agents over time. This can provide insights into whether these models have a good sense of distance and can make reasonable decisions based on the overall environment.



 §.§ Agent Action throughout Emulation


Figure <ref> provides an illustrative example of the actions undertaken by two agents, one representing a part of the army belonging to England and the other representing a part of the army belonging to France, throughout the entire emulation time. The English agent's cautious approach is reflected in its movements and actions, while the French agent's aggressive strategy is evident in its frequent attacks and resulting losses. This example provides a reasonable representation of how historical battles may have unfolded.






 §.§ Experiment Summary

The evaluation results of the emulation sandbox for historical battles indicate that the choice of language model can have a significant impact on the accuracy and reliability of the simulation. Specifically, GPT-4 and GPT-4-vision have shown to provide relatively reasonable results in terms of casualty figures for both armies in the emulated battles of Agincourt, Poitiers, and Falkirk, while Claude-3 has consistently predicted much higher casualty rates than historical records.

In terms of the strategies and tactical maneuvers employed by the agents, the results suggest that the agents can adapt to changing circumstances and execute historically plausible strategies. However, further analysis is needed to assess the agents' ability to rationally interact with the environment and make decisions about where to go.

Overall, the evaluation methodology employed in this study, which combines a comparison with historical data and a human analysis of the agents' behavior, has proven to be effective in assessing the accuracy and reliability of the emulation sandbox. However, further refinement is needed to improve the accuracy of the predictions and the agents' decision-making capabilities.



§ SOLDIER AGENT EXPERIENCE

The experiences of individual soldiers are recorded for each quantized time interval during the simulation. Each soldier agent generates a document based on their unique background and experiences. Therefore, for a simulation involving 30 soldier agents, a total of 30 documents are produced, each containing multiple episodes.

To provide an overview of the content of these documents, we utilize word frequency analysis and present the results using a word cloud. This involves merging all documents generated by soldier agents from the same country, regardless of the quantized time interval. The resulting word cloud offers a visual representation of the most frequently occurring words and phrases in the documents, providing insights into the experiences and perspectives of the soldier agents.

To generate the word cloud, we first preprocess the text data by removing words with specific part-of-speech tags, such as those belonging to the tag group [RB, MD, IN, CD, DT, NNS, PRP, NNS, FW]. We also remove functional words that do not convey meaningful information. Additionally, we filter out high-frequency words that do not provide significant insights, such as “think”, “feel”, “battle”, and “war”. This preprocessing step helps to ensure that the resulting word cloud accurately reflects the most salient themes and concepts present in the soldier agents' documents.

[t]0.5

    < g r a p h i c s >


[t]0.5

    < g r a p h i c s >



The above two figures present word clouds generated from the documents written by soldier agents in the English and French armies during the Battle of Crécy. Despite being the winning army, the English army's word cloud reveals a high frequency of words such as “death”, “chaos”, and “return”, indicating the intense and chaotic nature of the battle. On the other hand, the French army's word cloud shows a high frequency of words such as “death” and “fear”, reflecting the fear and uncertainty experienced by the soldiers. These word clouds provide a visual representation of the experiences and emotions of the soldier agents in both armies during the battle.



§ CONCLUSION AND FUTURE WORK



  
Conclusion
In this study, we have demonstrated the potential of LLM and VLM to support highly complex and dynamic simulations of historical battles. Our emulation sandbox provides a comprehensive evaluation of the simulated battles, including a comparison of casualty figures with historical data and a human analysis of the strategies and tactical maneuvers employed by both armies. Our approach also presents the individual experiences of soldiers on the battlefield using soldier agents, providing valuable insights into the personal aspects of warfare that complement the higher-level strategic decision-making processes carried out by the commanding agents.

We believe that our work can also provide new pedagogical methods for students and researchers interested in historical analysis. By simulating historical battles and presenting the results in an interactive and intuitive way, students can gain a deeper understanding of the complexities and dynamics of warfare. Moreover, our approach can be used to support research in various fields, such as military history, AI, and game theory.




  
Future Work
Our study has demonstrated the potential of LLM and VLM to support complex and dynamic simulations of historical battles. However, there is still room for improvement and expansion of our approach.

Firstly, we aim to develop additional evaluation metrics for such dynamic simulations to establish their effectiveness more comprehensively. This will enable us to better assess the accuracy and reliability of the simulation results and identify areas for improvement.

Secondly, we plan to extend our approach to simulate different types of battles beyond barpitite medieval battles. This will allow us to evaluate the versatility of our approach and its applicability to a wider range of historical battles.

Thirdly, we aim to incorporate expert systems for various parts of the simulation, such as information collection for observation and casualty estimation. This will enable us to improve the accuracy and realism of the simulation results, while LLM remains solely responsible for decision-making.

Furthermore, we are interested in developing more realistic simulations of individual soldiers beyond just adopting prompting with personalized information. This will enable us to capture the personal experiences of soldiers on the battlefield more accurately and comprehensively.

Finally, we plan to explore the interaction between commanding agents and soldier agents, enabling soldier agents to not only follow commands but also actively affect the decision-making process. This will provide insights into the dynamics of command and control in historical battles and enhance the realism of the simulation.

In summary, our future work aims to extend and enhance our approach to provide even more realistic and comprehensive simulations of historical battles, capturing the complexities and dynamics of warfare and providing valuable insights into the strategies and tactics employed by both armies.


unsrt  
 


























