Difference between revisions of "CS382:Unit-compsoc"

From Earlham CS Department
Jump to navigation Jump to search
(Lecture notes - outline form)
(Comments)
 
(62 intermediate revisions by 7 users not shown)
Line 1: Line 1:
= Computational Sociology with Agent Based Modeling =
+
----
 +
= Computational Sociology and Agent Based Modeling =  
 +
== Overview ==
 +
This unit showcases Agent Based Modeling techniques and allows students to investigate them in a computational sociology context.
  
== Background reading, one or more pointers/documents and a brief synopsis of what's covered in them ==
+
== Background Reading for Teachers and TAs ==
<font color="blue">You're missing the synopses on what these are about.</font>
+
* [http://en.wikipedia.org/wiki/Computational_sociology Computational Sociology (wikipedia)] Basic overview of computational sociology.
* [http://en.wikipedia.org/wiki/Computational_sociology Computational Sociology (wikipedia)]
+
* Tutorial on Agent Based Modeling [http://portal.acm.org/citation.cfm?id=1162708.1162712 ACM Digital Library] An in depth look at ABM theory and technologies.
* [http://ideas.repec.org/p/wpa/wuwpco/0405002.html The Structural Dynamics of Corruption: Artificial Society Approach] - <font color="blue">I have concerns about whether freshmen students will be able to sit down and read this.  This might be interesting to cover but as part of the lecture.</font>
 
* [http://ideas.repec.org/p/sce/cplx03/06.html Macro And Micro Dynamics In An Artificial Society: An Agent Based Approach] - <font color="blue">This link is broken</font>
 
* [http://www.swarthmore.edu/SocSci/tburke1/artsoc.html Artificial Societies, Virtual Worlds and the Shared Problems and Possibilities of Emergence] - <font color="blue">Not really sure how this fits in with ''modeling'' computational sociology, because these are player-controlled</font>
 
* [http://jasss.soc.surrey.ac.uk/JASSS.html Journal of Artificial Societies and Social Simulation] - <font color="blue">A list of articles isn't very helpful.  Sorry.</font>
 
* [http://portal.acm.org/citation.cfm?id=261181 Growing Artificial Societies: Social Science From the Bottom Up] (book citation) <font color="blue">This is an entire book. For students to read for this unit?</font>
 
* Tutorial on Agent Based Modeling [http://portal.acm.org/citation.cfm?id=1162708.1162712 ACM Digital Library]
 
* [http://www.casos.cs.cmu.edu/education/phd/classpapers/Macy_Factors_2001.pdf Computational Sociology and Agent Based Modeling] - <font color="blue">This is interesting but very long. Students are really going to sit down and read forty pages about something they don't know much about?</font>
 
  
== Lecture notes - outline form ==
+
== Reading Assignments for Students ==
* What is Agent Based Modeling?
+
* [http://ideas.repec.org/p/wpa/wuwpco/0405002.html The Structural Dynamics of Corruption: Artificial Society Approach] It's a bit longwinded and technical, but I think 13 pages is reasonable. It's a "welcome to college" kind of text. I don't expect that they'll get any of the mathy stuff, though, so I think maybe just clipping out the parts about choosing rulesets and giving them that would be useful.
** Game of Life
+
* [http://www.swarthmore.edu/SocSci/tburke1/artsoc.html Artificial Societies, Virtual Worlds and the Shared Problems and Possibilities of Emergence] This is relevant because of its discussion of emergence. I think for students it will help to justify why they're learning agent based modeling (because the emergent behavior of the models mimics the emergent behavior of these virtual worlds)
** Emergent Behavior
+
* [http://jasss.soc.surrey.ac.uk/12/1/7.html A Proximate Mechanism for Communities of Agents to Commemorate Long Dead Ancestors] Though possibly more computational anthropology, I think this is a softer intro than the corruption model, and arguably more interesting.
** Axtell and Epstein - Growing Artificial Societies
+
* [http://jasss.soc.surrey.ac.uk/11/4/9.html Can Extremism Guarantee Pluralism?] Another very long one, but such a fascinating topic I think it would engage students (especially Earlhamites).
** What are its advantages and disadvantages?
+
* [http://www.casos.cs.cmu.edu/education/phd/classpapers/Macy_Factors_2001.pdf Computational Sociology and Agent Based Modeling] Too long to read in full, but the introductory prose is extremely illuminating.
* Where is it useful?
 
** Economics
 
** Sociology
 
** Biology
 
** Information Science
 
* Some Examples
 
** [http://en.wikipedia.org/wiki/Boids Boids]
 
** [http://www.cmol.nbi.dk/models/infoflow/infoflow.html Self Assembling of Information on networks]
 
** [http://jasss.soc.surrey.ac.uk/12/1/6/appendixB/EpsteinAxtell1996.html Sugarscape]
 
* <font color="blue">Is the focus of this unit computational sociology or agent-based modeling?  The reading makes it out to be computational sociology but the lecture is far more agent-based modeling.</font>
 
  
== Classroom response questions - at least three ==
+
== Reference Material ==
 +
* Tutorial on Agent Based Modeling [http://portal.acm.org/citation.cfm?id=1162708.1162712 ACM Digital Library] An in depth look at ABM theory and technologies.
 +
 
 +
== Lecture Notes ==
 +
* Lecture 1
 +
** Comp. Soc. begins with Axtell and Epstein.
 +
*** They wanted to "...begin the development of a computational approach that permits the study of... [trade, migration, group formation, combat, interaction with an environment, transmission of culture, propagation of disease, and population dynamics] ...from an evolutionary perspective as a single social science, a transdiscipline subsuming such fields as economics and demography." (Epstein 2)
 +
** How is this new discipline implemented?
 +
*** Agents
 +
**** Internal state
 +
**** Behavioral rules
 +
**** Some static states (ie race), many influenced by environment according to rules (ie economic status, cultural identity) (Epstein 4)
 +
*** Environment
 +
**** "Medium through which agents interact" eg topographic landscape or communication network (Axtell 5).
 +
**** Can be static or change over time (either through agents' actions or otherwise)
 +
*** Rules
 +
**** Dictate what agents can do and what their environments can do; eg 'look around as far as you can, find the site richest in food, go there, eat the food' (Epstein 5)
 +
**** Agent-Environment rules (ie food collection)
 +
**** Agent-Agent rules (ie reproduction)
 +
 
 +
* Lecture 2
 +
** Emergent Behavior
 +
*** As Axtell and Epstein state, "The defining feature of an artificial society model is...that fundamental social structures and group behaviors emerge from the interaction of individual agents operating on artificial environments under rules that place only bounded demands on each agen'ts information and computational capacity" (Epstein 6).
 +
*** Features like tribal formation and economic classes should naturally arise (Epstein 6)
 +
** The big idea?
 +
*** That micro-simplicity leads to macro-complexity.
 +
**** Game of life
 +
**** Schelling and his original model (as seen in [http://www.theatlantic.com/doc/200204/rauch Seeing Around Corners])
 +
*** Sugarscape model (Epstein 21-53)
 +
**** To demonstrate and explore their theories, Epstein and Axtell created the Sugarscape.
 +
**** It consists of a landscape with varying levels of resources called "sugar" and "spice" populated by randomly dropped agents who require the sugar to stay alive.
 +
**** The agents mate and reproduce if they can get enough food; otherwise they move about seeking new food sources.
 +
**** Agents are aware of their families
 +
**** Agents have a preference for either sugar or spice and are allowed to trade with one another (or borrow and lend).
 +
**** Agents are given rules for combat
 +
**** A&E witnessed the formation of tribes, economic classes, migratory patterns, and warfare.
 +
 
 +
* Lecture 3
 +
** Where is ABM useful?
 +
*** Economics
 +
**** Economics is largely a science of local interactions - buyers and sellers, loaners and borrowers - that create a complex macrocosm.
 +
*** Sociology
 +
**** Like economics, societal structure is the amalgam of local interaction - altercations, friendships, elections.
 +
*** Biology
 +
**** Many events within the human body are best characterized by the interaction of simple agents (cells) that make up larger parts of a given organism; arguably, sufficiently complex living bodies can be seen as huge-scale agent based systems.
 +
*** Information Science
 +
**** The exchange of information is, again, a local process; groups' ideas about something derive from a bunch of individuals' notions and their local communication.
 +
** Where is it not useful?
 +
*** When attempting to model something that is simple at a high level and complex at a low level.
 +
*** When attempting to model agent sets with high levels of heterogeneity
 +
**** A model of a rocket's trajectory, for example, could be represented as a series of agents - air molecules, rocket materials, units of power (thrust) - but the number of agents involved is far too high for this to be accomplished in any human-acceptable amount of time.
 +
 
 +
* Lecture 4
 +
** What are its advantages and disadvantages?
 +
*** Advantages
 +
**** Can describe things through emergence that mathematical formulas can't
 +
**** Tend to require far less "wet" research
 +
**** Programming can be simple (using ABM frameworks)
 +
*** Disadvantages
 +
**** Sometimes too simple
 +
**** Don't always scale well
 +
** Ties to object oriented programming (high level, so as not to confuse) (Axtell 5)
 +
*** Encapsulation of internal state
 +
*** Procedures == agent's behavioral rules
 +
** Some Examples - Sociology and otherwise
 +
*** [http://en.wikipedia.org/wiki/Boids Boids] Model of bird flocking.
 +
*** [http://www.cs.utk.edu/~mclennan/Classes/420-594-F07/NetLogo/Ants.html Ants] Model of ants' food collection habits
 +
*** [http://ccl.northwestern.edu/netlogo/models/run.cgi?Moths.718.474 Moths] Model of moths' love for light sources
 +
*** [http://ccl.northwestern.edu/netlogo/models/TrafficGrid Traffic Grid] Model of city-grid traffic
 +
*** [http://ccl.northwestern.edu/netlogo/models/Scatter Scatter] Model of children's scattering tendencies
 +
*** [http://ccl.northwestern.edu/netlogo/models/Segregation Segregation] Recreation of Schelling's original segregation model
 +
*** [http://ccl.northwestern.edu/netlogo/models/Cooperation Cooperation] Model of cooperation / competition for resource
 +
 
 +
== Lab 1 ==
 +
Rebellion model in NetLogo
 +
 
 +
==== Process ====
 +
Run through the following steps, answering each question.
 +
 
 +
# Run the model with its initial parameters and observe for aout 200 ticks.
 +
# Suppose you wanted to discuss how often rebellions happened in this artificial society. What graph most prominently displays this?
 +
# Suppose you are the head of state for this artificial society. You want to extend the period between rebellions; what parameter would you change and why? Make this change, and rerun the model if necessary. Were you correct?
 +
# Say you wanted to verify this model against the political history of some nation. How would you map events from the real nation's history to controls the model? What kinds of controls could you add?
 +
# How does the movement toggle affect the frequency and amplitude of rebellions? What could this toggle represent in the real world?
 +
# Now attempt to create these patterns by changing the different settings of the models (potentially needing to restart the model). For each pattern, note exactly what value each control ( init-cop density, init-agent density, vision, legitamacy, max-jail-temrm, movement).
 +
## Constant rebellion.
 +
## Quiet, idyllic, happy society.
 +
## Quiet, dystopic, unhappy society.
 +
## Underfunded government that recently suffered a military coup.
 +
## Mostly quiet with periodic flares of protest.
 +
## Rebellious territory with highly restricted citizen movement (think occupied territories)
 +
 
 +
==== Write-up ====
 +
# Answers to the questions in the lab.
 +
# Parameter values for each scenario.
 +
 
 +
==== Software ====
 +
* Java
 +
* NetLogo
 +
 
 +
==== Bill of Materials ====
 +
* Pencil and paper or a word processor.
 +
 
 +
== Lab 2 ==
 +
Excercise in coming up with agent sets and agent relations. Have students think about a possible model of Saga sitting patterns over time. Their assignment is to come up with a set of agents and a set of agent relations and a short description of how such a model's results would evolve over time.
 +
 
 +
 
 +
==== Process ====
 +
* What to do, step-by-step
 +
** Discuss with your lab mates a potential "Saga Sitting pattern" model with attention to the factors involved and potential ways of collecting data. Write down these notes.
 +
** Brainstorm a set (with a size of at least 4) of agents that could be used in such a model. Write up a description of each model and explain why you thought it would be useful.
 +
** Brainstorm a set of relations between agents that could be used in such a model. Examples include students' like or dislike of certain food agents, students' like and dislike of each other, students' attendance at simulatneous events. Write up a description of each relation and explain why you thought it would be useful.
 +
* What to look for
 +
** Is it hard or easy to account for many of the involved factors? Why?
 +
** How does this process differ from other types of modeling?
 +
*** Do you think coming up with mathematical formulas to describe the same issues would be easier or harder? Why?
 +
*** What challenges arise when you try to come up with agents? with agent relations?
 +
* What to record
 +
** Your notes and agent / agent relation descriptions
 +
** Your answers to the 'what to look for' questions.
 +
** A short description of how such a Saga model, using your agents and agent relations would evolve over time.
 +
 
 +
==== Write-up ====
 +
* Required elements
 +
** Notes and descriptions
 +
** Answers
 +
** Model outcome + saga map.
 +
* Visualization opportunities
 +
** Draw out a map of saga to aid in your final description
 +
* Optional elements
 +
** None
 +
* Provide a template for the first couple of labs ala CS128?
 +
** Not sure? I didn't take CS128.
 +
 
 +
==== Software ====
 +
Nothing.
 +
 
 +
==== Bill of Materials ====
 +
Nada. Paper and pencil.
 +
 
 +
== Evaluation ==
 +
==== CRS Questions ====  
 
* 1. What is Emergent Behavior?
 
* 1. What is Emergent Behavior?
** A. The complex outcome of the interaction of many simple rulesets
+
** A. '''The complex outcome of the interaction of many simple rulesets'''
 
** B. How we verify and validate Agent Based models
 
** B. How we verify and validate Agent Based models
 
** C. How we define rulesets for agents in an agent based model
 
** C. How we define rulesets for agents in an agent based model
Line 37: Line 164:
 
* 2. Who wrote the seminal text on sociological agent-based modeling?
 
* 2. Who wrote the seminal text on sociological agent-based modeling?
 
** A. Peck & Rogers, et. al
 
** A. Peck & Rogers, et. al
** B. Axtell and Epstein
+
** B. '''Axtell and Epstein'''
 
** C. Axeman and Edlefsen
 
** C. Axeman and Edlefsen
** D. Whitehall and North
+
** D. Stribling, Aguayo, and Krohn
 
* 3. What is the name of the first agent-based biological model?
 
* 3. What is the name of the first agent-based biological model?
 
** A. Droids
 
** A. Droids
 
** B. BirdBots
 
** B. BirdBots
** C. Boids
+
** C. '''Boids'''
 
** D. BDroids
 
** D. BDroids
  
== Lab activity - materials, process and software ==
+
==== Quiz Questions ====
=== Self Assembling of Information on networks ===
+
# Explain how agent based modeling's concept of emergent behavior could be used to explain some natural phenomenon.
Tie this in with facebook/myspace/<social network here (virtual or real)>. Who do you know? Draw a graph of your best friends, good friends, acquaintances, less-than-acquaintances and follow the coloring/sizing of the model. Does this model resemble what emerges in the model? Do several runs of the model and match their emergent stages against your drawing. Discuss validity of model based on this.
+
#Name three good examples of things that could be used as agents.
* [http://www.cmol.nbi.dk/models/infoflow/infoflow.html Model]
+
#Name three good examples of agent relations that could be used in a model.
 +
#Explain why it is sensible to model bird flocking using ABM. Extend this to justify modeling society with ABM.
 +
 
 +
= Agent Based Modeling and Computational Sociology Metadata =
 +
This unit introduces students to Agent Based Modeling through the use of examples and then has them work in a context of Computational Sociology to learn more
 +
This section contains information about the goals of the unit and the approaches taken to meet them.
 +
 
 +
This section contains information about the goals of the unit and the approaches taken to meet them.
 +
 
 +
== Scheduling ==
 +
Should certainly come after mathematical modeling and before systems dynamics.
 +
 
 +
== Concepts and Techniques ==
 +
* Pedagogical
 +
** Inquiry Based Learning
 +
** Degrees of open endedness
 +
** uses science to illustrate complexity of world around us
 +
* Structural
 +
** CRS
 +
** largely platform independent
 +
 
 +
== General Education Alignment ==
 +
* Analytical Reasoning Requirement
 +
** Abstract Reasoning - From the [[http://www.earlham.edu/curriculumguide/academics/analytical.html Catalog Description]] ''Courses qualifying for credit in Abstract Reasoning typically share these characteristics:''
 +
*** They focus substantially on properties of classes of abstract models and operations that apply to them.
 +
**** Complete. Agents are, definitively, abstract models. The whole purpose of the unit is to think about the people and the world around you in abstract terms.
 +
*** They provide experience in generalizing from specific instances to appropriate classes of abstract models.
 +
**** Complete. There is Discussion of boids, sugarscape and agent based modeling as a whole
 +
*** They provide experience in solving concrete problems by a process of abstraction and manipulation at the abstract level. Typically this experience is provided by word problems which require students to formalize real-world problems in abstract terms, to solve them with techniques that apply at that abstract level, and to convert the solutions back into concrete results.
 +
**** Complete. The emergent behavior is a process of abstract manipulation; comparing emergent behavior back against the real world is "converting solutions back into concrete results"
 +
** Quantitative Reasoning - From the [[http://www.earlham.edu/curriculumguide/academics/analytical.html Catalog Description]] ''General Education courses in Quantitative Reasoning foster students' abilities to generate, interpret and evaluate quantitative information. In particular, Quantitative Reasoning courses help students develop abilities in such areas as:''
 +
*** Using and interpreting formulas, graphs and tables.
 +
**** Partial. Little of this - the point is to avoid formulas (initially), but graphs and tables come up when analyzing model results.
 +
*** Representing mathematical ideas symbolically, graphically, numerically and verbally.
 +
**** Partial. Little of this. We're working with people, not numbers.
 +
*** Using mathematical and statistical ideas to solve problems in a variety of contexts.
 +
**** None.
 +
*** Using simple models such as linear dependence, exponential growth or decay, or normal distribution.
 +
**** None. This could be worked in, but isn't there now.
 +
*** Understanding basic statistical ideas such as averages, variability and probability.
 +
**** None.
 +
*** Making estimates and checking the reasonableness of answers.
 +
**** Partial. Estimates are made, but they are not so quantitative as in more mathematical endeavors.
 +
*** Recognizing the limitations of mathematical and statistical methods.
 +
**** Complete. This is fulfilled - the point of ABM is the limitation of mathematical and statistical methods.
 +
* Scientific Inquiry Requirement - From the [[http://www.earlham.edu/curriculumguide/academics/scientific.html Catalog Description]] ''Scientific inquiry:''
 +
** Develops students' understanding of the natural world.
 +
*** Complete. Agent based methodology informs a way of thinking about natural processes that differs from more typical techniques - the ideas of emergent behavior are present in every day life.
 +
** Strengthens students' knowledge of the scientific way of knowing — the use of systematic observation and experimentation to develop theories and test hypotheses.
 +
*** None.
 +
** Emphasizes and provides first-hand experience with both theoretical analysis and the collection of empirical data.
 +
*** Complete. Models are theoretical. Analyzing one's own social circle, for example, is empirical collection.
 +
 
 +
== Scaffolded Learning ==
 +
None. The unit is lecture and work; neither fall into a set scaffolded structure.
 +
 
 +
<font color="red">I think you could re-consider this for the lab.  Start simple, provide a bit of structure, and let them extend into and through that as far as they can.</font>
 +
 
 +
== Inquiry Based Learning ==  
 +
The get to think creatively; they make a (static) model and get to think up their own agent based model (in an easy, but still interactive, way)
 +
 
 +
 
 +
 
 +
 
 +
= Agent Based Modeling and Computational Sociology Mechanics =
 +
== To Do ==
 +
* Read and consider JoshM's message about alife.
 +
* Expand lectures notes.
 +
* Come up with second lab, do design.
 +
* Consider the exercise-like things that Raush uses at the start of his article <b>Seeing Around Corners</b>
 +
 
 +
== Comments ==
 +
* <font color="darkmagenta">Make answers bold please!</font>
 +
* <font color="darkmagenta">Some of this is reference/extra reading, then? If this is only a 1 week unit, will they just get a big pile of reading up front?</font> -There are snippets of each reading that I think should be assigned.
 +
* <font color="blue">When you say evolve over time, do you mean how the model would look when it was run, or how the people making the model would change it as they learned more information?</font> Added a few words to clarify.
 +
* <font color="darkmagenta"> + why? (yes/no-type questions are really easy for students to totally blank out)</font>
 +
* <font color="darkmagenta">Looks like this clarifies the above comment's question</font>
 +
* <font color="darkmagenta">+ why?</font>
 +
* <font color="blue">A minimum number would be helpful here.  People are lazy.</font>
 +
*  <font color="blue">Where were the example applets??</font>
 +
* <font color="darkmagenta">These are very high-level... narrowing them down more will help a great deal. Also, how is the split made between the two+ classes?</font>
 +
* <font color="red">I'd argue that they need to be expanded, that at a high level they cover the correct topics but need more depth to be useful.</font>
 +
* <font color="blue">This lab seems kind of short as compared with the other ones, which isn't necessarily a bad thing.  However, if you wanted to move it to a prelab in order to have more time to do some sort of example or have them do something with Looking Around Corners as part of the lab, that might be good.  On the other hand, you could also have them do some real life homework, like looking at the distribution of how people sit in Saga.  Maybe they could find some environmental factors that influence students in Saga as well (ie people tend to sit closer to food?).</font>
 +
* <font color="darkmagenta">Agreed, I'm not sure this would fill up an entire 3 hours or however long labs are. Re: real life homework/observations: are people just people, or would we want them to account for gender, race, year, age, etc?</font>
 +
* <font color="darkmagenta">How is it useful in these disciplines? etc~</font>
 +
 
 +
== Lab Feedback ==
 +
*My only real issue with this lab is that isn't exactly so much a lab as a very interesting thought experiment.  There should be some component of this lab that has them doing something and producing answers to questions with data and interpretation of that data at some point.  The lab as it stands could definitely make a very good first chunk of a lab without too much change.  The biggest change to make to what's already there would be to give more concrete deliverables.  I found myself spending upwards of 3 hours on just this thought experiment because I had no idea what was an appropriate amount to write on each step.  To make this lab complete past just that first part, there should be a second part that pushes them out of theory and into practice in one way or another.
 +
*I loved the first part of the lab. It was very fun to tweak the values in order to get the results that were desired. The questions were straightforward and easy to answer, but they still required a little bit of thought behind them, which I thought was a very nice touch. One thing to keep in mind with the section of the lab, however, is that what makes up a dystopia can be very subjective. My impression of it was that jail times would be long, there would be lots of police, and the police would have an overwhelming presence. This may not be an idea that other people share.
 +
*Another thing to point out is that it's not immediately obvious what the "visual range" toggle does. I was under the impression that it decreased the visible range of the agents themselves, making the rebellions take less long to spread. However, after some tampering with it, I'm positive that it dictates how far the cops can see, which has a factor in the "Risk calculation" that causes the agents to determine whether it is safe to rebel and therefore rebel. You might want to look into providing the students with a bit of information about the various controls and what they do. It doesn't have to be very in-depth, as I got the sense that part of the lab was figuring out what it does, but a little information might be nice.
 +
*This would probably take about an hour or two to do well, especially if some thought and deliberation were given to the questions. Otherwise, it wouldn't take very long at all. This would probably be a great way to tell apart those who put some time and effort into it from those who didn't care, actually.
 +
*Worked pretty well. The second part of the Lab gets the students thinking. Need to know a knowledge of agent-based modeling, so if the students didn't understand during the lectures, they will need to figure it out to complete this lab.
 +
[http://cs.earlham.edu/~purcebr/soc_cs382.txt Lab Write-up]
 +
 
 +
== Josh Letter ==
 +
Hey Nate and Charlie,
 +
 
 +
Sorry for the delay in my response; this is a contentious topic and it's the last week of class over here.
 +
 
 +
Personally, I've been conflicted about the use of computational sociology for a while. It mirrors a larger debate in social science disciplines and their different perspectives on solving the same problem: predicting and understanding human behavior. Suscintly, sociology and anthropology study the productions of human interaction on the large scale (such as entire populations, economic systems, and nations) while psychology studies smaller scopes indepth (things like emotions of individual humans, dreams, etc). When the two ends meet in the middle by sociologists working down and phsycologists work up, we should have a pretty good understanding on how humans interact.
 +
 
 +
One side known as aLife, the side you've delved into, uses simple, local rules over many agents in simple virtual environments to observe emergent behavior. While this approach works well for modeling the behavior of some systems (like Boids, termites, and other things that use steering behavior -- check out open steer by Reynolds, the Boids guy), its usefulness depends directly on the efficacy of the rules used. At best the rules represent aggregate behaviors which are determined by valid and verifiable quantitative or qualitative experimental analysis. At worst, which is unfortunately true of many popular systems (including Boids), the rules represent whatever was floating around in the researcher's head at the time (though this can be seen as being a valid production of a social entity and may have its own validity).
 +
 
 +
If you have a simulation that has many agents that adhere to accurrate and simple rules that apply to a virtual environment that has a relatively small state space (like Sugarscape), all social interaction outside of the simulation is not possible and would have no impact on your results. There is no room for the "irrational" behavior seem when social scientists study people in the real world. In this case, irrationality is behavior that seems to be not in the observed entity's best interests given the variables observable by the social scientist. This does not mean the agents are inheritly irrational; they just base their decisions on rules different that those placed on the situation by the social scientist's perspective (think latent variables to put it into something more palatable for hard sciences). This lack of coverage of the effect of latent variables in individual agents in macro computational sociology is the main criticism levied against the field.
 +
 
 +
The other side of the larger social science debate, there is research being conducted that attempts to model the complexity of individual agents. This research ranges from modeling how the brain works mechanically, such as the ACT-R 5.0 architecture, to true-to-psych emotion and cognitive models (PyschSim and EMA by Stacy Marsella). The major criticism of this work is pretty straightforward: can we even understand the true complexity of how we think, let alone simulate it? Just another NP problem, right?
 +
 
 +
There is work that is trying to meet in the middle. Later additions to PsychSim and EMA, Thespian (Mei Si), the SGD (Synthetic Group Dynamics) Model of multiagent
 +
social interaction (Ana Paiva, check out FearNot!), and much more synthetic characters research are all in the space between macro computational sociology and complex, low agent count simulations. The problem a lot of qualatitive-phobic types have is that they don't produce neat numbers like hard scientific (Folding@Home) and aLife simulations. However, they do have some qualatative metrics, but the field of virtual human is still quite young (unlike aLife techniques and cellular automata) is still figuring out how to best evaluate itself. Good examples are in space of Embodied Conversational Agents (ECAs) used by Justine Cassell to treat autism and of the work in expressive intelligence field, such as the game Façade by Michael Mateas (playing Façade might be a good homework assignment for the class).
 +
 
 +
To wrap up, simulating social science touches many active fields of research and I'm a bit biased as I reside in one of those fields (expressive intelligence). If you want more information or something stated more clearly, feel free to email or call me on my cell -- I'd be happy to help out EC's CS department in any way I can. The class sounds like it will be fun!
 +
 
 +
Here are some links to back up my references:
 +
http://opensteer.sourceforge.net/
 +
Justine Cassel: http://www.soc.northwestern.edu/justine/
 +
Stacy Marsella: http://www.isi.edu/~marsella/root/root.html
 +
Ana Paiva: http://gaips.inesc-id.pt/gaips/people/anapaiva.html
 +
http://www.cyc.com/
 +
http://www.opencyc.org/
 +
ACT-R reference: Anderson, J. et al. 2004. An integrated theory of mind. Psychological Review, 111(4):1036–1060.
  
== Scheduling - early, late, dependencies on other units, length of unit ==
+
Cheers!
=== Timing ===
+
Josh
Should certainly come after mathematical modeling. Other than that I don't think it matters.
 
=== Length ===
 
Two weeks. It's important and there's a lot of good stuff to do.
 
  
== Gen Ed ==
+
== Archive ==
=== Criterion 1 ===
+
* Tie this in with facebook/myspace/<social network here (virtual or real)>. Who do you know? Draw a graph of your best friends, good friends, acquaintances, less-than-  acquaintances and follow the coloring/sizing of the model. Does this model resemble what emerges in the dynamic model (below)? Do several runs of the model and match their  emergent stages against your drawing. Discuss validity of model based on this. The key for the lab is "Does this model resemble what emerges in the dynamic model?" The  applet will run until it reaches a state of relative stasis. The static model that the students develop will, hopefully, have similar characteristics to the applet's  emerged results. The idea is that 'reality' - the static model - appears in the emergent behavior of the dynamic model
Develops students' understanding of the natural world.
+
** [http://www.cmol.nbi.dk/models/infoflow/infoflow.html Model]
* Unit develops students' ability to understand the natural world as a chaotic - but emergent - system.
 
  
=== Criterion 2 ===
 
Strengthens students' knowledge of the scientific way of knowing — the use of systematic observation and experimentation to develop theories and test hypotheses.
 
* The lab requires the collection of data first-hand and its comparison to the results of a model. I'd say this nail is hit on the head.
 
  
=== Criterion 3 ===
 
Emphasizes and provides first-hand experience with both theoretical analysis and the collection of empirical data.
 
* The collection of empirical data: coming up with static models and, in a possible second lab, determining simple rulesets of some agentset. Theoretical analysis: all the models students interact with in the unit.
 
  
== Archived stuff ==
+
= Authorship =  
* [http://www.personal.kent.edu/~bcastel3/ brian castellani sociology and complexity web]
+
Nate Smith
** [http://www.personal.kent.edu/%7emdball/Summit-Sim.htm Modeling social mobility. Paper, too]
 
* [http://www.cmol.nbi.dk/javaapp.php Center for Models of Life - CMOL: Models / Interactive Java Applets]
 
** [http://www.cmol.nbi.dk/models/ibattle/ibattle.html A model of information and dominance], [http://arxiv.org/abs/0708.0368 Related paper]
 
** [http://www.cmol.nbi.dk/models/inforew/inforew.html Modeling self organization of communication and topology in social networks]
 

Latest revision as of 09:25, 27 April 2009


Computational Sociology and Agent Based Modeling

Overview

This unit showcases Agent Based Modeling techniques and allows students to investigate them in a computational sociology context.

Background Reading for Teachers and TAs

Reading Assignments for Students

Reference Material

  • Tutorial on Agent Based Modeling ACM Digital Library An in depth look at ABM theory and technologies.

Lecture Notes

  • Lecture 1
    • Comp. Soc. begins with Axtell and Epstein.
      • They wanted to "...begin the development of a computational approach that permits the study of... [trade, migration, group formation, combat, interaction with an environment, transmission of culture, propagation of disease, and population dynamics] ...from an evolutionary perspective as a single social science, a transdiscipline subsuming such fields as economics and demography." (Epstein 2)
    • How is this new discipline implemented?
      • Agents
        • Internal state
        • Behavioral rules
        • Some static states (ie race), many influenced by environment according to rules (ie economic status, cultural identity) (Epstein 4)
      • Environment
        • "Medium through which agents interact" eg topographic landscape or communication network (Axtell 5).
        • Can be static or change over time (either through agents' actions or otherwise)
      • Rules
        • Dictate what agents can do and what their environments can do; eg 'look around as far as you can, find the site richest in food, go there, eat the food' (Epstein 5)
        • Agent-Environment rules (ie food collection)
        • Agent-Agent rules (ie reproduction)
  • Lecture 2
    • Emergent Behavior
      • As Axtell and Epstein state, "The defining feature of an artificial society model is...that fundamental social structures and group behaviors emerge from the interaction of individual agents operating on artificial environments under rules that place only bounded demands on each agen'ts information and computational capacity" (Epstein 6).
      • Features like tribal formation and economic classes should naturally arise (Epstein 6)
    • The big idea?
      • That micro-simplicity leads to macro-complexity.
      • Sugarscape model (Epstein 21-53)
        • To demonstrate and explore their theories, Epstein and Axtell created the Sugarscape.
        • It consists of a landscape with varying levels of resources called "sugar" and "spice" populated by randomly dropped agents who require the sugar to stay alive.
        • The agents mate and reproduce if they can get enough food; otherwise they move about seeking new food sources.
        • Agents are aware of their families
        • Agents have a preference for either sugar or spice and are allowed to trade with one another (or borrow and lend).
        • Agents are given rules for combat
        • A&E witnessed the formation of tribes, economic classes, migratory patterns, and warfare.
  • Lecture 3
    • Where is ABM useful?
      • Economics
        • Economics is largely a science of local interactions - buyers and sellers, loaners and borrowers - that create a complex macrocosm.
      • Sociology
        • Like economics, societal structure is the amalgam of local interaction - altercations, friendships, elections.
      • Biology
        • Many events within the human body are best characterized by the interaction of simple agents (cells) that make up larger parts of a given organism; arguably, sufficiently complex living bodies can be seen as huge-scale agent based systems.
      • Information Science
        • The exchange of information is, again, a local process; groups' ideas about something derive from a bunch of individuals' notions and their local communication.
    • Where is it not useful?
      • When attempting to model something that is simple at a high level and complex at a low level.
      • When attempting to model agent sets with high levels of heterogeneity
        • A model of a rocket's trajectory, for example, could be represented as a series of agents - air molecules, rocket materials, units of power (thrust) - but the number of agents involved is far too high for this to be accomplished in any human-acceptable amount of time.
  • Lecture 4
    • What are its advantages and disadvantages?
      • Advantages
        • Can describe things through emergence that mathematical formulas can't
        • Tend to require far less "wet" research
        • Programming can be simple (using ABM frameworks)
      • Disadvantages
        • Sometimes too simple
        • Don't always scale well
    • Ties to object oriented programming (high level, so as not to confuse) (Axtell 5)
      • Encapsulation of internal state
      • Procedures == agent's behavioral rules
    • Some Examples - Sociology and otherwise
      • Boids Model of bird flocking.
      • Ants Model of ants' food collection habits
      • Moths Model of moths' love for light sources
      • Traffic Grid Model of city-grid traffic
      • Scatter Model of children's scattering tendencies
      • Segregation Recreation of Schelling's original segregation model
      • Cooperation Model of cooperation / competition for resource

Lab 1

Rebellion model in NetLogo

Process

Run through the following steps, answering each question.

  1. Run the model with its initial parameters and observe for aout 200 ticks.
  2. Suppose you wanted to discuss how often rebellions happened in this artificial society. What graph most prominently displays this?
  3. Suppose you are the head of state for this artificial society. You want to extend the period between rebellions; what parameter would you change and why? Make this change, and rerun the model if necessary. Were you correct?
  4. Say you wanted to verify this model against the political history of some nation. How would you map events from the real nation's history to controls the model? What kinds of controls could you add?
  5. How does the movement toggle affect the frequency and amplitude of rebellions? What could this toggle represent in the real world?
  6. Now attempt to create these patterns by changing the different settings of the models (potentially needing to restart the model). For each pattern, note exactly what value each control ( init-cop density, init-agent density, vision, legitamacy, max-jail-temrm, movement).
    1. Constant rebellion.
    2. Quiet, idyllic, happy society.
    3. Quiet, dystopic, unhappy society.
    4. Underfunded government that recently suffered a military coup.
    5. Mostly quiet with periodic flares of protest.
    6. Rebellious territory with highly restricted citizen movement (think occupied territories)

Write-up

  1. Answers to the questions in the lab.
  2. Parameter values for each scenario.

Software

  • Java
  • NetLogo

Bill of Materials

  • Pencil and paper or a word processor.

Lab 2

Excercise in coming up with agent sets and agent relations. Have students think about a possible model of Saga sitting patterns over time. Their assignment is to come up with a set of agents and a set of agent relations and a short description of how such a model's results would evolve over time.


Process

  • What to do, step-by-step
    • Discuss with your lab mates a potential "Saga Sitting pattern" model with attention to the factors involved and potential ways of collecting data. Write down these notes.
    • Brainstorm a set (with a size of at least 4) of agents that could be used in such a model. Write up a description of each model and explain why you thought it would be useful.
    • Brainstorm a set of relations between agents that could be used in such a model. Examples include students' like or dislike of certain food agents, students' like and dislike of each other, students' attendance at simulatneous events. Write up a description of each relation and explain why you thought it would be useful.
  • What to look for
    • Is it hard or easy to account for many of the involved factors? Why?
    • How does this process differ from other types of modeling?
      • Do you think coming up with mathematical formulas to describe the same issues would be easier or harder? Why?
      • What challenges arise when you try to come up with agents? with agent relations?
  • What to record
    • Your notes and agent / agent relation descriptions
    • Your answers to the 'what to look for' questions.
    • A short description of how such a Saga model, using your agents and agent relations would evolve over time.

Write-up

  • Required elements
    • Notes and descriptions
    • Answers
    • Model outcome + saga map.
  • Visualization opportunities
    • Draw out a map of saga to aid in your final description
  • Optional elements
    • None
  • Provide a template for the first couple of labs ala CS128?
    • Not sure? I didn't take CS128.

Software

Nothing.

Bill of Materials

Nada. Paper and pencil.

Evaluation

CRS Questions

  • 1. What is Emergent Behavior?
    • A. The complex outcome of the interaction of many simple rulesets
    • B. How we verify and validate Agent Based models
    • C. How we define rulesets for agents in an agent based model
    • D. How we determine the formulas we use in mathematical modeling
  • 2. Who wrote the seminal text on sociological agent-based modeling?
    • A. Peck & Rogers, et. al
    • B. Axtell and Epstein
    • C. Axeman and Edlefsen
    • D. Stribling, Aguayo, and Krohn
  • 3. What is the name of the first agent-based biological model?
    • A. Droids
    • B. BirdBots
    • C. Boids
    • D. BDroids

Quiz Questions

  1. Explain how agent based modeling's concept of emergent behavior could be used to explain some natural phenomenon.
  2. Name three good examples of things that could be used as agents.
  3. Name three good examples of agent relations that could be used in a model.
  4. Explain why it is sensible to model bird flocking using ABM. Extend this to justify modeling society with ABM.

Agent Based Modeling and Computational Sociology Metadata

This unit introduces students to Agent Based Modeling through the use of examples and then has them work in a context of Computational Sociology to learn more This section contains information about the goals of the unit and the approaches taken to meet them.

This section contains information about the goals of the unit and the approaches taken to meet them.

Scheduling

Should certainly come after mathematical modeling and before systems dynamics.

Concepts and Techniques

  • Pedagogical
    • Inquiry Based Learning
    • Degrees of open endedness
    • uses science to illustrate complexity of world around us
  • Structural
    • CRS
    • largely platform independent

General Education Alignment

  • Analytical Reasoning Requirement
    • Abstract Reasoning - From the [Catalog Description] Courses qualifying for credit in Abstract Reasoning typically share these characteristics:
      • They focus substantially on properties of classes of abstract models and operations that apply to them.
        • Complete. Agents are, definitively, abstract models. The whole purpose of the unit is to think about the people and the world around you in abstract terms.
      • They provide experience in generalizing from specific instances to appropriate classes of abstract models.
        • Complete. There is Discussion of boids, sugarscape and agent based modeling as a whole
      • They provide experience in solving concrete problems by a process of abstraction and manipulation at the abstract level. Typically this experience is provided by word problems which require students to formalize real-world problems in abstract terms, to solve them with techniques that apply at that abstract level, and to convert the solutions back into concrete results.
        • Complete. The emergent behavior is a process of abstract manipulation; comparing emergent behavior back against the real world is "converting solutions back into concrete results"
    • Quantitative Reasoning - From the [Catalog Description] General Education courses in Quantitative Reasoning foster students' abilities to generate, interpret and evaluate quantitative information. In particular, Quantitative Reasoning courses help students develop abilities in such areas as:
      • Using and interpreting formulas, graphs and tables.
        • Partial. Little of this - the point is to avoid formulas (initially), but graphs and tables come up when analyzing model results.
      • Representing mathematical ideas symbolically, graphically, numerically and verbally.
        • Partial. Little of this. We're working with people, not numbers.
      • Using mathematical and statistical ideas to solve problems in a variety of contexts.
        • None.
      • Using simple models such as linear dependence, exponential growth or decay, or normal distribution.
        • None. This could be worked in, but isn't there now.
      • Understanding basic statistical ideas such as averages, variability and probability.
        • None.
      • Making estimates and checking the reasonableness of answers.
        • Partial. Estimates are made, but they are not so quantitative as in more mathematical endeavors.
      • Recognizing the limitations of mathematical and statistical methods.
        • Complete. This is fulfilled - the point of ABM is the limitation of mathematical and statistical methods.
  • Scientific Inquiry Requirement - From the [Catalog Description] Scientific inquiry:
    • Develops students' understanding of the natural world.
      • Complete. Agent based methodology informs a way of thinking about natural processes that differs from more typical techniques - the ideas of emergent behavior are present in every day life.
    • Strengthens students' knowledge of the scientific way of knowing — the use of systematic observation and experimentation to develop theories and test hypotheses.
      • None.
    • Emphasizes and provides first-hand experience with both theoretical analysis and the collection of empirical data.
      • Complete. Models are theoretical. Analyzing one's own social circle, for example, is empirical collection.

Scaffolded Learning

None. The unit is lecture and work; neither fall into a set scaffolded structure.

I think you could re-consider this for the lab. Start simple, provide a bit of structure, and let them extend into and through that as far as they can.

Inquiry Based Learning

The get to think creatively; they make a (static) model and get to think up their own agent based model (in an easy, but still interactive, way)



Agent Based Modeling and Computational Sociology Mechanics

To Do

  • Read and consider JoshM's message about alife.
  • Expand lectures notes.
  • Come up with second lab, do design.
  • Consider the exercise-like things that Raush uses at the start of his article Seeing Around Corners

Comments

  • Make answers bold please!
  • Some of this is reference/extra reading, then? If this is only a 1 week unit, will they just get a big pile of reading up front? -There are snippets of each reading that I think should be assigned.
  • When you say evolve over time, do you mean how the model would look when it was run, or how the people making the model would change it as they learned more information? Added a few words to clarify.
  • + why? (yes/no-type questions are really easy for students to totally blank out)
  • Looks like this clarifies the above comment's question
  • + why?
  • A minimum number would be helpful here. People are lazy.
  • Where were the example applets??
  • These are very high-level... narrowing them down more will help a great deal. Also, how is the split made between the two+ classes?
  • I'd argue that they need to be expanded, that at a high level they cover the correct topics but need more depth to be useful.
  • This lab seems kind of short as compared with the other ones, which isn't necessarily a bad thing. However, if you wanted to move it to a prelab in order to have more time to do some sort of example or have them do something with Looking Around Corners as part of the lab, that might be good. On the other hand, you could also have them do some real life homework, like looking at the distribution of how people sit in Saga. Maybe they could find some environmental factors that influence students in Saga as well (ie people tend to sit closer to food?).
  • Agreed, I'm not sure this would fill up an entire 3 hours or however long labs are. Re: real life homework/observations: are people just people, or would we want them to account for gender, race, year, age, etc?
  • How is it useful in these disciplines? etc~

Lab Feedback

  • My only real issue with this lab is that isn't exactly so much a lab as a very interesting thought experiment. There should be some component of this lab that has them doing something and producing answers to questions with data and interpretation of that data at some point. The lab as it stands could definitely make a very good first chunk of a lab without too much change. The biggest change to make to what's already there would be to give more concrete deliverables. I found myself spending upwards of 3 hours on just this thought experiment because I had no idea what was an appropriate amount to write on each step. To make this lab complete past just that first part, there should be a second part that pushes them out of theory and into practice in one way or another.
  • I loved the first part of the lab. It was very fun to tweak the values in order to get the results that were desired. The questions were straightforward and easy to answer, but they still required a little bit of thought behind them, which I thought was a very nice touch. One thing to keep in mind with the section of the lab, however, is that what makes up a dystopia can be very subjective. My impression of it was that jail times would be long, there would be lots of police, and the police would have an overwhelming presence. This may not be an idea that other people share.
  • Another thing to point out is that it's not immediately obvious what the "visual range" toggle does. I was under the impression that it decreased the visible range of the agents themselves, making the rebellions take less long to spread. However, after some tampering with it, I'm positive that it dictates how far the cops can see, which has a factor in the "Risk calculation" that causes the agents to determine whether it is safe to rebel and therefore rebel. You might want to look into providing the students with a bit of information about the various controls and what they do. It doesn't have to be very in-depth, as I got the sense that part of the lab was figuring out what it does, but a little information might be nice.
  • This would probably take about an hour or two to do well, especially if some thought and deliberation were given to the questions. Otherwise, it wouldn't take very long at all. This would probably be a great way to tell apart those who put some time and effort into it from those who didn't care, actually.
  • Worked pretty well. The second part of the Lab gets the students thinking. Need to know a knowledge of agent-based modeling, so if the students didn't understand during the lectures, they will need to figure it out to complete this lab.

Lab Write-up

Josh Letter

Hey Nate and Charlie,

Sorry for the delay in my response; this is a contentious topic and it's the last week of class over here.

Personally, I've been conflicted about the use of computational sociology for a while. It mirrors a larger debate in social science disciplines and their different perspectives on solving the same problem: predicting and understanding human behavior. Suscintly, sociology and anthropology study the productions of human interaction on the large scale (such as entire populations, economic systems, and nations) while psychology studies smaller scopes indepth (things like emotions of individual humans, dreams, etc). When the two ends meet in the middle by sociologists working down and phsycologists work up, we should have a pretty good understanding on how humans interact.

One side known as aLife, the side you've delved into, uses simple, local rules over many agents in simple virtual environments to observe emergent behavior. While this approach works well for modeling the behavior of some systems (like Boids, termites, and other things that use steering behavior -- check out open steer by Reynolds, the Boids guy), its usefulness depends directly on the efficacy of the rules used. At best the rules represent aggregate behaviors which are determined by valid and verifiable quantitative or qualitative experimental analysis. At worst, which is unfortunately true of many popular systems (including Boids), the rules represent whatever was floating around in the researcher's head at the time (though this can be seen as being a valid production of a social entity and may have its own validity).

If you have a simulation that has many agents that adhere to accurrate and simple rules that apply to a virtual environment that has a relatively small state space (like Sugarscape), all social interaction outside of the simulation is not possible and would have no impact on your results. There is no room for the "irrational" behavior seem when social scientists study people in the real world. In this case, irrationality is behavior that seems to be not in the observed entity's best interests given the variables observable by the social scientist. This does not mean the agents are inheritly irrational; they just base their decisions on rules different that those placed on the situation by the social scientist's perspective (think latent variables to put it into something more palatable for hard sciences). This lack of coverage of the effect of latent variables in individual agents in macro computational sociology is the main criticism levied against the field.

The other side of the larger social science debate, there is research being conducted that attempts to model the complexity of individual agents. This research ranges from modeling how the brain works mechanically, such as the ACT-R 5.0 architecture, to true-to-psych emotion and cognitive models (PyschSim and EMA by Stacy Marsella). The major criticism of this work is pretty straightforward: can we even understand the true complexity of how we think, let alone simulate it? Just another NP problem, right?

There is work that is trying to meet in the middle. Later additions to PsychSim and EMA, Thespian (Mei Si), the SGD (Synthetic Group Dynamics) Model of multiagent social interaction (Ana Paiva, check out FearNot!), and much more synthetic characters research are all in the space between macro computational sociology and complex, low agent count simulations. The problem a lot of qualatitive-phobic types have is that they don't produce neat numbers like hard scientific (Folding@Home) and aLife simulations. However, they do have some qualatative metrics, but the field of virtual human is still quite young (unlike aLife techniques and cellular automata) is still figuring out how to best evaluate itself. Good examples are in space of Embodied Conversational Agents (ECAs) used by Justine Cassell to treat autism and of the work in expressive intelligence field, such as the game Façade by Michael Mateas (playing Façade might be a good homework assignment for the class).

To wrap up, simulating social science touches many active fields of research and I'm a bit biased as I reside in one of those fields (expressive intelligence). If you want more information or something stated more clearly, feel free to email or call me on my cell -- I'd be happy to help out EC's CS department in any way I can. The class sounds like it will be fun!

Here are some links to back up my references: http://opensteer.sourceforge.net/ Justine Cassel: http://www.soc.northwestern.edu/justine/ Stacy Marsella: http://www.isi.edu/~marsella/root/root.html Ana Paiva: http://gaips.inesc-id.pt/gaips/people/anapaiva.html http://www.cyc.com/ http://www.opencyc.org/ ACT-R reference: Anderson, J. et al. 2004. An integrated theory of mind. Psychological Review, 111(4):1036–1060.

Cheers! Josh

Archive

  • Tie this in with facebook/myspace/<social network here (virtual or real)>. Who do you know? Draw a graph of your best friends, good friends, acquaintances, less-than- acquaintances and follow the coloring/sizing of the model. Does this model resemble what emerges in the dynamic model (below)? Do several runs of the model and match their emergent stages against your drawing. Discuss validity of model based on this. The key for the lab is "Does this model resemble what emerges in the dynamic model?" The applet will run until it reaches a state of relative stasis. The static model that the students develop will, hopefully, have similar characteristics to the applet's emerged results. The idea is that 'reality' - the static model - appears in the emergent behavior of the dynamic model


Authorship

Nate Smith