Formation of happiness
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
This model is to explain the followings:
A) People (agents) have a tendency to communicate with each other. B) Each agent has an attitude ( world-view). C) When an agent finds that the attitude of its interlocutor is similar to its attitude, it becomes happy and delighted and stays there. D) When an agent finds that the attitude of its interlocutor is dissimilar to its attitude, it becomes sad and leaves the place.
HOW IT WORKS
In the initial conditions, agents get randomly distributed. there are six types of attitudes in the society and each agent just have one of them. agents are neither happy nor sad in the beginning. When they enter the society they try to find another agent to talk, if they find it, they will talk with it and assess its attitude. if the interlocutor has an attitude just the same as that of agent, the agent gets happy and stays there and make the interlocutor do so otherwise it will become sad and leave that place. If agent does not find another agent to talk with,it searchs continuously to find an agent to talk with and assess whether its attitude is similar or not.
HOW TO USE IT
"Setup button" is for setting the initial conditions. "Go-once button" starts the model execution just for one tick of time. "Go button" starts the model execution forever. "Num-of-people slider" stands for intital number of people. "Attitude distribution of peolpe histogram" shows how many of agents have which type of attitudes. "Happy people vs sad people" plot show the number of happy and sad agents through the time.
THINGS TO NOTICE
See how one sad agent can imbalance some happy agents and make them leave their place.
THINGS TO TRY
Run the models for different values of "Num-of-people" and analyse the followings:
A) When do the happy peolpe get more than sad ones? B) When do sad people get more than happy ones? C) How can they become equal or model converge?
EXTENDING THE MODEL
Create an slider for number of attitudes, and see its affect on happiness or sadness of agents
NETLOGO FEATURES
RELATED MODELS
Netlogo models library -> IABM textbook models -> Chapter 3 -> Segregation model.
CREDITS AND REFERENCES
This model has been developed by Hossein Sabzian.He is a PhD student at Iran University of Science and Technology.His major interests include Agent Based Modeling, Statistical Inference, ICT industry, epistemology and history of physics and economics. You can email Hossein via 1-sabzeyan@yahoo.com 2-hossein_sabzian@pgre.iust.ac.ir
Comments and Questions
turtles-own [attitude] to setup ca resize-world -22 22 -22 22 ;; size of the world set-patch-size 10 ;; size of each patch crt num-of-people [ setxy random-xcor random-ycor ;; spatial distribution of agents set attitude type-of-attitude ;; there are 6 types of attitudes and each agent only selects one of them randomly set shape "face neutral" ;; there is no happy or sad agent in the initial conditions ] reset-ticks end to go ask turtles [ let target one-of other turtles-here ;; select somebody to talk with ifelse (target != nobody ) [ ifelse (attitude = [attitude] of target) [ set shape "face happy" ask target [ set shape "face happy"] ] ;; if there is a target with simmilar attitude, become happy and ask him or her to become happy [ set shape "face sad" ask target [set shape "face sad"] leave ] ;; if there is a target with dissimmilar attitude, become sad and ask him or her to become sad, then leave that place ] [ search-to-find-a-target ] ;; if there is no target, search to find somebody to talk with ] tick end to-report type-of-attitude report one-of [ 1 ;; attitude 1 2 ;; attitude 2 3 ;; attitude 3 4 ;; attitude 4 5 ;; attitude 5 6 ;; attitude 6 ] end to leave fd 1 end to search-to-find-a-target rt random 90 lt random 90 fd 1 if not any? other turtles-here [search-to-find-a-target] ;; if there is no one; continue to find a targer end
There is only one version of this model, created over 7 years ago by Hossein Sabzian.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Formation of happiness.png | preview | Preview for 'Formation of happiness' | over 7 years ago, by Hossein Sabzian | Download |
This model does not have any ancestors.
This model does not have any descendants.