Our mission is to help computational modelers develop, document, and share their computational models in accordance with community standards and good open science and software engineering practices. Model authors can publish their model source code in the Computational Model Library with narrative documentation as well as metadata that supports open science and emerging norms that facilitate software citation, computational reproducibility / frictionless reuse, and interoperability. Model authors can also request private peer review of their computational models. Models that pass peer review receive a DOI once published.
All users of models published in the library must cite model authors when they use and benefit from their code.
Please check out our model publishing tutorial and feel free to contact us if you have any questions or concerns about publishing your model(s) in the Computational Model Library.
We also maintain a curated database of over 7500 publications of agent-based and individual based models with detailed metadata on availability of code and bibliometric information on the landscape of ABM/IBM publications that we welcome you to explore.
Displaying 10 of 1256 results
This model implements a coupled opinion-mobility agent-based framework in NetLogo, extending Attraction-Repulsion Model (ARM) dynamics with endogenous migration in continuous 2D space.
Each agent has an opinion s in [0,1] and a spatial position (x,y). Agents interact locally within an interaction radius, with exposure-controlled interaction probability. Opinion updates follow ARM rules: attraction for small opinion distance and repulsion for large distance (tolerance threshold T). After social interaction, agents move according to a social-force mechanism that balances attraction to similar neighbors and avoidance of dissimilar neighbors, controlled by orientation bias (approaching goods vs leaving bads). The model also includes an optional exposure-mobility coupling setting.
Main outputs include polarization (P), spatial assortativity (Moran’s I), mixed-neighbor fraction (f_mix), and good-component count (N_g). The model is designed to study phase behavior of polarization and segregation under mobility and tolerance heterogeneity.
…
In his 2003 book, Historical Dynamics (ch. 4), Turchin describes and briefly analyzes a spatial ABM of his metaethnic frontier theory, which is essentially a formalization of a theory by Ibn Khaldun in the 14th century. In the model, polities compete with neighboring polities and can absorb them into an empire. Groups possess “asabiya”, a measure of social solidarity and a sense of shared purpose. Regions that share borders with other groups will have increased asabiya do to salient us vs. them competition. High asabiya enhances the ability to grow, work together, and hence wage war on neighboring groups and assimilate them into an empire. The larger the frontier, the higher the empire’s asabiya.
As an empire expands, (1) increased access to resources drives further growth; (2) internal conflict decreases asabiya among those who live far from the frontier; and (3) expanded size of the frontier decreases ability to wage war along all frontiers. When an empire’s asabiya decreases too much, it collapses. Another group with more compelling asabiya eventually helps establish a new empire.
This model simulates a forest ecosystem affected by human logging. We explore different kind of approaches and their possible consequences for the ecosystem. Loggers can either be responsible or irresponsible, they will either take care to cut trees or not. In turn their actions will have consequences on the quality of the soil, the atmosphere as well as their profit made from logging. In this model we see that even careful management cannot prevent the degradation of the forest ecosystem.
Manipulate[
Module[{fDot, mDot, poly, roots, stableRoots, rStar, rIso,
endPointStar, endPointIso},(1. Define the System Dynamics)
fDot = phi1(f/m) - phi2(m/f);
mDot = mu1(f/m) - mu2(m/f);
(*2. Find the Equilibrium Ratio r=f/
…
This agent-based model, developed for the study “Online Protest and Repression in Authoritarian Settings,” examines how online protest and repression evolve in authoritarian contexts and how these dynamics affect ordinary users’ attitudes and behavior on social media. The model integrates key theoretical and empirical insights into social media use and core political factors that shape digital contention in authoritarian settings. The following questions are addressed: (1) how online protest–repression dynamics unfold across different levels of authoritarianism and varying compositions of committed accounts, and (2) how ordinary users’ internal propensity to protest and their perceived probability of successful repression change during online protest-repression contestation. The model is evaluated against two empirically grounded macro patterns observed in the real world. The first is enduring protest: online protest becomes dominant as vocal protesters grow to outnumber vocal repressors, shrinking the pool of silent users and stabilizing a pro-protest majority. The second is suppressed protest: online dissent is contained as vocal repression and silence expand in response to protest, yielding a sustained majority of repressive and silent accounts. Together, these dynamics demonstrate how dissenting voices are empowered and suppressed online in authoritarian settings.
ARMM is a theoretical agent-based model that formalizes Murra’s Theory of Verticality (Murra, 1972) to explore how multi-zonal resource management systems emerge in mountain landscapes. The model identifies the social, political, and economic mechanisms that enable vertical complementarity across ecological gradients.
Built in NetLogo, ARMM employs an abstract 111×111 grid divided into four Andean ecological zones (Altiplano, Highland, Lowland, Coast), each containing up to 18 resource types distributed according to ecological suitability. To test general theoretical principles rather than replicate specific geography, resource locations are randomized at each model initialization.
Settlement agents pursue one of two economic strategies: diversification (seeking resource variety, maximum 2 units per type) or accumulation (maximising total quantity, maximum 30 units). Agents move between adjacent zones through hierarchical decision-making, first attempting peaceful interactions—coexistence (governed by tolerance) and trading (governed by cooperation)—before resorting to conflict (theft or takeover, governed by belligerence).
The model demonstrates that vertical complementarity can emerge through fundamentally different mechanisms: either through autonomous mobility under political decentralization or through state-coordinated redistribution under centralization. Sensitivity analysis reveals that belligerence and economic strategy explain approximately 25% of outcome variance, confirming that structural inequalities between zones result from political-economic organization rather than environmental constraints alone.
As a preliminary theoretical model, ARMM intentionally maintains simplicity to isolate core mechanisms and generate testable hypotheses. This foundational framework will guide future empirically-calibrated versions that incorporate specific archaeological settlement data and geographic features from the Carangas region (Bolivia-Chile border), enabling direct comparison between theoretical predictions and observed historical patterns.
Boyds (Boids that Fight) is an agent-based model in NetLogo that extends the classic Flocking model with multi-faction competition, a local fight–flight heuristic, and a target locking/“taking” mechanism. The model separates perception (vision) from engagement range (lock distance) and uses per-faction steering bounds to explore how local numerical superiority, sensing, and bounded turning affect victory, losses, and emergent formations.
Software for an agent-based game-theoretic model of the contact hypothesis of prejudice reduction, to accompany “Modeling Prejudice Reduction,” in the Handbook of Computational Social Psychology, adapted from Public Affairs Quarterly 19 (2) 2005.
Subjective biases and errors systematically affect market equilibria, whether at the population level or in bilateral trading. Here, we consider the possibility that an agent engaged in bilateral trading is mistaken about her own valuation of the good she expects to trade, that has not been explicitly incorporated into the existing bilateral trade literature. Although it may sound paradoxical that a subjective private valuation is something an agent can be mistaken about, as it is up to her to fix it, we consider the case in which that agent, seller or buyer, consciously or not, given the structure of a market, a type of good, and a temporary lack of information, may arrive at an erroneous valuation. The typical context through which this possibility may arise is in relation with so-called experience goods, which are sold while all their intrinsic qualities are still unknown (such as untasted bottled fine wines). We model this “private misvaluation” phenomenon in our study. The agents may also be mistaken about how their exchange counterparties are themselves mistaken. Formally, they attribute a certain margin of error to the other agent, which can differ from the actual way that another agent misvalues the good under consideration. This can constitute the source of a second-order misvaluation. We model different attitudes and situations in which agents face unexpected signals from their counterparties and the manner and extent to which they revise their initial beliefs. We analyse and simulate numerically the consequences of first-order and second-order misvaluation on market equilibria.
Version: 2.1 (Revised)
Date: January 2026
Status: Exploratory Analysis Tool
Displaying 10 of 1256 results