Development of Religion
Model was written in NetLogo 6.1.1
•
Viewed 114 times
•
Downloaded 8 times
•
Run 0 times
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
Comments and Questions
Click to Run Model
;;The Evolution of Religion ;; This NetLogo model is to simulate the evolution of religion ;; Breeds and their shared or type-specific attributes breed[humans human] ;; set size 1 for regular human to distinguish them in the interface from other breeds breed[preachers preacher] ;; set size 5 for preacher breed[prophets propeth] ;; set size 50 for the propeth turtles-own[ age ;; 1:N (current age of the agent) lifespan ;; N (age of death of the agent) religion ;; string (religion of the agent) religiosity ;; 0:10 (religiosity of the agent) openness ;; 0:10 (how open the agent is to new ideas) trust ;; 0:10 (how confidental the agent is) influence ;; 0:10 (how influential the agent is in the world) radius ;; 0:N (physical radius of interaction) movementSpeed ;; 1:N (defines node moves per tick) ] ;; Global variables declared on the interface: ;; population-size 0:N (size of starting population) ;; world-events T:F (enables/disables world events) ;; world-events-frequency 0:N (determines the max frequency of world events by the formula (random thisVariable)) ;; world-events-impact-coefficient 0:N (determines the impact that the world events will have on religions) globals[ world-age ;; 0:N (current age of the world) world-technological-advancement ;; 0:100 (technological advancement of the world) world-economy? ;; T:F (whether the world economy is stable or not) MOZDA DA RAZMJENJUJU NOVAC AGENTI PA DA TAKO UTICEMO NA EKONOMIJU.. world-peace? ;; T:F (whether the world is at peace or not) ;; Temp Variables world-events-current-frequency world-preachers-percentage ;; Religions world-religions world-religions-colors world-religions-population ] ;; Setup Method to setup clear-all reset-ticks init-variables init-patches init-turtles print-world-config ;;show word "Most dominant starting religion: " get-world-religion-influence["christianity"] - Get Religion Current Influence end ;; Init World Variables to init-variables set world-age 1 set world-technological-advancement 1 set world-peace? false set world-economy? false set world-preachers-percentage world-preachers-percentage-ui ;;Setting the preachers percentage according to the UI set world-events-current-frequency (random world-events-frequency) + 1 ;;Setting the current world event frequency ifelse(world-preachers-percentage != 0)[set world-preachers-percentage world-preachers-percentage / 100] ;;Taking the percentage and transforming it into decimals [set world-preachers-percentage 0] set world-religions["christianity" "islam" "hinduism" "atheism" "budhism" "folk-religion" "other-religion"] ;; Religions of the world set world-religions-colors[white green brown red gray pink yellow] ;; Colors to represent religion set world-religions-population[0.31 0.24 0.15 0.16 0.07 0.06 0.005] ;; Percentage of agents per religion end ;; Init Patches Method to init-patches ask patches[ set pcolor black ] end ;; Init Turtles Method to init-turtles let number-of-preachers (int(world-preachers-percentage * population-size)) let number-of-humans (population-size - number-of-preachers) create-humans population-size create-preachers number-of-preachers ask turtles[ turtles-set-init-values ] ;; Assigning religions per percentage, data from: Size of Major Religious Groups, 2020 on Wikipedia let counter 0 foreach(world-religions-population)[ let percentage int(item counter world-religions-population * population-size) ask n-of percentage turtles with[religion = "none"][set religion item counter world-religions set color item counter world-religions-colors] set counter counter + 1 ] end to turtles-set-init-values setxy random-xcor random-ycor set shape "person" set age 0 set lifespan random 300 if lifespan < 18[set lifespan lifespan + 18] if (breed = humans) [set size 1 set radius 1 set movementSpeed 1] if (breed = preachers)[set size 6 set radius 3 set movementSpeed 2] set religion random 11 set religiosity random 11 set openness random 11 set trust random 11 set influence random 11 set religion "none" end ;; Print World Config Method - prints the world configuration to print-world-config show "--------------------" show "World Configuration" show " " show word "World Population: " population-size let number-of-preachers (int(world-preachers-percentage * population-size)) let number-of-humans (population-size - number-of-preachers) show word "Humans: " number-of-humans show word "Preachers: " number-of-preachers show " " show "World Peace: Active" show "World Economy: Stable" show " " ifelse world-events[ ;; We print the world-events configuration if they are enabled show "World Events: Enabled" show word "World Events Impact Percentage: " world-events-impact-coefficient show word "World Events Frequency: " world-events-frequency ] [show "World Events: Disabled"] end ;; Go Method which loops the go-once method to go go-once end ;; Go Once Method updated 1/per tick to go-once ask turtles[ turtles-move turtles-age if (breed = humans)[ ;; Human specific behaviors human-interaction ] if (breed = preachers)[ preacher-interaction ;; Preacher specific behaviors ] if (breed = prophets)[ ;; Prophet specific behaviors prophet-interaction ] ] world-event-check ;; Check if it is time for a world event world-update ;; Update the world variables such as age, technology, etc ... end ;; Turtle Movement - they move in random directions 1 field per tick to turtles-move rt random 100 lt random 100 fd movementSpeed end ;; Turtles age to turtles-age set age age + 1 if age > lifespan[ if count turtles > 25000 [die] if world-mortality = "Constant"[turtles-born die] if world-mortality = "Simulated"[ ;; Code for simulated reporoduction let children random 2 if (children = 0)[ let number-of-children random 3 loop[ ifelse(number-of-children != 0)[ set number-of-children number-of-children - 1 turtles-born ][stop] ] ] die ] if world-mortality = "Increasing"[if count turtles > 1000 [die]] if world-mortality = "Decreasing"[turtles-born turtles-born die] ] end ;; Birth of turtle to turtles-born if count turtles > 25000 [stop] let temp-religion religion let temp-color color if breed = humans [ hatch-humans 1[ turtles-set-init-values set religion temp-religion set color temp-color ] ] if breed = preachers [ hatch-preachers 1[ turtles-set-init-values set religion temp-religion set color temp-color ] ] end ;; World Update - update the world variables as per year to world-update tick set world-age world-age + 1 if (world-age mod 30 = 0)[set world-technological-advancement world-technological-advancement + 1] ;; Increasing the technological advancement of the world every N(50)years. end ;; World Events - Create World Events to world-event-check if world-events[ if(world-age mod world-events-current-frequency = 0)[world-event-execute] ;;We check if the world-event is to happen ] end to world-event-execute let impact-level random 6 let impact-sign random 2 let religionID random 7 show "*********************************" show "World Event Happening.." show word "Impact Level: " ( impact-level ) ifelse(impact-sign = 1)[show "Impact Sign: Negative"] [show "Impact Sign: Positive"] show word "Religion Effected: " item religionID world-religions set world-events-current-frequency (random world-events-frequency) + 1 ;;Setting the current world event frequency if(world-events-current-frequency < 200)[set world-events-frequency 300] let percentage (count turtles with [religion = item religionID world-religions])/(impact-level + 4) show word "Population effected: " percentage ifelse impact-sign = 1[ ask n-of percentage turtles with[religion = item religionID world-religions] [ let randomRel random 6 set religion item randomRel world-religions set color item randomRel world-religions-colors ] ] [ ask n-of percentage turtles [ set religion item religionID world-religions set color item religionID world-religions-colors ] ] ;; EXECUTE WORLD EVENT show word "Next event in years: " world-events-current-frequency show "*********************************" end ;; Get Religion current world-influence to-report get-world-religion-influence [temp-religion] let followers count turtles with[religion = "christianity"] report ( followers / population-size) * 100.00 end to check-for-mutation if (breed = humans)[ ;; Mutate high-engaging humans into preachers if(age > 18 AND religiosity >= 8 AND openness >= 7 AND trust > 7 AND influence > 6)[ hatch-preachers 1[ init-mutation age lifespan religion religiosity openness trust influence ] die ] ] if (breed = preachers)[ ;; Mutate a rare preacher into a prophet if(age > 30 AND religiosity >= 10 AND openness >= 10 AND trust >= 10 AND influence >= 10 AND religion != "atheism" AND count prophets = 0)[ hatch-prophets 1[ init-mutation age (lifespan + 50) religion religiosity openness trust influence show "A new prophet has arrived!" show word "Prophet religion: " religion ] die ] ] end to init-mutation[temp-age temp-lifespan temp-religion temp-religiosity temp-openness temp-trust temp-influence] set shape "person" set age temp-age set lifespan temp-lifespan set religion temp-religion set religiosity temp-religiosity set openness temp-openness set trust temp-trust set influence temp-influence set size 6 if(breed = humans)[set radius 1] if(breed = preachers)[set radius 3 set movementSpeed 2] if(breed = prophets)[ set size 30 set radius 30 set movementSpeed 7 ] end to print-agent-attributes show word "Agent ID: " who show word "Age: " age show word "Lifespan: " lifespan show word "Religion: "religion show word "Religiosity: " religiosity show word "Oppenness: " openness show word "Trust: " trust show word "Influence: " influence end to human-interaction let passed interaction-result openness trust influence if passed = true[ ask other humans in-radius radius[ human-interaction-decision ] ] end to human-interaction-decision turtle-change-random-attribute check-for-mutation end to preacher-interaction let passed interaction-result openness trust influence if passed = true[ ask other humans in-radius radius[ preacher-interaction-decision religion color ] check-for-mutation ] end to preacher-interaction-decision[newReligion newReligionColor] ;; ADD RELIGION CHANGING ATTRIBUTE METHOD KADA DODAMO DA MOGU MJENATI RELIGIOSITY LJUDI ONDA CE BITI INTERESANTNIJE... let believe-in-god? true let peace-val world-peace-coefficient let economy-val world-economy-coefficient if (world-peace-options = "Simulated")[ set peace-val random 100 ] if (world-economy-options = "Simulated")[ set economy-val random 100 ] if(world-peace? = true)[set peace-val (peace-val * -1)] if(world-economy? = true)[set economy-val (economy-val * -1)] let religiosity-coefficient ( (peace-val + economy-val - ( (world-technological-advancement + 1) / 10) ) / 10) if(religiosity + religiosity-coefficient < 3)[set believe-in-god? false] ifelse (believe-in-god?)[ set religion newReligion set color newReligionColor ] [ set religion "atheism" set color red ] set openness openness - 3 check-for-mutation end to prophet-interaction let newReligion religion let newReligionColor color ask other turtles in-radius radius[ prophet-interaction-decision newReligion newReligionColor ] end to prophet-interaction-decision[newReligion newReligionColor] set religion newReligion set color newReligionColor check-for-mutation end to-report interaction-result[temp-openness temp-trust temp-influence] if(world-interaction-behavior = "Coefficient-Based")[ if (temp-openness + temp-trust + temp-influence) > world-interaction-coefficient [ report true ] ] if(world-interaction-behavior = "Simulated")[ let random-number random 31 if (temp-openness + temp-trust + temp-influence) < random-number [ report true ] ] report false end to turtle-change-random-attribute let random-number random 3 let prefix random 2 if(prefix = 0)[set prefix -1] if(random-number = 0 AND (openness > 0 AND openness < 11))[set openness openness + prefix] if(random-number = 1 AND (trust > 0 AND trust < 11))[set trust trust + prefix] if(random-number = 2 AND (influence > 0 AND influence < 11))[set influence influence + prefix] end
There is only one version of this model, created almost 4 years ago by Tarik Ćosović.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Development of Religion.png | preview | Preview for 'Development of Religion' | almost 4 years ago, by Tarik Ćosović | Download |
This model does not have any ancestors.
This model does not have any descendants.
Tarik Ćosović
Description
We observe the world from the origin of religion, from homo-sapiens to modern man. We introduce age, degree of technological development, economy and the state of war as the basic attributes of the world that will scale (non) linearly, and have a direct impact on the attributes of agents in the current time of the world. Agents will be autonomous, and we will observe the spread of existing religions and the introduction of new ones. We will represent members of different religions with colors, and propeths and preachers with specific particles. We are interested in changing the coefficient of religious companions through the aging of the world, and we ask the following questions: Will the oldest religions remain the most popular and dominant? Will young religions or emerging ones take over? Will agents stop believing in religion as the world’s technological coefficient rises?
Posted almost 4 years ago