Lexington Land Battle
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
This is a model of a battle from the American Revolution. It shows how individual soldiers acted based on the soldiers near them and how they reacted to generals. While the battle is presented here as very organized (for clarity), these battles would have been very confusing, and success would have had to have emerged from the actions of each soldier.
Commanders are portrayed in this model also. However, unlike most portrayals of battles from this time period, the user is not given control over these commanders. This can give the user a new perspective on the effectiveness of commanders in these kinds of battles.
Actual fighting, with bullets or cannon fire, is not visualized in this model, though soldiers do take damage. This was done to provide clarity to the user of the main features of the model.
HOW IT WORKS
The rules in this model are followed by each soldier. The commanders also have a few rules.
Soldiers have a morale value. They increase this morale when:
- they hear a command from their commander
- when the morale of their nearby soldiers increases
They decrease their morale when:
- they take damage (a random value linked to their position in the battle)
- when morale of their nearby soldiers decreases
Training Level affects the rate of these increases and decreases.
Soldiers also become deserters when their morale drops too low.
Commanders follow one rule:
- At intervals based on CommanderSkill, give commands to troops in a cone based on CommanderInfluence. These commands raise morale for soldiers who hear them.
HOW TO USE IT
To experiment with this model, users can set up a number of battle conditions.
MilitaSize and BritishArmy_Size -- increase or decrease the starting army sizes
NumMilitaCommanders and NumBritishCommanders -- change the number of Commanders each army starts with
Commander_Skill -- how often a commander gives a command
Commander_Influence -- how far a command carries across the soldiers
THINGS TO NOTICE
After selecting go, you can watch the shading of the soldiers change as their morale increases or decreases. You can start to look for patterns arise at different moments in the battle.
Plots -- these display the number of soldiers in each army bucketed by morale values (high & low)
Counts -- these display the number of troops remaining in each army
Avg Morale -- these display the average morale across each army at the given moment
THINGS TO TRY
- At first, run the model with a high number of soldiers on one army and a low number in another army. Does this effect how morale moves across the soldiers?
- Play with the influence and skill of the commanders. Try making one army have a highly effective commander and the other a weaker leader. What happens if one army has many more leaders? Are the leaders influential? Are there other factors which might seem more influential in raising morale?
- Try turning startingmoraleequal? on. Instead of getting a random morale value at the start of the fight, the soldiers now inherit the morale value you give them. What are scenarios when this might be more realistic in going into a battle?
EXTENDING THE MODEL
How might there be different starting positions for the soldiers that would be less rigid. Guerilla tacticts were sometimes (though not as often as portrayed in movies) utilized by soldiers during this war. How might you introduce some of these kinds of movements, and how would soldiers morale be affected by their peers in those kinds of battles?
In addition to movement, what other kinds of factors could be introduced to influence morale? Could individual soldiers tell that they were winning? What could be introduced to this model to help them feel momentum?
CREDITS AND REFERENCES
(a reference to the model's URL on the web if it has one, as well as any other necessary credits, citations, and links)
Comments and Questions
Globals [ two-armies ;; a way to count all soldiers on both sides of the battle ] breed [ Csoldiers a-Csoldier ] breed [ Britsoldiers a-Bsoldier ] breed [ Ccommanders a-Ccommander ] breed [ Britcommanders a-Bcommander ] turtles-own [ morale ;; this is the desire to fight of each soldier damage ;; this is a simulation of bullets. It is not visualized to keep from distracting the model user origin ;; this variable is used to calculate distances the soldiers are from enemies ] ; ======================== Setup ==================== to setup clear-all reset-ticks make-battlefield ;; this puts the soldiers into rows and places the commanders at the back of the columns set-distance-from-front ;; this establishes the origin for each soldier end ;; In the following proceedures, soldiers are given an initial xy cor based in columns, ;; given a initial color to denote their side of the battle, ;; and given an initial morale. This morale value is equal for all soldiers on each side if that switch is turned on. ;; These setup instructions are the same for the commanders to make-battlefield set-default-shape Csoldiers "person" set-default-shape Britsoldiers "person" set-default-shape Britcommanders "chess knight" set-default-shape Ccommanders "chess knight" set two-armies turtles with [ breed = "Csoldiers" or breed = "Britsoldiers" ] make-Csoldiers make-Ccommanders make-Britsoldiers make-Britcommanders end to make-Csoldiers create-Csoldiers militia_size [ setxy (random -10 - 3) (random 16 + random -16) set heading 90 set color blue ifelse Start_Morale_Equal? [ set morale Starting_Desire_to_Fight_militia - random 30 ] [ set morale (random 50) + 10 ] ] end to make-Ccommanders create-Ccommanders Num_Militia_Commanders [ setxy -15 (random 10 + random -10) set heading 90 set size 2 set color blue ] end to make-Britsoldiers create-Britsoldiers British_Army_Size [ setxy (random 10 + 3) (random 16 + random -16) ;could use (world-height * who / militia_size) ?? set heading 270 set color red ifelse Start_Morale_Equal? [ set morale Starting_Desire_to_Fight_militia - random 30 ] [ set morale (random 50) + 10 ] ] end to make-Britcommanders create-Britcommanders Num_British_Commanders [ set shape "chess knight" setxy 15 (random 10 + random -10) ; if any? turtles touching, move +1 on y axis set size 2 set heading 270 set color red ] end to set-distance-from-front ask turtles [ set origin [ xcor ] of self ] end ;======================== Go ======================== to go visualize-morale ;; this changes the shading of each soldier to show the user the morale spread fight-soldiers ;; this is the set of commands that tell soldiers how much damage to take from battle give-commands ;; this set of commands is how the Commanders "instruct" their troops declare-winner ;; this displays a message to a user when a side of the battle has won tick end ; ====================== Code ======================= ;; this scales the colors based on the morale of each soldier. This doesn't happen on the first tick, ;; and it rechecks every .25 seconds ;; darker shades = low morale ;; lighter shades = high morale to visualize-morale every .25 [ ifelse ticks <= 1 [stop] [ ask Britsoldiers [ set color scale-color red morale -50 150] ask Csoldiers [ set color scale-color blue morale -50 150 ] ] ] end ;; this is how commanders instruct their soldiers. The instructions are seen as positive to morale. ;; Commander_skill tells how often orders go out. ;; Commander_influences effects how far the cone directs the message of positive morale ;; morale is capped at 100 because the color-scaling gets washed out to give-commands every (20 / commander_skill) [ ask Britcommanders [ ask Britsoldiers in-cone (commander_influence * 1.5) 180 [ set morale (morale + (training_level / 2)) if morale > 100 [ set morale 99 ] ] ] ask Ccommanders [ ask Csoldiers in-cone (commander_influence * 1.5 ) 180 [ set morale (morale + (training_level / 2)) if morale > 100 [ set morale 99 ] ] ] ] end ;; this displays a message to the user when one of the armies has no soldiers left, commanders are not counted to declare-winner if (count Csoldiers <= 0) or (count Britsoldiers <= 0) [ ifelse count Csoldiers < count Britsoldiers [ user-message (word "the British have won this battle with " count Britsoldiers " left") ] [ user-message (word "the Colonists have won this battle with " count Csoldiers " left")] ] end ;==================================== Soldier Rules ================================= to fight-soldiers take-damage desert end ;; take-damage simulates soldiers getting wounded in battle. to take-damage ;; prevents damage before battle is set up completely ;; continues every 2 seconds if ticks >= 4 [ every 2 [ ask Britsoldiers [ ;; this makes the damage random based on distance from enemy (bullets were highly innacurate) set damage (random 50 / abs origin ) ;; if damage is high, it effects the soldier's morale if damage >= 5 [set morale (morale - 10) ] ;; if damage is really high, the soldier may die, also this effects the morale of other soldiers nearby if damage >= 7 [ let die-chance random 100 if die-chance >= 70 [ die ] damage-other-brit ] if morale >= 90 [morale-up-other-brit ] ] ;; this is the same code as above but for Milita soldiers ask Csoldiers [ set damage ( random 50 / abs origin ) if damage >= 5 [set morale (morale - 10) ] if damage >= 7 [ let die-chance random 100 if die-chance >= 70 [ die ] damage-other-militia ] if morale >= 90 [ morale-up-other-militia ] ] ] ] end to damage-other-brit ;; this lowers morale when you see your neighbor get damage ask Britsoldiers in-cone (training_level / 2) 360 [ set morale morale - 1] ;; also we want the damage to be recognized by the other side, ;; so this next code increases moral when damage is delt ask Csoldiers in-cone 10 360 [ set morale (morale + .5) if morale > 100 [ set morale 99 ] ] end to morale-up-other-brit ;; this allows soldiers to ride your momentum and get some morale from your success ask Britsoldiers in-cone (training_level / 2) 360 [ set morale (morale + (training_level / 4 )) ;; this next line makes sure morale never goes over 100 if morale > 100 [ set morale 99 ] ] end to damage-other-militia ;; this code is the Milita version of damage-other-brit ask Csoldiers in-cone ( training_level / 2 ) 360 [ set morale morale - 1] ask Britsoldiers in-cone 10 360 [ set morale (morale + .5) if morale > 100 [ set morale 99 ] ] end to morale-up-other-militia ;; this code is the Milita version of morale-up-other-brit ask Csoldiers in-cone (training_level / 2 ) 360 [ set morale (morale + (training_level / 4 )) if morale > 100 [ set morale 99 ] ] end ;; desert causes soldiers with very low morale to leave the battlefield to desert if ticks >= 10 [ ask Britsoldiers [ if morale <= 1 [ die ] ] ask Csoldiers [ if morale <= 1 [ die ] ] ] end
There is only one version of this model, created over 6 years ago by Wade Berger.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Lexington Land Battle.png | preview | Preview for 'Lexington Land Battle' | over 6 years ago, by Wade Berger | Download |
This model does not have any ancestors.
This model does not have any descendants.