Lanchester Combat Model
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
Lanchester’s Square Law
An agent-based model to replicate basic Lanchester’s Square Law.
What It Is?
This section gives a general understanding of what the model is trying to show or explain.
Lanchester (1916) presented a now classic deterministic model of outcomes of ranged combat based on the fighting effectiveness and the troop strengths (i.e., number of soldiers) of two opposing forces. The system of differential equations that came to be known as the Lanchester Square Law for targeted fire is given by
b'(t)= -c r(t) , b(0)=b0 , r'(t)= -k b(t) , r(0)=r0 ,
where c and k are the fighting effectiveness coefficients of the red and blue forces, respectively, and b and r are the troop strengths of the blue and red forces, respectively.
The Lanchester Linear Law describes untargeted area fire:
b'(t)= -C b(t) r(t) , b(0)=b0 , r'(t)= -K r(t) b(t) , r(0)=r0 ,
How It Works
This section explains what rules the agents use to create the overall behavior of the model.
In the basic model, the agents are placed randomly, targeting occurs without regard for range, and all agents are homogeneous.
To setup, all variables and agents are cleared, and then the square space is filled with blue agent and red agents. To go, in random order, each agent kills exactly one enemy, if an enemy remains to kill.
Scenario 1: Accuracy as basic heterogeneity
Suppose a force's weaponry will kill an enemy with probability of given accuracy, at a range of 1 unit, with that probability decreasing exponentially with range. Each force unit will choose the closest target.
This modification alters the outcome of the battle: the blue forces can overcome the numerically larger red forces with their technological superiority.
Scenario 2: Further deviation from the Lanchester model
The red force is attacked from two sides by a blue force with only 90% their troop strength. Blue force weapons have mean accuracy of 0.62 at 1 unit distance, whereas red force weapons have mean accuracy of 0.60 at the same range, with individuals’ accuracy varying according to a normal distribution with a standard deviation of 0.1. Blue forces are short on ammunition, so they have orders to only fire from a maximum range of 5 units. The red forces, meanwhile, can fire at any range. If a soldier fires, they can move only 25% the distance that they could move otherwise.
This more complex model yields a slight advantage to the blue forces: over 100 replicates, 68 result in a blue victory. This result is statistically significant (p<0.001).
How To Use It
This section explains how to use the model, including a description of each of the items in the interface tab.
Running many iterations of this simulation, the mean number of agents remaining once one side has been killed is equal to that predicted by Lanchester’s Square Law.
The setup button starts a new setup based on the interface and global variables. The go button starts the simulation. The step button executes a single tick (step) only. The startup button prepares a default scenario.
Press one of the buttons scenario-one or scenario-two to set up the corresponding scenario.
THINGS TO NOTICE
This section could give some ideas of things for the user to notice while running the model.
THINGS TO TRY
This section could give some ideas of things for the user to try to do (move sliders, switches, etc.) with the model.
EXTENDING THE MODEL
This section could give some ideas of things to add or change in the procedures tab to make the model more complicated, detailed, accurate, etc.
NETLOGO FEATURES
This section could point out any especially interesting or unusual features of NetLogo that the model makes use of, particularly in the Procedures tab. It might also point out places where workarounds were needed because of missing features.
RELATED MODELS
This section could give the names of models in the NetLogo Models Library or elsewhere which are of related interest.
Credits and References
Christopher W. Weimer, J. O. Miller, Raymond R. Hill. Agent-Based Modeling: An Introduction and Primer. Proceedings of the 2016 Winter Simulation Conference, T. M. K. Roeder, P. I. Frazier, R. Szechtman, E. Zhou, T. Huschka, and S. E. Chick, eds. http://simulation.su/uploads/files/default/2016-weimer-miller-hill.pdf
Comments and Questions
breed[force-units force-unit] force-units-own[ force-range accuracy ] globals [ separated-forces? accuracy-deviation free-move battle-move ] to setup-globals set separated-forces? false set accuracy-deviation 0 set free-move 0 set battle-move 0 end to startup set initial-blue-forces 2000 set initial-red-forces 2050 set blue-accuracy 1 set red-accuracy 1 set blue-range max-range + 1 set red-range max-range + 1 set blue-area-fire? false set red-area-fire? false setup end to setup clear-all setup-globals setup-forces reset-ticks end to go if battle-finished? [ stop ] go-forces tick end to-report max-range report ceiling sqrt ( max-pxcor * max-pxcor + max-pycor * max-pycor ) end to setup-forces spwan-blue-forces spawn-red-forces end to setup-accuracy [accuracy-mean accuracy-standard-deviation] ifelse accuracy-standard-deviation > 0 [ set accuracy random-normal accuracy-mean accuracy-standard-deviation ] [ set accuracy accuracy-mean ] set accuracy min list 1 accuracy set accuracy max list 0 accuracy end to spwan-blue-forces create-force-units initial-blue-forces [ set color blue ifelse separated-forces? [ set xcor random-xcor set ycor (max-pycor / 2) + random-float (max-pycor / 2) if random 2 = 1 [ set ycor (- ycor) ] ] [ setxy random-xcor random-ycor ] setup-accuracy blue-accuracy accuracy-deviation set force-range blue-range ] end to spawn-red-forces create-force-units initial-red-forces [ set color red ifelse separated-forces? [ set xcor random-xcor set ycor (random-ycor / 2) ] [ setxy random-xcor random-ycor ] setup-accuracy red-accuracy accuracy-deviation set force-range red-range ] end to go-forces ask force-units [ force-unit-attack ] end to-report hostile-force-units report force-units with [color != [color] of myself] end to-report force-unit-select-target let target nobody let area-fire? ((color = blue and blue-area-fire?) or (color = red and red-area-fire?)) ifelse area-fire? [ let target-patch one-of patches if force-range < max-range [ set target-patch one-of patches in-radius force-range ] ask target-patch [ if any? force-units-here [ set target one-of force-units-here ] ] ] [ let targets hostile-force-units if force-range < max-range [ set targets targets in-radius force-range ] set target min-one-of targets [distance myself] ] report target end to force-unit-attack let target force-unit-select-target ifelse target != nobody [ face target if random-float 1 < (accuracy ^ (distance target)) [ ask target [ die ] ] force-unit-move battle-move ] [ force-unit-move free-move ] end to force-unit-move [ steps ] if steps > 0 [ if any? hostile-force-units [ let target min-one-of hostile-force-units [distance myself] face target ] forward steps ] end to-report battle-finished? report not any? turtles with [color = red] or not any? turtles with [color = blue] end to scenario-one set initial-blue-forces 2000 set initial-red-forces 2050 set blue-accuracy 0.95 set red-accuracy 0.9 set blue-range max-range + 1 set red-range max-range + 1 setup end to scenario-two set initial-blue-forces 1800 set blue-accuracy 0.62 set blue-range 5 set initial-red-forces 2000 set red-accuracy 0.6 set red-range max-range + 1 clear-all set separated-forces? true set accuracy-deviation 0.1 set free-move 1 set battle-move 0.25 setup-forces reset-ticks end
There are 4 versions of this model.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Lanchester Combat Model.png | preview | Preview for 'Lanchester Combat Model' | 12 months ago, by Thomas Rieth | Download |
This model does not have any ancestors.
This model does not have any descendants.