Battle of the Chesapeake
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 naval battle from the time period of the American Revolutiono. It shows how individual ships acted based on the other ships around them and how they reacted to commands given by admirals aboard flagships. These battles would have been very confusing, and success would have had to have emerged from the actions of each soldier on each ship.
Admirals are lead ships within this model. 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 ships do take damage and cannon fire clouds are generated to provide obstacles for the ships. 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.
Ships have a morale value. They increase this morale when:
- they hear a command from their Admiral
- when the morale of nearby friendly ships increases.
They decrease their morale when:
- they take damage, both through random chance of getting hit, and from collisions with other ships.
- when morale of their nearby ships decreases
Training Level affects the rate of these increases and decreases.
Ships also become deserters when their morale drops too low.
Commanders follow one rule:
- At intervals based on AdmiralSkill, give commands to troops in a cone based on AdmiralInfluence. 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.
Navy-Size and BritishNavySize -- increase or decrease the starting army sizes
Num_Admirals -- change the number of Commanders each army starts with
Admiral_Skill -- how often an Admiral gives a command
Admiral_Influence -- how far a command carries across to nearby ships
THINGS TO NOTICE
After selecting go, you can watch the shading of the ships 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 ships of each navy bucketed by morale values (high & low)
Counts -- these display the number of ships remaining in each navy
Avg Morale -- these display the average morale across each navy at the given moment
THINGS TO TRY
- At first, run the model with a high number of ships on one navy and a low number in another army. Does this effect how morale moves across the ships?
- Play with the influence and skill of the admirals. What happens if one navy 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 ships now inherit the morale value you give them. What are scenarios when this might be more realistic in going into a battle?
- This model has a few noticable differences from the land battle version. How does movement of the ships effect the spread of morale? How does the smaller number of ships available in the model effect morale increases or decreases?
EXTENDING THE MODEL
Could you add individual soldiers to each ship? How might their morale contribute to an overall ship-morale?
What other factors of a naval battle are missing from this model? How might you introduce goals into the simulations, where each ship might want to reach a certain point of land or eliminate a certain number of enemy ships? These factors could be added to influence morale of the ships/soldiers.
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-navies ;; a way to count all ships on both sides of the battle ran-ship ;; picks a random ship to show in the monitor ran-enemyship ;; picks a random enemy ship to show in the monitor ] breed [ ships a-ship ] breed [ enemyships a-enemyship ] breed [ admirals a-admiral ] breed [ smokeclouds a-smokecloud ] 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 target ;; this variable is used to aim at enemy ships ] patches-own [ crowded-seas ] ; ======================== Setup ==================== to setup clear-all reset-ticks make-battlefield ;; this puts the ships into rows and places the admirals at the back of the columns make-ran-ships end ;; In the following proceedures, ships 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 ships on each side if that switch is turned on. ;; These setup instructions are the same for the admirals to make-battlefield set-default-shape turtles "boat top" set two-navies turtles with [ breed = "Ships" or breed = "enemyships" ] make-Ships make-admirals make-enemyships ask patches [ set pcolor 89 set crowded-seas patches in-radius 3 ] end to make-Ships create-Ships Navy-Size [ setxy (random -10 - 3) (random 16 + random -16) set size 3 set heading 90 set color blue ifelse Start_Morale_Equal? [ set morale Starting_Desire_to_Fight_Ships - random 30 ] [ set morale (random 50) + 10 ] ] end to make-admirals create-admirals Num-Admirals [ setxy -15 (random 10 + random -10) set heading 90 set size 4 set color blue ifelse Start_Morale_Equal? [ set morale Starting_Desire_to_Fight_Ships - random 30 ] [ set morale (random 50) + 10 ] ] end to make-enemyships create-enemyships Enemy-Navy-Size [ setxy (random 10 + 3) (random 16 + random -16) ;could use (world-height * who / militia_size) ?? set size 3 set heading 270 set color red ifelse Start_Morale_Equal? [ set morale Starting_Desire_to_Fight_Ships - random 30 ] [ set morale (random 50) + 10 ] ] end to make-ran-ships set ran-ship random navy-size set ran-enemyship random enemy-navy-size end ;======================== Go ======================== to go visualize-morale ;; this changes the shading of each soldier to show the user the morale spread fight-ships ;; this is the set of commands that tell ships how much damage to take from battle give-commands ;; this set of commands is how the admirals "instruct" their fleet declare-winner ;; this displays a message to a user when a side of the battle has won generate-smoke ;; creates smoke from cannon fire on the battle field that ships avoid and increases confusion 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 enemyships [ set color scale-color red morale -50 150] ask Ships [ set color scale-color blue morale -50 150 ] ask admirals [ set color scale-color blue morale -50 150 ] ] ] end ;; this is how admirals instruct their fleet. The instructions are seen as positive to morale. ;; admiral_skill tells how often orders go out. ;; admiral_influences effects how far the cone directs the message of positive morale, in the naval battle this goes out in 360 degrees ;; morale is capped at 100 because the color-scaling gets washed out to give-commands float every (20 / admiral-skill) [ ask admirals [ ask Ships in-cone (Admiral-influence * 2.5 ) 360 [ 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 ships left, admirals are not counted to declare-winner if (count Ships <= 0) or (count enemyships <= 0) [ ifelse count Ships < count enemyships [ user-message (word "the British have won this battle with " count ships " Colonist ship(s) surrendering") ] [ user-message (word "the Colonists have won this battle with " count enemyships " British ship(s) surrendering")] ] end to generate-smoke every 4 [ create-smokeclouds random 2 ask smokeclouds [ setxy random-xcor random-ycor set shape "cloud" set color grey set size 5 if count smokeclouds >= 10 [ die ] ] ] end ;==================================== Soldier Rules ================================= to fight-ships float take-damage desert end to float every .5 [ ask enemyships [ ifelse any? other turtles in-cone 5 20 [ rt 90 fd 1 ] [ rt -20 fd 2 ] if any? other turtles in-cone .5 360 [ set damage damage + .5] if any? other enemyships in-cone 2 360 [set morale morale + 10] ] ask ships [ ifelse any? other turtles in-cone 5 20 [ rt 90 fd 1 ] [ rt -20 fd 2 ] if any? other turtles in-cone .5 360 [ set damage damage + .5] ] ask admirals [ ifelse any? other turtles in-cone 5 20 [ rt 90 fd 1 ] [ rt -20 fd 2 ] if any? other turtles in-cone .5 360 [ set damage damage + .5] ] ] end ;; take-damage simulates ships getting wounded in battle. to take-damage ;; prevents damage before battle is set up completely ;; continues every 2 seconds if ticks >= 4 [ ; xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx collision damage ask patch-here if turtles-on = 2 every 2 [ ask enemyships [ ;; this makes the damage random based on distance from enemy (bullets were highly innacurate) set damage (random 10 ) ;; 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 ships nearby if damage >= 7 [ let die-chance random 100 if die-chance >= 70 [ die ] damage-other-enemy ] if morale >= 90 [morale-up-other-enemy ] ] ;; this is the same code as above but for ships ask Ships [ set damage ( random 10) 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 ] ] ask admirals [ set damage ( random 10) 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-enemy ;; this lowers morale when you see your neighbor get damage ask enemyships 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 Ships in-cone 10 360 [ set morale (morale + .5) if morale > 100 [ set morale 99 ] ] end to morale-up-other-enemy ;; this allows ships to ride your momentum and get some morale from your success ask enemyships 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-enemy ask Ships in-cone ( training_level / 2 ) 360 [ set morale morale - 1] ask enemyships 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-enemy ask Ships in-cone (training_level / 2 ) 360 [ set morale (morale + (training_level / 4 )) if morale > 100 [ set morale 99 ] ] end ;; desert causes ships with very low morale to leave the battlefield to desert if ticks >= 10 [ ask enemyships [ if morale <= 1 [ die ] ] ask Ships [ 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 | |
---|---|---|---|---|
Battle of the Chesapeake.png | preview | Preview for 'Battle of the Chesapeake' | over 6 years ago, by Wade Berger | Download |
This model does not have any ancestors.
This model does not have any descendants.