Battle of Trafalgar - Self Organisation Demonstrator

Battle of Trafalgar - Self Organisation Demonstrator preview image

1 collaborator

Default-person Matt Offord (Author)

Tags

complexity, self organisation, emergence, self organising criticality, naval strategy, organisational behaviour 

"The Battle of Trafalgar looks at informational superiority as a threshold value for self organising behaviour"

Tagged by Matt Offord almost 2 years ago

Visible to everyone | Changeable by the author
Model was written in NetLogo 6.2.2 • Viewed 434 times • Downloaded 10 times • Run 0 times
Download the 'Battle of Trafalgar - Self Organisation Demonstrator' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


WHAT IS IT?

This simulation is inspired by the Battle of Trafalgar 1805 and the book Power to the Edge (Alberts and Hayes 2003). As described by Alberts and Heyes (2003), when the Royal Navy Grand Fleet faced the combined French and Spanish fleets on 21st October 1805 they were outnumbered and outgunned. Yet the Royal Navy captured 21 enemy ships with no ships lost themselves. One reason for this may be the more flexible system of Command and Control (C2), used by the Royal Navy versus the rigid C2 system that was in common use. Nelson's tactical unorthodoxy gave the Royal Navy ships more scope to behave autonomously, collaboratively and to act on information they had. This is termed self-synchronisation by Alberts and Hayes (2003). They argue that this type of decentralised decision making is particularly important in the 21st Century as data abundance makes decentralised decision making more effective.

This model abastracts the concept of power to the edge from military applications to consider decision making in the 21st Century more broadly. The model is designed as a teaching aid, particularly for social science, business and military studies. The model simulates two fleets, red and blue. The disposition and characteristics of both fleets can be adjusted. Th red fleet can be made more autonomous and the results of the battle can be seen when this option is taken. The simulation demonstrates the advatages of switching to more decentralised decision making when there is sufficient information.

The model can be used to consider complexity more broadly especially:

Self-organisation Emergence Thresholds (self organising criticality)

HOW IT WORKS

