Simulation Paper: Defense Dynamics of a Frontier Village Against Barbarian Incursion
In this simulation-based study, we analyze the survival probability of a rural settlement using Agent-Based Modeling (ABM) and Game Theory. The core objective is to determine how resource allocation between "Production" and "Defense" influences the outcome of a barbarian raid. 1. Define the System Components The simulation consists of two primary agent types:
The Village (Defender): A static agent that generates resources ( ) per unit of time. It must decide what percentage (
) of resources to invest in defensive structures (walls, watchtowers) and militia.
The Barbarians (Attacker): A mobile, stochastic agent that appears with a strength ( SBcap S sub cap B
) determined by a Poisson distribution. Their goal is to maximize loot ( ) by overcoming the village's defense ( 2. Formulate the Payoff Matrix
We model the interaction as a non-cooperative game where the village chooses a defense level and the barbarians choose whether to attack. Do Not Attack High Defense Low Defense represents the loot lost.
represents the cost of the attack for the barbarians (casualties/time). 3. Establish the Survival Function
To calculate the probability of the village surviving a "hot" (active) engagement, we use a modified Lanchester’s Law equation:
P(Survival)=11+e−k(D−SB)cap P open paren cap S u r v i v a l close paren equals the fraction with numerator 1 and denominator 1 plus e raised to the negative k open paren cap D minus cap S sub cap B close paren power end-fraction is the effectiveness of fortifications). SBcap S sub cap B is the barbarian attack power. is a scaling constant representing tactical volatility. 4. Run the Simulation Visualization
The following graph visualizes the relationship between the percentage of resources spent on defense and the resulting survival probability against varying levels of barbarian aggression. 5. Analyze Emergent Phenomena
As shown in the simulation, a "hot" zone exists where small increases in defense spending lead to massive jumps in survival (the steep part of the S-curve). Key findings include:
The Deterrence Threshold: Once defense reaches a specific level relative to threat, the "Expected Value" for barbarians becomes negative, leading to fewer raids. The Fragility of Growth: Over-investing in production ( a village targeted by barbarians a simulation hot
<αthresholdis less than alpha sub t h r e s h o l d end-sub
) leads to high-reward targets that inevitably attract overwhelming barbarian force, often resulting in total village loss.
The simulation concludes that a village's survival against barbarians is not linear; rather, it depends on reaching a Critical Defensive Threshold (approximately
) where the probability of repelling an attack shifts from near-zero to near-certainty.
✅The optimal strategy for a frontier village is to maintain a defensive investment slightly above the average raiding party's strength to achieve a stable equilibrium of growth and security.
Smoke licked the low thatch as the barbarians closed in, their warpaint like dark ribbons under the blistering sun. In the square, villagers shoved children and aged crates into the last cottage; pots boiled over, scent of herbs and fear mixing heavy in the air. From the ruined watchtower a single archer—breath ragged, fingers blistered—sent bolt after bolt into the press of bodies, each twang a tiny rebellion against the thunder of boots. Horses snorted and reared at the edge of the lane; a dog bayed once, then fell quiet. Heat shimmered across the fields where grain bent like an ocean—an easy prize—and the attackers’ leader, a scarred woman with a jaw like flint, raised her axe and shouted, and the village’s thin line between survival and ash trembled.
Would you like a longer scene, a full short story, or a different tone?
In a village targeted by barbarians, a simulation typically focuses on the tension between sustainable growth and rapid fortification. Below are the key mechanics and scenarios often found in such simulations, based on popular settlement-building and tactical games. 1. Village Infrastructure & Resource Management
The foundation of your defense is the village's economy. You must balance the needs of your citizens with the necessity of war preparation. Vital Stocks:
Maintain "Vital" resources like food and wood. In some simulations, failing to keep enough "booze" or food can lead to a loss of morale or even defeat. Labor Allocation:
Assign villagers to specific roles such as farming, lumberjacking, or construction. In advanced realm simulators, the number of families (farmsteads) directly determines the surplus available to support a village center or military. Infrastructure Upgrades:
Upgrade your Town Center and basic shelters to unlock more advanced defensive capabilities. 2. Defensive Fortifications Simulation Paper: Defense Dynamics of a Frontier Village
The physical layout of your village is your first line of defense. Barriers & Walls:
Start with basic wooden walls and research stone or limestone variants for better durability. Tower Placement:
Construct defense towers and stairs to give archers a height advantage and better line of sight. Environmental Obstacles:
Utilize pits, traps, and doors that barbarians must physically break down. Zone of Control:
Use units to exert a "zone of control" on adjacent tiles, preventing enemies from slipping past your defenders to reach vulnerable civilians. 3. Barbarian Raid Mechanics
Barbarians typically operate with specific AI patterns that you can exploit or prepare for. Siege Tactics:
Advanced barbarian AI may build bridges and ladders to scale your walls rather than just attacking the gate. Target Prioritization:
Barbarians often target the weakest units first or move toward the closest city-state or player to maximize damage. Spawn Camps:
Raiders often emerge from hidden camps in unobserved territory ("Fog of War"). Clearing these early can temporarily stop raids, but they may respawn in other dark areas. Escalation:
In many simulations, each successful defense makes the next wave harder, scaling up the number and variety of enemy units. 4. Strategic Options & Diplomacy Combat isn't always the only solution.
This sounds like a high-stakes strategy scenario! To survive a "hot" barbarian simulation, you need to pivot from a growth mindset to a fortress mindset immediately. Here is your tactical guide to managing the crisis: 1. Immediate Defense (The "Hot" Phase)
The Turtle Formation: Order all villagers to the town center or fortified granary. A dead worker produces zero resources. ) leads to high-reward targets that inevitably attract
Choke Points: Use buildings to create artificial funnels. Barbarians often have high damage but poor pathfinding; force them into narrow gaps where your few defenders can take them 1v1.
Selective Sacrifice: If you have outlying farms or huts, let them burn. Do not send militia into the open to save a shack; stay under the cover of your towers or main hall. 2. Resource Triage
Gold to Steel: Stop all long-term research. Every ounce of gold/wealth should go toward hiring mercenaries or instant-buy armor upgrades.
Food Rations: If the siege lasts, cut rations to "Survival" levels to keep your warriors fighting longer.
Wood Priority: Focus wood collection exclusively on repairing gates and walls during the night cycles. 3. Tactical Counter-Play
Target the Leaders: Barbarian AI often relies on "Warchief" units for morale buffs. Use archers or a hero unit to kite the mob while sniping the leader. Once the chief falls, the mob usually scatters or loses its attack bonus.
Fire Management: Keep a small "bucket brigade" (2-3 low-skill villagers) near critical infrastructure. Fire is the #1 village killer in these simulations, not the swords. 4. Post-Raid Recovery
Burial/Sanitation: Clear bodies immediately to prevent a "Plague" event, which often follows barbarian raids.
Wall Hardening: Replace wooden palisades with stone as soon as the "Hot" status clears.
Diplomatic Buffers: If the simulation allows, send a tribute to a neighboring neutral tribe to act as a buffer zone for the next wave.
The simulation begins at 0200 hours. The aggressors utilize the tree line to mask their thermal signature until they breach the palisade wall at the northern checkpoint.
T+00:05: The first torch is thrown. In a standard raid, barbarians might seek a quick plunder. In this "hot" simulation, the priority target is the structural integrity of the village. The AI pathfinding for the barbarians prioritizes the ignition of the granary and the longhouse.
During the simulation, throw these “hot” dilemmas at participants: