Tragedy of the Commons with Environmental Feedback: A Model of Human-AI Socio-Environmental Water Dilemma (1.1.0)
This project is an interactive agent-based model simulating consumption of a shared, renewable resource using a game-theoretic framework with environmental feedback. The primary function of this model was to test how resource-use among AI and human agents degrades the environment, and to explore the socio-environmental feedback loops that lead to complex emergent system dynamics. We implemented a classic game theoretic matrix which decides agents´ strategies, and added a feedback loop which switches between strategies in pristine vs degraded environments. This leads to cooperation in bad environments, and defection in good ones.
Despite this use, it can be applicable for a variety of other scenarios including simulating climate disasters, environmental sensitivity to resource consumption, or influence of environmental degradation to agent behaviour.
The ABM was inspired by the Weitz et. al. (2016, https://pubmed.ncbi.nlm.nih.gov/27830651/) use of environmental feedback in their paper, as well as the Demographic Prisoner’s Dilemma on a Grid model (https://mesa.readthedocs.io/stable/examples/advanced/pd_grid.html#demographic-prisoner-s-dilemma-on-a-grid). The main innovation is the added environmental feedback with local resource replenishment.
Beyond its theoretical insights into coevolutionary dynamics, it serves as a versatile tool with several practical applications. For urban planners and policymakers, the model can function as a ”digital sandbox” for testing the impacts of locating high-consumption industrial agents, such as data centers, in proximity to residential communities. It allows for the exploration of different urban densities, and the evaluation of policy interventions—such as taxes on defection or subsidies for cooperation—by directly modifying the agents’ resource consumptions to observe effects on resource health. Furthermore, the model provides a framework for assessing the resilience of such socio-environmental systems to external shocks.
The model is built using Mesa 1.2.1 for the model and Solara for the interactive web-based dashboard.
Release Notes
Version 1.1 - July 7, 2025
This is a maintenance release to correct the main model.py file.
Changes in this version:
Corrected Model File: The primary model.py file has been replaced with the correct, functional version. The previously uploaded file was from an earlier development stage. The new model.py successfully adds deviation rates, as well as differing resource consumption rates for agents.
Improved Documentation: Added comprehensive docstrings to the WaterToC model class and all its methods, explaining the purpose of each component.
Associated Publications
Tragedy of the Commons with Environmental Feedback: A Model of Human-AI Socio-Environmental Water Dilemma 1.1.0
This project is an interactive agent-based model simulating consumption of a shared, renewable resource using a game-theoretic framework with environmental feedback. The primary function of this model was to test how resource-use among AI and human agents degrades the environment, and to explore the socio-environmental feedback loops that lead to complex emergent system dynamics. We implemented a classic game theoretic matrix which decides agents´ strategies, and added a feedback loop which switches between strategies in pristine vs degraded environments. This leads to cooperation in bad environments, and defection in good ones.
Despite this use, it can be applicable for a variety of other scenarios including simulating climate disasters, environmental sensitivity to resource consumption, or influence of environmental degradation to agent behaviour.
The ABM was inspired by the Weitz et. al. (2016, https://pubmed.ncbi.nlm.nih.gov/27830651/) use of environmental feedback in their paper, as well as the Demographic Prisoner’s Dilemma on a Grid model (https://mesa.readthedocs.io/stable/examples/advanced/pd_grid.html#demographic-prisoner-s-dilemma-on-a-grid). The main innovation is the added environmental feedback with local resource replenishment.
Beyond its theoretical insights into coevolutionary dynamics, it serves as a versatile tool with several practical applications. For urban planners and policymakers, the model can function as a ”digital sandbox” for testing the impacts of locating high-consumption industrial agents, such as data centers, in proximity to residential communities. It allows for the exploration of different urban densities, and the evaluation of policy interventions—such as taxes on defection or subsidies for cooperation—by directly modifying the agents’ resource consumptions to observe effects on resource health. Furthermore, the model provides a framework for assessing the resilience of such socio-environmental systems to external shocks.
The model is built using Mesa 1.2.1 for the model and Solara for the interactive web-based dashboard.
Release Notes
Version 1.1 - July 7, 2025
This is a maintenance release to correct the main model.py file.
Changes in this version:
Corrected Model File: The primary model.py file has been replaced with the correct, functional version. The previously uploaded file was from an earlier development stage. The new model.py successfully adds deviation rates, as well as differing resource consumption rates for agents.
Improved Documentation: Added comprehensive docstrings to the WaterToC model class and all its methods, explaining the purpose of each component.
This website uses cookies and Google Analytics to help us track user engagement and improve our site. If
you'd like to know more information about what data we collect and why, please see
our data privacy policy. If you continue to use this site, you consent to
our use of cookies.