Home Download Help Resources Extensions FAQ References Contact Us Donate Models: Library Community Modeling Commons User Manuals: Web Printable Chinese Czech Japanese Spanish

NetLogo Models Library: 
If you download the NetLogo application, this model is included. (You can also run this model in your browser, but we don't recommend it; details here.) 
This model simulates the distribution of wealth. "The rich get richer and the poor get poorer" is a familiar saying that expresses inequity in the distribution of wealth. In this simulation, we see Pareto's law, in which there are a large number of "poor" or red people, fewer "middle class" or green people, and many fewer "rich" or blue people.
This model is adapted from Epstein & Axtell's "Sugarscape" model. It uses grain instead of sugar. Each patch has an amount of grain and a grain capacity (the amount of grain it can grow). People collect grain from the patches, and eat the grain to survive. How much grain each person accumulates is his or her wealth.
The model begins with a roughly equal wealth distribution. The people then wander around the landscape gathering as much grain as they can. Each person attempts to move in the direction where the most grain lies. Each time tick, each person eats a certain amount of grain. This amount is called their metabolism. People also have a life expectancy. When their lifespan runs out, or they run out of grain, they die and produce a single offspring. The offspring has a random metabolism and a random amount of grain, ranging from the poorest person's amount of grain to the richest person's amount of grain. (There is no inheritance of wealth.)
To observe the equity (or the inequity) of the distribution of wealth, a graphical tool called the Lorenz curve is utilized. We rank the population by their wealth and then plot the percentage of the population that owns each percentage of the wealth (e.g. 30% of the wealth is owned by 50% of the population). Hence the ranges on both axes are from 0% to 100%.
Another way to understand the Lorenz curve is to imagine a society of 100 people with a fixed amount of wealth available. Each individual is 1% of the population. Rank the individuals in order of their wealth from greatest to least: the poorest individual would have the lowest ranking of 1 and so forth. Then plot the proportion of the rank of an individual on the yaxis and the portion of wealth owned by this particular individual and all the individuals with lower rankings on the xaxis. For example, individual Y with a ranking of 20 (20th poorest in society) would have a percentage ranking of 20% in a society of 100 people (or 100 rankings)  this is the point on the yaxis. The corresponding plot on the xaxis is the proportion of the wealth that this individual with ranking 20 owns along with the wealth owned by all the individuals with lower rankings (from rankings 1 to 19). A straight line with a 45 degree incline at the origin (or slope of 1) is a Lorenz curve that represents perfect equality  everyone holds an equal part of the available wealth. On the other hand, should only one family or one individual hold all of the wealth in the population (i.e. perfect inequity), then the Lorenz curve will be a backwards "L" where 100% of the wealth is owned by the last percentage proportion of the population. In practice, the Lorenz curve actually falls somewhere between the straight 45 degree line and the backwards "L".
For a numerical measurement of the inequity in the distribution of wealth, the Gini index (or Gini coefficient) is derived from the Lorenz curve. To calculate the Gini index, find the area between the 45 degree line of perfect equality and the Lorenz curve. Divide this quantity by the total area under the 45 degree line of perfect equality (this number is always 0.5  the area of 454590 triangle with sides of length 1). If the Lorenz curve is the 45 degree line then the Gini index would be 0; there is no area between the Lorenz curve and the 45 degree line. If, however, the Lorenz curve is a backwards "L", then the GiniIndex would be 1  the area between the Lorenz curve and the 45 degree line is 0.5; this quantity divided by 0.5 is 1. Hence, equality in the distribution of wealth is measured on a scale of 0 to 1  more inequity as one travels up the scale. Another way to understand (and equivalently compute) the Gini index, without reference to the Lorenz curve, is to think of it as the mean difference in wealth between all possible pairs of people in the population, expressed as a proportion of the average wealth (see Deltas, 2003 for more).
The PERCENTBESTLAND slider determines the initial density of patches that are seeded with the maximum amount of grain. This maximum is adjustable via the MAXGRAIN variable in the SETUP procedure in the procedures window. The GRAINGROWTHINTERVAL slider determines how often grain grows. The NUMGRAINGROWN slider sets how much grain is grown each time GRAINGROWTHINTERVAL allows grain to be grown.
The NUMPEOPLE slider determines the initial number of people. LIFEEXPECTANCYMIN is the shortest number of ticks that a person can possibly live. LIFEEXPECTANCYMAX is the longest number of ticks that a person can possibly live. The METABOLISMMAX slider sets the highest possible amount of grain that a person could eat per clock tick. The MAXVISION slider is the furthest possible distance that any person could see.
GO starts the simulation. The TIME ELAPSED monitor shows the total number of clock ticks since the last setup. The CLASS PLOT shows a line plot of the number of people in each class over time. The CLASS HISTOGRAM shows the same information in the form of a histogram. The LORENZ CURVE plot shows the Lorenz curve of the population at a particular time as well as the 45 degree line of equality. The GINIINDEX V. TIME plot shows the Gini index at the time that the Lorenz curve is drawn. The LORENZ CURVE and the GINIINDEX V. TIME plots are updated every 5 passes through the GO procedure.
Notice the distribution of wealth. Are the classes equal?
This model usually demonstrates Pareto's Law, in which most of the people are poor, fewer are middle class, and very few are rich. Why does this happen?
Do poor families seem to stay poor? What about the rich and the middle class people?
Watch the CLASS PLOT to see how long it takes for the classes to reach stable values.
As time passes, does the distribution get more equalized or more skewed? (Hint: observe the Gini index plot.)
Try to find resources from the U.S. Government Census Bureau for the U.S.'s Gini coefficient. Are the Gini coefficients that you calculate from the model comparable to those of the Census Bureau? Why or why not?
Is there a trend in the plotting of the Gini index with respect to time? Does the plot oscillate? Or does it stabilize to a certain number?
Are there any settings that do not result in a demonstration of Pareto's Law?
Play with the NUMGRAINGROWN slider, and see how this affects the distribution of wealth.
How much does the LIFEEXPECTANCYMAX matter?
Change the value of the MAXGRAIN variable (in the setup
procedure in the Code tab). Do outcomes differ?
Experiment with the PERCENTBESTLAND and NUMPEOPLE sliders. How do these affect the outcome of the distribution of wealth?
Try having all the people start in one location. See what happens.
Try setting everyone's initial wealth as being equal. Does the initial endowment of an individual still arrive at an unequal distribution in wealth? Is it less so when setting random initial wealth for each individual?
Try setting all the individual's wealth and vision to being equal. Do you still arrive at an unequal distribution of wealth? Is it more equal in the measure of the Gini index than with random endowments of vision?
Have each newborn inherit a percentage of the wealth of its parent.
Add a switch or slider which has the patches grow back all or a percentage of their grain capacity, rather than just one unit of grain.
Allow the grain to give an advantage or disadvantage to its carrier, such as every time some grain is eaten or harvested, pollution is created.
Would this model be the same if the wealth were randomly distributed (as opposed to a gradient)? Try different landscapes, making SETUP buttons for each new landscape.
Try allowing metabolism or vision or another characteristic to be inherited. Will we see any sort of evolution? Will the "fittest" survive? If not, why not?
We said above that "there is no inheritance of wealth" in the model, but that is not entirely true. New turtles are born in the same location as their parents. If grain is plentiful relative to the population at this location, they inherit a good starting situation. Try moving the turtles to a random patch when they are born. Does that lead to a more equitable distribution of wealth?
Try adding in seasons into the model. That is to say have the grain grow better in a section of the landscape during certain times and worse at others.
How could you change the model to achieve wealth equality?
The way the procedures are set up now, one person will sometimes follow another. You can see this by setting the number of people relatively low, such as 50 or 100, and having a long life expectancy. Why does this phenomenon happen? Try adding code to prevent this from occurring. (Hint: When and how do people check to see which direction they should move in?)
Examine how the landscape of color is created  note the use of the scalecolor
reporter. Each patch is given a value, and scalecolor
reports a color for each patch that is scaled according to its value.
Note the use of lists in drawing the Lorenz Curve and computing the Gini index.
This model is based on a model described in Epstein, J. & Axtell R. (1996). Growing Artificial Societies: Social Science from the Bottom Up. Washington, DC: Brookings Institution Press.
For an explanation of Pareto's Law, see https://en.wikipedia.org/wiki/Pareto_principle.
For more on the calculation of the Gini index see:
In particular, note that if one is calculating the Gini index of a sample for the purpose of estimating the value for a larger population, a small correction factor to the method used here may be needed for small samples.
If you mention this model or the NetLogo software in a publication, we ask that you include the citations below.
For the model itself:
Please cite the NetLogo software as:
Copyright 1998 Uri Wilensky.
This work is licensed under the Creative Commons AttributionNonCommercialShareAlike 3.0 License. To view a copy of this license, visit https://creativecommons.org/licenses/byncsa/3.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
Commercial licenses are also available. To inquire about commercial licenses, please contact Uri Wilensky at uri@northwestern.edu.
This model was created as part of the project: CONNECTED MATHEMATICS: MAKING SENSE OF COMPLEX PHENOMENA THROUGH BUILDING OBJECTBASED PARALLEL MODELS (OBPML). The project gratefully acknowledges the support of the National Science Foundation (Applications of Advanced Technologies Program)  grant numbers RED #9552950 and REC #9632612.
This model was converted to NetLogo as part of the projects: PARTICIPATORY SIMULATIONS: NETWORKBASED DESIGN FOR SYSTEMS LEARNING IN CLASSROOMS and/or INTEGRATED SIMULATION AND MODELING ENVIRONMENT. The project gratefully acknowledges the support of the National Science Foundation (REPP & ROLE programs)  grant numbers REC #9814682 and REC0126227. Converted from StarLogoT to NetLogo, 2001.
(back to the NetLogo Models Library)