Both fleets can be set to different sizes, speeds and health values. The two fleets will advance at right angles until they meet (this was called the 'crossing the 'T' manouvre. The ships will then detect enemies at close range (neighboring patches) and fire canon balls. If ships are hit, damage is taken and speed is reduced as a result of the damage (simulating the de-masting of the ships). The blue fleet aims to escape the red fleet, whilst the red fleet are aiming to stop the blue fleet escaping in large numbers. Additionally the accuracy of the red and blue guns can be changed from 0 to 100%.

To set the battle up like the actual Battle of Trafalgar:

Red Fleet: 27 ships, health 4, accuracy 75%, speed 8 sense 50

Blue Fleet: 33 Ships, health 5, accuracy 50%, speed 5

To see the famous 'crossing the 'T'' manouvre set delay to 20

The red fleet can be swtiched in and out of control-free modes. In control-free mode a delay can be set to allow the red ships to proceed normally to begin with. After the delay has passed, the red ships suddenly switch to control-free mode. This allows users to see the effect of the 'crossing the 'T'' manouvre before witnessing control-free behaviour. Additionally the red ships have a range at which they can detect and target blue ships. In control-free mode, the red ships will close the blue ships as described above. However, once the first encounter is complete, the red ships follow 3 rules:

Face target and close range

Fire on target once in range

Target a new blue ship once the first is destroyed

Self organisation Once the red ships are control-free, they follow the three rules given above. this has the effect of self organisation as the ships appear to target ships, sometimes collaboratively. The ships seems as if they are guided by some kind of leadership, but in fact they are not. This was termed self-synchronisation by Alberts and Heyes (2003), which is a specific term used in C2 research. This is more broadly comparable to self-organisation in complexity theory.

Emergence One the problems in understanding complexity is the challenge of 'thinking in levels' (Wilensky and Rand 2015, p. 12). The model demonstrates the emergence of red fleet behaviour from a few simple rules for individual agents.

Thresholds The sense variable can dialled up or down. At a certain threshold level the agent behaviour becomes 'organised and purposeful'.

HOW TO USE IT

Set health, number, speed and size of the fleets using the sliders on the interface. The health values (redhealth or bluehealth) are set from 1 - 5 as an arbitary value to allow some exchange of fire. The speed values (redspeed and bluespeed) are set between 0 and 10 knots. The number is the actual number of agents in each fleet.

Additionally, the red fleeet has the ability to switch between control-free mode (or not) A delay can be set, measured in ticks, so that if, in control-free mode, there is a delay in switching to independent behaviour. This allows the model to demonstrate the difference in bahaviours in either mode and for users to see the effect of the 'crossing the 'T''manouvre, if interested.

Red ships can sense enemies according to a slider which determines the number of patches the red ship can detect an enemy over. The maximum is 100 which allows the red ship to detect any of the blue ships.

Once the battle has been set up, select go. The model will run until either the red or blue fleets are destroyed. A damage plot reports the number of remaining blue and red ships, while damage monitors report the units of battle damge in each fleet. Two moniters also report the remaining totals for each fleet. Another monitor reports the number of targeted blue ships. Users can try controlling the blue fleet with the manual control buttons to change speed and direction.

Set paramters as reqiured, click setup and the go.

THINGS TO NOTICE

Once the red fleet start exchanging fire (in control-free mode), there is a sudden and noticeable change in behaviour. The red ships suddenly change direction and appear to hunt down the blue ships. If not in control-free mode, toggling to autonomous mode also creates this change in behaviour.

The red fleet behave in a coordinated way, working together to target the blue ships with multiple red ships. The red ships coordinate with blue ship direction and speed to target them. Red ships may split into multiple groups to pick off blue ships who are isolated from the fleet. This is self organising behaviour and not coded into the simulation.

THINGS TO TRY

Try toggling between control-free and normal modes. Notice the difference in outcome of the battle and the behaviour of the red fleet.

Try changing the range at which red ships can detect blue ships using sense. What happens when red ships are starved of information.

Try stacking the odds for the blue fleet by increasing their numbers and gun accuracy. If the red fleet are control-free, can the blue fleet win?

Try taking control of the blue ships to evade the red fleet. How difficult is it? What happens when you loose focus even briefly?

EXTENDING THE MODEL

The model could be extended by having more complex blue tactics coded into the model, for example the blue ships could periodically change direction.

NETLOGO FEATURES

The netlogo switch allows a clear demonstration of the autonomous and non-automous behaviours.

RELATED MODELS

CREDITS AND REFERENCES

This model was developed by Dr Matt Offord 2022 at Adam Smith Business School as a teaching resource for 21st Century leadership. The idea was inspired by:

Alberts, David & Hayes, R.E.. (2003). Power to the Edge. CCRP Publication Series.

Wilensky, U., & Rand, W. (2015). An Introduction to Agent-Based Modeling: Modeling Natural, Social, and Engineered Complex Systems with NetLogo. The MIT Press. http://www.jstor.org/stable/j.ctt17kk851

Please cite the NetLogo software as:

Wilensky, U. (1999). NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL. COPYRIGHT AND LICENSE Copyright 2002 Uri Wilensky.

CC BY-NC-SA 3.0

This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License. To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.

Commercial licenses are also available. To inquire about commercial licenses, please contact Uri Wilensky at uri@northwestern.edu.

This model and associated activities and materials were created as part of the project: MODELING ACROSS THE CURRICULUM. The project gratefully acknowledges the support of the National Science Foundation, the National Institute of Health, and the Department of Education (IERI program) -- grant number REC #0115699. Additional support was provided through the projects: PARTICIPATORY SIMULATIONS: NETWORK-BASED DESIGN FOR SYSTEMS LEARNING IN CLASSROOMS and/or INTEGRATED SIMULATION AND MODELING ENVIRONMENT -- NSF (REPP & ROLE programs) grant numbers REC #9814682 and REC-0126227.

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

;; Welcome to the Battle of Trafalgar

;;initialise:
;;    Create two fleets with suitable dispositions
;; establish two fleets differentiated by colour, allow differences in size resilience etc.

;;at each tick
;; both fleets move
;; in range, ships determine if they have been damaged by the other fleet (stochastic element)
;;ships hit suffer damage
;; ships with no health are sunk
;; redships move at right angles to blue ships (known as crossing the T) for a set period before becoming 'control free' then red ships target blue ships, acting independently
;; red ability to target is governed by the radius at which they can sense blue ship to create informational superiority
;; red ships will be autonomous while blue ships can only move according to their orders or as manually controlled


globals[
bluecaptive;;blue and red captives create a tally of blue/red losses
redcaptive
]



breed [friends friend];; these will be red ships as the model is based on the red fleet perspective, friends and enemies are used soley to avoid confusion with netlogo primitives
breed [enemies enemy];;blue ships
breed [arrow arrows];;this will be for wind direction, at the moment this play no role in the sim so this can be removed.  Possible extensions can use wind speed and direction to aid or hinder ships depending on direction of travel.  This would create a more realistic battle




turtles-own [health speed age];; for both fleets we will use health and speed as variables in combat, age for specific timed operations

to setup
  clear-all
  ask patches [set pcolor 88];;create light blue background for sea
  set redcaptive 0;; losses at zero to start
  set bluecaptive 0;;losses at zero to start



  create-arrow 1[;;creates a windguage, this can be used in extensions to create a more realistic model
    set xcor -12
    set ycor 12;;top right corner like an old map
    set shape "arrow";;indicates direction of wind
    set color 90;;black
    set size 2;;big enough to stand out
    set heading wind_direction;; wind direction can be set at interface
    ]



  create-enemies blue_number [;;blue number is set as global using a slider
    set color blue
    set size 0.5
    set xcor 10;; situate enemy fleet to the east
    set ycor random -16 ;;situate enemy fleet to the south
    set heading 0;; can be north but just to get more distance covered
    set health blue_health;; set on slider
    set speed blue_speed / 10 ;; set on slider the division by 10 allows realistic speed in knots (nautical miles per hour) to translate to an observable speed in the model
    separate-enemies;;spreads enemies out
  ]
  create-friends red_number [;; friendly ship set up
    set color red
    set size 0.5
    set xcor random -16;;sets friendlies in eastern half of battle space
    set ycor random 2 ;;creates two columns
    set heading 90;; sets an initial heading of west
    set health red_health;;set on slider the division by 10 allows realistic speed in knots (nautical miles per hour) to translate to an observable speed in the model
    set speed red_speed / 10;; set on slider
    seperate-friends
  ];; set number of red ships, heading east along centre line

  reset-ticks
end 

to go

  ask patches [set pcolor 88 ];; make sure the map remains sea coloured as firing creates yellow patches which should be temprary 'flashes'

  let bluecount count enemies;; end of game module
    if bluecount = 0 [;; blue ships destroyed
      print "Game Over"
      stop
    ]

   let redcount count friends;;end of game module
    if redcount = 0 [;; redships destroyed
      print "Game Over"
      stop
    ]

  ask friends [;; the red fleet is to move forward and also look for enemies to fire upon
    check-damage;; check if ship has been hit
      fd speed;; this will be the speed set as redspeed
    if age > delay[;; delays the point at which red ships act control free, this allows them to complete as many passes as necessary to show what happens in closely controlled battle.  The difference in red behaviour is noticed once the delay time has elapsed and red ships shift to control-free
      pursue;;engage the three rules: target/close range/fire sub routine in control-free mode
    ]
    increment-age;; allows a global measurement of time elapsed
  ]

  ask enemies [;;similar to friends module but using shells rather than balls and shoot rather than fire to prevent friendly fire
    check-damage-from-friends;; check if ship has been hit
    fd speed;; move forward at bluespeed

  ]



  tick
end 

to check-damage;; red ships can be hit by a blue ship firing a 'broadside' i.e. canons firing to the left and right sides, additionally for this model red ships can be hit from astern by blue ships (this is a hack to make the 'face' primitve for targeting work for red and therefore the same conditions for blue to prevent bias in the model
  ask friends[
    if any? enemies-on patch-left-and-ahead 180 1[;;astern / behind
      if random-float 100 < blue_accuracy[;;hit?
        ask patches in-radius 1 [set pcolor yellow];;flash
        set health health - 1;;take damage
        set color 26;;change colour indicating damage (orange)
        if speed > 0 [set speed speed - 0.1];;slow down due to demasting
        if health = 0 [set redcaptive redcaptive + 1];;count losses
        if health = 0 [die];;destroyed or captured
        if speed = 0 [die];;destroyed or captured
    ]
  ]
     if any? enemies-on patch-left-and-ahead 90 1 [;; this checks for enemies abeam and port (i.e. at 90 degrees to the left) and in canon range
      if random-float 100 < blue_accuracy[;;check to see if the enemy has hit the target
        ask patches in-radius 1 [set pcolor yellow];;create a 'flash'
        set health health - 1;;take damage
        set color 26;;damaged ships are a different colour (orange)
        if speed > 0 [set speed speed - 0.1];;slow down because of damage
        if health = 0 [set redcaptive redcaptive + 1];; loss count
        if health = 0 [die];; destroyed/captured
        if speed = 0 [die];;destroyed/captured
    ]
  ]
    if any? enemies-on patch-right-and-ahead 90 1 [;; this checks for enemies abeam and port (i.e. at 90 degrees to the right) and in canon range
      if random-float 100 < blue_accuracy[;;check to see if the enemy has hit the target
        ask patches in-radius 1 [set pcolor yellow];;create a 'flash'
        set health health - 1;;take damage
        set color 26;; turn orange
        if speed > 0 [set speed speed - 0.1];; slow down because of damage
        if health = 0 [set redcaptive redcaptive + 1];;loss count
        if health = 0 [die];;destroyed / damaged
        if speed = 0 [die];;destroyed / damaged
    ]
  ]
  ]
end 

to check-damage-from-friends;;blue ships can be attacked from the broadside attacks but also from a red ship astern (firing ahead). Strictly this wasn't a feature of the battle but in order to use the 'face' primitive to target blue ships red ships need to be able to fire ahead
   ask enemies[
    if any? friends-on patch-left-and-ahead 180 1[;;astern
      if random-float 100 < red_accuracy[;;hit?
        ask patches in-radius 1 [set pcolor yellow];;flash
        set health health - 1;;take damage
        set color 126;;change coloour
        if speed > 0 [set speed speed - 0.1];;slowed by damage
        if health = 0 [set bluecaptive bluecaptive + 1];;update losses
        if health = 0 [die];;destroyed/captured
        if speed = 0 [die];;destroyed/captured
    ]
  ]
     if any? friends-on patch-left-and-ahead 90 1[;;port beam
      if random-float 100 < red_accuracy[;;hit?
        ask patches in-radius 1 [set pcolor yellow];;flash
        set health health - 1;;take damage
        set color 126;; change colour
        if speed > 0 [set speed speed - 0.01];;slow down due to damage
        if health = 0 [set bluecaptive bluecaptive + 1];;count losses
        if health = 0 [die];;destroyed/captured
        if speed = 0 [die];;destroyed/captured
    ]
  ]
     if any? friends-on patch-right-and-ahead 90 1[;;starboard beam
      if random-float 100 < red_accuracy[;;hit?
        ask patches in-radius 1 [set pcolor yellow];;flash
        set health health - 1;;take damage
        set color 126;;change colour
        if speed > 0 [set speed speed - 0.1];;slow down due to damage
        if health = 0 [set bluecaptive bluecaptive + 1]
        if health = 0 [die];;destroyed/captured
        if speed = 0 [die];;destroyed/captured
    ]
  ]
  ]
end 

to separate-enemies ;;space out enemies
  if any? other enemies-here [;; check for more enemies in same space
    set heading 270;;head west
    fd 2;;go two patches
    set heading 0;; return to original course
  ]
end 

to seperate-friends;;space out friends
  if any? other friends-here[;;check for red ships in same space
    set heading 180;;head south
    fd 1;; move 2
    set heading 090;; back to original course
  ]
end 

to increment-age;;method og calculating global time elapsed
  set age (1 + age)
end 

to pursue;; red ships target blue ships and 'hunt' by linking, closing distance and firing
   ask friends [
    if control-free = "yes" [;;user input for control-free mode, red ships only act independently if this is selected
    if distance one-of enemies < sense [;;gives red ships a situational awareness range called sense (range and distance are netlogo primitives)
      if count link-neighbors > 0[;;do you have a target?
    let linked-target one-of link-neighbors;;assign target to variable linked-target
    face linked-target;;face the target
          if speed < 0.1 [set speed speed + 0.05];;increase speed (this will overcome a certain amount of damage
  ]
      if count link-neighbors < 1 [;;if there is no target
       create-link-to one-of enemies[hide-link]];;link to target
    ]
    ]
  ]
end 

There is only one version of this model, created almost 2 years ago by Matt Offord.

Attached files

File Type Description Last updated
Battle of Trafalgar - Self Organisation Demonstrator.png preview Preview for 'Battle of Trafalgar - Self Organisation Demonstrator' almost 2 years ago, by Matt Offord Download

This model does not have any ancestors.

This model does not have any descendants.