Agent-based computational modeling (ABCM) plays a central role in analytical sociology (Hedström and Bearman, 2009). Analytical sociology (AS) aims to explain social phenomena with precisely described and empirically realistic social mechanisms. Mechanistic explanations in AS target, in particular, complex micro-macro interactions in which individual behavior at the micro level of society can, in interaction with meso-and macro-level structures, bring about macro outcomes individuals neither necessarily anticipate nor desire. Examples are residential segregation (Clark and Fossett, 2008), opinion polarization (Flache, Mäs, et al., 2017), or dysfunctional status hierarchies (Mark et al., 2009). AS aspires to uncover why this occurs in real-life social settings by modeling the underlying social mechanism at a level of precision that allows logical deduction and empirical refutation of both model assumptions and predictions. With this ambition, AS is not fundamentally different from, for example, empirically oriented Rational Choice Sociology. However, despite the considerable flexibility of modern conceptualizations of Rational Choice Sociology (Wittek et al., 2013), AS is different in that is does not commit to a particular set of ingredients for modeling individual behavior (Manzo, 2014, pp. 21-27). ABCM's capacity to combine high theoretical flexibility with analytical precision is exactly what makes it so attractive to analytical sociologists.Computer simulation is the main approach in ABCM for analyzing whether, and if so, how, and under which conditions exactly the social mechanism formulated in a computational model can generate the phenomenon the researcher wants to understand (Epstein, 2006). While ABCM is not the only method for formalizing social mechanisms, it is particularly compatible with AS (Macy and Flache, 2009;Manzo, 2014Manzo, , 2021 because it combines formal precision and the ability to model and analyze complex micro-macro interactions (Mäs, Chapter 4, this volume) and theoretical flexibility in a unique way.ABCM forces a modeler to make the explanatory mechanism fully explicit. The need to translate a conceptual mechanistic model into an executable computer program requires describing algorithmically how agents arrive at changes in their actions, cognitions or emotions 1This is an open-access chapter distributed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 Unported (https://creativecommons.org/licenses/by-nc-nd/4.0/). Users can redistribute the work for non-commercial purposes, as long as it is passed along unchanged and in whole, as detailed in the License. Edward Elgar Publishing Ltd. must be clearly credited as the rights holder for publication of the original work. Any translation or adaptation of the original content requires the written authorization of Edward Elgar Publishing Ltd.The first author gratefully acknowledges financial support by the Netherlands Organization for Scientific Research (NWO) under the 2018 ORA grant ToRealSim (464.18.112). Both author...