ANZ Continental Drift NetLogo Model

Produced for the book series "Exercises for Artificial Intelligence";

Author: W. J. Teahan; Publisher: Ventus Publishing Aps, Denmark.

powered by NetLogo

view/download model file: ANZ-Continental-Drift.nlogo

WHAT IS IT?

This model shifts New Zealand back towards Australia in order to illustrate the process of continental drift. In effect, the model is running time backwards in order to show where New Zealand was in relation to Australia millions of years ago.


WHAT IS ITS PURPOSE?

The main purpose of the model is *not* to accurately simulate what has occurred during the continental drift process between Australia and New Zealand over hundreds of millions of years (since that would require much more code well-grounded in scientific evidence than what is used in this model). Instead, the primary aims of the model are to provide a simple animation of the concept of continental drift, to allow the user to try out different possibilities to see where Australia and New Zealand might have one time been joined, and importantly to show how the process of continental drift has occurred over millions of years.

One salient insight that can be gained from the knowledge of how this process has occurred is that species will have to adapt to epoch-level changes if they are to survive for a very long time.


HOW IT WORKS

The model uses the import-pcolors command to load a map of Australia and New Zealand and convert the image into patch agents. In order to simplify the shifting of New Zealand back to Australia, these patch agents are replaced with turtle agents, yellow and green for Australia, and black for New Zealand, to signify the traditional colours of the respective countries. Then a simple translation on a specific heading with some warping is used to move all the black agents back closer to the yellow and green ones.

Clearly, these simulated transformations are nothing like the type of transformations that have occurred during the real process of continental drift between Australia and New Zealand. For example, in the model Australia remains static and does not drift in the simulation - only New Zealand does. However, as stated above, much more code would be required to get a decent simulation that more accurately represents what occurred during the real-life process. (And this was not the primary purpose of the model).


HOW TO USE IT

To reset the simulation and load the present day shapes and relative positions of Australia and New Zealand, press the setup button. To start the process of "winding the clock back" so that New Zealand gradually creeps it way back to Australia, press the continental-drift button.

If you want New Zealand to end up at a different location, then change the values of the sliders to suit.


THE INTERFACE

The buttons in the Interface are defined as follows:

- setup: This button clears the environment and resets the variables, then loads the map of present-day Australia and New Zealand.

- continental-drift: This button simulates the process of continental drift by drawing the relative positions of the two countries as the clock is wound backwards.

The sliders and monitor in the Interface are defined as follows:

- max-ticks: This is the maximum number of ticks that the model should be run for. If this number is too high, then New Zealand will eventually run through the middle of Australia (unless the values of the other sliders means that it ends up heading elsewhere). If this number is too low, then the animation will stop early.

- years-per-tick: This sets the number of years per tick of the simulation. This number multiplied by the number of ticks is the number that appears in the Years ago monitor.

- NZ-stamp-ticks-modulus: This determines how many times the shape of New Zealand is "stamped" during the simulation. When the remainder of the number of ticks divided by this number is 0, then all New Zealand agents (i.e. the agents coloured black) will be stamped, thereby leaving an impression in the environment of their current position at the time of the stamping. This can be used to give an impression of where New Zealand has been at earlier stages of the animation.

- NZ-heading: This is the heading of New Zealand as it moves towards Australia. Changing this to another value will result in New Zealand heading elsewhere.

- NZ-forward-increment: This controls how far New Zealand moves forward each tick on the heading specified by the NZ-heading slider.

- NZ-xcor-warp-factor, NZ-ycor-warp-factor: A straight translation of New Zealand towards Australia on a direct heading does not work - the two countries end up hitting each other where their shapes do not fit well together. These sliders can be used to warp the shape of New Zealand along the x and y axes respectively so that the shapes more closely fit together when the two countries eventually reach each other.

- Years ago: This monitor reports the model's estimate of the number of years ago when the two countries were in the relative positions depicted by the simulation. This number is equal to the following: ticks * years-per-tick.


THINGS TO NOTICE

Notice that it is not clear where New Zealand should end up joining with Australia. The presence of Tasmania adds an interesting factor in the equation. If you run the simulation several times with different slider values, you will find out that no simple transformation is possible that will lead to a satisfactory joining up of the two countries. Either New Zealand has to be stretched (as in the model), or an added rotation is required to rotate the country slightly around a central rotation point (such as the present day location of Picton) while New Zealand is being translated in a north-west direction towards Australia.


