NetLogo banner

NetLogo Publications
Contact Us

Modeling Commons

Beginners Interactive NetLogo Dictionary (BIND)
NetLogo Dictionary

User Manuals:
Farsi / Persian


NetLogo User Community Models

(back to the NetLogo User Community Models)

[screen shot]

If clicking does not initiate a download, try right clicking or control clicking and choosing "Save" or "Download".(The run link is disabled for this model because it was made in a version prior to NetLogo 6.0, which NetLogo Web requires.)


This is a social science model. Based on the theory of planned behavior, a person's intention to gamble, which eventually leads to gambling, is partially dependent on his attitudes he has towards gambling behavior.

Considering that existing gamblers and ex-gamblers have an influence on a person's attitude towards gambling intention, thus behavior, this models simulates the gambling behavior of pathological gamblers under the influence of other pathological gamblers and ex-gamblers. The model has two types of patch agents: ex-gambler agents and gambler agents (represents the pathological gamblers).

The basic premise of the model is that gambler agents will either remain or change their gambling behavior depending on the number of ex-gambler agents and gambler agents surrounding them. This model does not simulate the changes in gambling behavior in ex-gamblers. It only models the gambling behavior of the patholog


1. Gambler patches live in eight-cell neighborhoods. Whenever a gambler patch is calculating its gambling influence from its surrounding gambler patches and ex-gambler patches, it is the center of the neighborhood. When it is not calculating its influence, it simply becomes one of the neighboring patch for another patch.

2. Each type of neighboring patch carry a certain strength with them.
Gambler patch strength "sgam": 1.4
Ex-gambler patch strength "sexgam": -0.8

A positive strength indicates that gambling is encouraged.
A negative strength indicates that gambling is discouraged.

i - Gambler patch strength was determined as follow.
Past reasearch has determined that the gambling intention is correlated to actual gambling behavior by 0.3. A separate research showed that a pathological gamblers intention to gamble is influenced by another pathological gambler by 4.65 on a scale of 0 - 10. Taking these two results together, a gamblers influence on another gambler is ( 4.65 * 0.3 = 1.4 ).

ii - Ex-gambler patch strength was determined as follow.
Past research has shown that ex-gamblers actually has a 10 % success rate in convincing existing gamblers to quit gambling. Since a gambler patch is surrounded by only 8 neighboring patches, the ex-gamblers influence on an existing gambler is ( -0.1 * 8 = -0.8 ).

3. Each gambler patch calculates its gambling influence from its neighboring patches based on the following procedure:

i - the model randomly selects a gambler patch. The selected patch will count the number of "similar-nearby" neighbors, ie the number of neighboring gambler patches, and the number of "others-nearby" neighbors, ie the number of neighboring ex-gambler patches.

ii - the selected gambler patch will then calculate the gamblers influence and ex-gamblers influence base on the following equation:

gamblers-influence = "sgam" * "similar-nearby"
ex-gamblers-influence = "sexgam" * " others=nearby"

iii - To determine if the selected patch will remain as a gambler patch or change into an ex-gambler patch, the following either of the conditions must be met :

if ( ex-gamblers-influence + gamblers-influence < 0 )
or ( number of "similars-nearby" = 8 ),

then the selected patch will change into an ex-gambler patch, indicating that gambler has quit gambling.

if neither condition is satisfied, the selected patch will remain as a gambler patch, indicating that gambling is continued.

iv - this repeats until the model is stabilized where there are no more changes in the patches.


SETUP button — sets up the model by creating the agents.

GO button — runs the model

PERCENT-GAMBLERS slider- lets you determine the initial proportion of gamblers (and ex-gamblers)


set the percentage of gamblers at 0.25, 0.5 and 0.75 respectively in behavior space and plot the graph. You will notice that the influence of the ex-gamblers on gamblers is not proportional. Specifically, the influence is larger (larger no. of gamblers turning to ex-gamblers) when percentage of gamblers falls between 0.25 to 0.5 as compared to when its between 0.5 to 0.75.


There are many other factors that affects the a person's gambling behavior aside from the influence from other pathological gamblers and ex-gamblers. The model can be extended by including variables on a slider like perceived behavioral control and subjective norms. Both variables are suggested to have an influence on gambling intention, thus gambling behavior.


Wu, A., & Tang, C. (n.d). Problem Gambling of Chinese College Students: Application of the Theory of Planned Behavior. Journal Of Gambling Studies, 28(2), 315-324.

Petry, N. M., Ammerman, Y., Bohl, J., Doersch, A., Gay, H., Kadden, R., & ... Steinberg, K. (2006). Cognitive-behavioral therapy for pathological gamblers. Journal Of Consulting And Clinical Psychology, 74(3), 555-567. doi:10.1037/0022-006X.74.3.555

Sodano, R., & Wulfert, E. (2010). Cue Reactivity in Active Pathological, Abstinent Pathological, and Regular Gamblers. Journal Of Gambling Studies, 26(1), 53-65. doi:10.1007/s10899-009-9146-8

(back to the NetLogo User Community Models)