Library/Health and life sciences
Smoking diet and physical activity behavior
This is an illustrative, uncalibrated agent-based model of lifestyle behaviors.
Overview
This is an illustrative, uncalibrated agent-based model of lifestyle behaviors. It is not a scientifically validated result and should not be used for policy decisions or health predictions. It is designed for teaching and exploration.
Mechanism
Each person (agent) has three binary behaviors:
- Smoking (smoker? true/false)
- Diet quality (good-diet? true/false)
- Physical activity (active? true/false)
At every tick, each person may change each behavior based on:
1. Baseline tendency – a small probability of improving (e.g., quitting smoking, adopting a better diet, becoming more active) independent of others. 2. Social influence – the probability of changing is modulated by the fraction of neighbors who already have (or lack) the behavior. A higher social-pressure slider makes neighbors more influential. 3. Random noise – the baseline rates themselves include a stochastic element.
The model runs on a small toroidal world (33×33 patches) with a bounded population (10–100 people). People do not move; they are placed randomly at setup and remain in place.
Controls
| Widget | Meaning | Units | |---|---|---| | initial-people | Number of people created at setup | count | | smoking-prevalence | Initial % of people who smoke | % | | diet-prevalence | Initial % of people with a good diet | % | | activity-prevalence | Initial % of people who are active | % | | social-pressure | How strongly neighbors influence behavior change | % (0–100) | | quit-rate | Baseline probability of quitting smoking per tick | % | | start-rate | Baseline probability of starting smoking per tick | % | | diet-improve-rate | Baseline probability of improving diet per tick | % | | diet-worsen-rate | Baseline probability of worsening diet per tick | % | | activity-improve-rate | Baseline probability of becoming more active per tick | % | | activity-worsen-rate | Baseline probability of becoming less active per tick | % |
Monitors and Plots
- People – total number of agents.
- Smokers (%), Good diet (%), Active (%) – current prevalence of each behavior.
- Avg healthy behaviors – mean number of healthy behaviors per person (0–3).
- Behavior prevalence over time – line plot of the three prevalence percentages.
Assumptions and Limitations
- People do not move; social influence is based on fixed spatial neighbors.
- Behaviors are binary (smoker/non-smoker, good/bad diet, active/inactive).
- There is no aging, mortality, or new births; the population is fixed.
- Social influence is symmetric and based only on the 8 neighboring patches.
- All rates are per-tick probabilities, not calibrated to real-world data.
- The model is illustrative only and does not represent any specific population or health system.
How to Use
1. Press Setup to initialize the population. 2. Adjust sliders to explore different scenarios. 3. Press Go to run the simulation. 4. Watch the monitors and plot to see how behavior prevalence evolves. 5. Press Setup again to reset and try new parameters.
- Field
- Health and life sciences
- Model file
Smoking-diet-and-physical-activity-behavior-002f45031575.nlogox· 45 KB- Controls
initial-people,smoking-prevalence,diet-prevalence,activity-prevalence,social-pressure,quit-rate,start-rate,diet-improve-rate,diet-worsen-rate,activity-improve-rate,activity-worsen-rate- Reporters
healthy-score,healthy-count- Procedures
setup,go,update-behaviors,recolor,healthy-score,healthy-count- Experiment
- none pinned in this file
- Documentation
- 6/7 · 436 words in the Info tab