THINGS TO TRY

Play around with different values in the sliders. Try to get New Zealand to miss Australia all together, or alternatively, have New Zealand end up wafting through the middle of it.

Try changing the values of the sliders during the middle of the simulation to see if you change New ZealandÕs direction dynamically. Especially try dynamically changing the value of the NZ-xcor-warp-factor and NZ-ycor-warp-factor sliders. Warping New Zealand will change its direction slightly. (Why?) This can also be changed back again at a latter stage of the simulation.


EXTENDING THE MODEL

Change the model so that Australia moves as well. This will make the animation look better, but will also slow it down. Why?

Have a go at changing the simulation in the model so that that it more accurately reflects projections that are based on scientific evidence. Once you have perfected it for the relatively straightforward situation of the drifting apart of Australia and New Zealand, then adapt your model so that it works for the entire world. Run your model backwards until you reach the time when there was just a single "super" continent - Pangaea.


NETLOGO FEATURES

The import-pcolors command is used to load the map of Australia and New Zealand. The stamp command is used to stamp the shape of New Zealand at various stages of the simulation. Note also the use of the sprout command to create a turtle agent for each patch agent, where the colour is changed to black for New Zealand and yellow and green for Australia. The change of colour makes the coding much easier for identifying which agents to shift around. Either changing part of the environment (for example, by adding a different coloured border around the outside) or changing a specific set of agents by altering a property (such as colour) is a common trick that can be used in NetLogo to greatly simplify the coding.


CREDITS AND REFERENCES

To refer to this model in publications, please use:
Teahan, W. J. (2010). ANZ Continental Drift NetLogo model. Exercises for Artificial Intelligence. Ventus Publishing Aps.


PROCEDURES

; ANZ Continental Drift model.
;
;
; Copyright 2010 William John Teahan. All Rights Reserved.
;
globals
[
  years-ago   ; how many years ago since present time (i.e. the number of years that
              ; have passed in the simulation)
]

to setup
  ;; sets up the environment and creates the map of present-day Australia and New Zealand.

  clear-all

  ask patches [ set pcolor white ] ; make the background white
  import-pcolors "Australia-NZ-Map.png"

  ; sprout agents from all the non-white patches  
  ask patches with [pcolor != white]
  [ sprout 1
    [
      set shape "circle"
      ; make the colours of the two countries different to make it easier to move
      ; one of them to simulate continental drift
      ifelse (pxcor > 40)
        [ set color black ] ; set the colour of New Zealand to black
        [ ifelse (random 2 = 0)
            [ set color yellow ] ; set half of Australia to "gold"
            [ set color green ]  ; set the other half of Australia to green
            ; (Australians are naturally schizophrenic :-)
        ]
    ]
  ]
  
  ; remove the non-white patches loaded from the image
  ask patches [ set pcolor white ] ; make the background white
  
  ask turtles with [color = black] 
  [ if (ycor >= max-pycor - 5)
      [ die ] ; kill off spurious turtles to the southeast of NZ
  ]
end

to continental-drift
  ; Simulates continental drift between Australia and New Zealand.

  if (ticks > max-ticks)
    [ stop ]

  ask turtles with [color = black]
  [
     set heading NZ-heading
     forward NZ-forward-increment
     
     ; Now warp NZ a bit, as all Kiwis are a bit warped :-)
     ; (Otherwise NZ & Australia won't fit nicely
     ; when they bang up against each other)
     set xcor xcor * NZ-xcor-warp-factor
     set ycor ycor * NZ-ycor-warp-factor
     
     if (remainder ticks NZ-stamp-ticks-modulus = 0)
       [ stamp ]
  ]

  set years-ago years-ago + years-per-tick
  tick
end

;
; Copyright 2010 by William John Teahan.  All rights reserved.
;
; Permission to use, modify or redistribute this model is hereby granted,
; provided that both of the following requirements are followed:
; a) this copyright notice is included.
; b) this model will not be redistributed for profit without permission
;    from William John Teahan.
; Contact William John Teahan for appropriate licenses for redistribution for
; profit.
;
; To refer to this model in publications, please use:
;
; Teahan, W. J. (2010).  ANZ Continental Drift NetLogo model.
;   Artificial Intelligence. Ventus Publishing Aps
;