Abundance of resources in the Prehistiric Nile valley - two group scenario - leading to warfare

Abundance of resources in the Prehistiric Nile valley - two group scenario - leading to warfare preview image

1 collaborator

Tags

archaeology 

Tagged by Durr-e-Maknoon Tariq 7 days ago

warfare 

Tagged by Durr-e-Maknoon Tariq 7 days ago

Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.1.1 • Viewed 20 times • Downloaded 0 times • Run 0 times
Download the 'Abundance of resources in the Prehistiric Nile valley - two group scenario - leading to warfare' modelDownload this modelEmbed this model

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


Comments and Questions

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

Click to Run Model

globals [ max-people ]

breed [ people person ]
breed [ arrows arrow ]

turtles-own [ energy ]
patches-own [ countdown ]

to setup
  clear-all


  ask patches [ set pcolor green ]


  create-people initial-number-people
  [
  set shape "person"
  set color black
  set size 1.5
  set energy random (2 * people-gain-from-food)
  setxy random-xcor random-ycor
  ]

  create-arrows initial-number-arrows
  [
    set shape "arrow"
    set color red
    set size 1.5
    set energy random (2 * arrows-gain-from-food)
    setxy random-xcor random-ycor
  ]
  reset-ticks
end 

to go

  if not any? turtles [ stop ]

  if not any? arrows and count people > max-people [ user-message "Agricultarlists won" stop ]

  ask people [
    move
    set energy energy - 1
      eat-grass
      eat-arrows
      death
      reproduce-people
  ]


  ask arrows [
    move
    set energy energy - 1
    eat-grass
    eat-people
    death
    reproduce-arrows
  ]

 ask patches [ grow-grass ]

  tick
end 

to move
  rt random 50
  left random 50
  fd 1
end 

to eat-grass
  if pcolor = green [
    set pcolor brown
    set energy energy + people-gain-from-food
    set energy energy + arrows-gain-from-food
  ]

  ifelse show-energy?
  [ set label energy ]
  [set label "" ]
end 

to reproduce-people  ;
  if random-float 100 < people-reproduce [
    set energy (energy / 2)
    hatch 1 [ rt random-float 360 fd 1 ]
  ]
end 

to reproduce-arrows
  if random-float 100 < arrows-reproduce [
    set energy (energy / 2)
    hatch 1 [ rt random-float 360 fd 1 ]
  ]
end 

to eat-people
  let prey one-of people-here
  if prey != nobody  [
    ask prey [ die ]
    set energy energy + arrows-gain-from-food
  ]
end 

to eat-arrows
  let prey one-of arrows-here
  if prey != nobody [
    ask prey [ die ]
    set energy energy + people-gain-from-food
  ]
end 

to death
  if energy < 0 [ die ]
end 

to grow-grass
  if pcolor = brown [
    ifelse countdown <= 0
      [ set pcolor green
        set countdown grass-regrowth-time ]
      [ set countdown countdown - 1 ]
  ]
end 


There is only one version of this model, created 7 days ago by Durr-e-Maknoon Tariq.

Attached files

File Type Description Last updated
Abundance of resources in the Prehistiric Nile valley - two group scenario - leading to warfare.png preview Preview for 'Abundance of resources in the Prehistiric Nile valley - two group scenario - leading to warfare' 7 days ago, by Durr-e-Maknoon Tariq Download

This model does not have any ancestors.

This model does not have any descendants.