Computational Modeling and Simulation of Spatiotemporal Characteristics of Crime in Urban Environments Uwe Glässer Software Technology Lab School of Computing Science Simon Fraser University glaesser@cs.sfu.ca Specification technology Software Technology Lab @ SFU Abstract State Machines Rigorous modeling and analysis of complex computational systems Constructive approach for Requirements analysis Design specification Experimental validation Formal verification ASM Research Center (www.asmcenter.org) Uwe Glässer Crime Hot Spots: Behavioral, Computational and Mathematical Models, IPAM, UCLA, Jan 29 - Feb 2, 2007 2 Applications Software Technology Lab @ SFU Semantic foundations Modeling complex distributed systems Communications software Web service architectures System design languages Software technology for Intelligent Systems Computational criminology Aviation security Computational methods and tools Uwe Glässer Abstract executable specifications Crime Hot Spots: Behavioral, Computational and Mathematical Models, IPAM, UCLA, Jan 29 - Feb 2, 2007 3 CoreASM Executable specifications R. Farahbod, V. Gervasi and U. Glässer. CoreASM: An Extensible ASM Execution Engine. To appear in Fundamenta Informatica 77 (1-2), pp. 71-103 Verification Environment Problem … Design Abstract Software Model CoreASM Ground model Refinement Software Technology Lab @ SFU ConstructionAsmL, XASM, … Coding Uwe Glässer Implementation Detailed ground model Code Graphical UI Testing Environment Control API CoreASM Engine Abstract Storage Parser Interpreter Scheduler Crime Hot Spots: Behavioral, Computational and Mathematical Models, IPAM, UCLA, Jan 29 - Feb 2, 2007 4 Software Technology Lab @ SFU Uwe Glässer Crime Hot Spots: Behavioral, Computational and Mathematical Models, IPAM, UCLA, Jan 29 - Feb 2, 2007 5 Software Technology Lab @ SFU A notorious problem How can one cope with the notorious problem of establishing the correctness and completeness of abstract functional requirements in the design of discrete dynamic systems prior to actually building a system? Uwe Glässer Crime Hot Spots: Behavioral, Computational and Mathematical Models, IPAM, UCLA, Jan 29 - Feb 2, 2007 6 Software Technology Lab @ SFU Can any algorithm, never mind how abstract, be modeled by a generalized machine very closely and faithfully? ... If we stick to one abstract level (abstracting from low-level details and being oblivious to a possible higher-level picture) and if the states of the algorithm reflect all the pertinent information, then a particular small instruction set suffices in all cases. Yuri Gurevich Sequential ASMs Parallel ASMs (synchronous) Distributed ASMs (asynchronous) Uwe Glässer Crime Hot Spots: Behavioral, Computational and Mathematical Models, IPAM, UCLA, Jan 29 - Feb 2, 2007 7 Church-Turing thesis Software Technology Lab @ SFU Every computable function is Turing computable. (1936) … can be calculated by an effective or mechanical method not demanding any insight or ingenuity Any algorithm can be simulated by a Turing machine with only polynomial slowdown. An algorithm can be given a precise meaning by a Turing machine. Can one generalize Turing machines so that any algorithm, never mind how abstract, can be modeled by a generalized machine very closely and faithfully? Uwe Glässer Crime Hot Spots: Behavioral, Computational and Mathematical Models, IPAM, UCLA, Jan 29 - Feb 2, 2007 8 Software Technology Lab @ SFU The ASM thesis The ASM thesis is that any algorithm can be modeled at its natural abstraction level by an appropriate ASM. (Gurevich, 1985) Sequential thesis: Sequential ASMs capture sequential algorithms. (Gurevich, 2000) Parallel thesis: ASMs capture parallel algorithms. (Blass/Gurevich, 2003) …? Uwe Glässer Crime Hot Spots: Behavioral, Computational and Mathematical Models, IPAM, UCLA, Jan 29 - Feb 2, 2007 9 Software Technology Lab @ SFU Abstract state machine An ASM is a virtual machine with abstract states, combining two fundamental abstraction principles: first-order structures + state transition systems. Vocabulary Initial states Program f(t1,t2,…,tn): t0 if C then R1 else R2 … do-in-parallel R1 Rk forall x in S R(x) choose x in S: (x) R(x) Uwe Glässer Crime Hot Spots: Behavioral, Computational and Mathematical Models, IPAM, UCLA, Jan 29 - Feb 2, 2007 10 Computation Software Technology Lab @ SFU 1 2 i 1 X0 X1 X2 … Xi Xi1 … Initial state (,Xi) Evolution of the state Uwe Glässer Crime Hot Spots: Behavioral, Computational and Mathematical Models, IPAM, UCLA, Jan 29 - Feb 2, 2007 11 Sequential ASM Software Technology Lab @ SFU Formalization of the notion of sequential algorithm Three postulates: Sequential time Abstract state Bounded exploration Syntax We assume informally that any algorithm A can be given by a finite text that explains the algorithm without presupposing any special knowledge. Uwe Glässer Crime Hot Spots: Behavioral, Computational and Mathematical Models, IPAM, UCLA, Jan 29 - Feb 2, 2007 12 Distributed ASM Software Technology Lab @ SFU Asynchronous computation model (Gurevich, 1995) Computational agents Globally shared states Concurrent moves Semantic model resolves potential conflicts according to the definition of partially ordered runs Uwe Glässer Crime Hot Spots: Behavioral, Computational and Mathematical Models, IPAM, UCLA, Jan 29 - Feb 2, 2007 13 Mastermind Software Technology Lab @ SFU Crime patterns in urban environments P. L. Brantingham, U. Glässer, B. Kinney, K. Singh and M. Vajihollah. A Computational Model for Simulating Spatial Aspects of Crime in Urban Environments. In Proc. IEEE International Conference on Systems, Man and Cybernetics, Oct. 2005 Uwe Glässer Crime Hot Spots: Behavioral, Computational and Mathematical Models, IPAM, UCLA, Jan 29 - Feb 2, 2007 14 Crime is not random Software Technology Lab @ SFU Criminal events relate to people’s movement in the course of everyday lifes Offenders commit offenses near places they spend most of their time Victims are victimized near places where they spend most of their time Patterns/ rules that govern the working of a social system one composed of criminals, victims and targets ─ interacting with one another Uwe Glässer Crime Hot Spots: Behavioral, Computational and Mathematical Models, IPAM, UCLA, Jan 29 - Feb 2, 2007 15 Modeling and simulation Software Technology Lab @ SFU Motivation Crime analysis and prevention Integration of established theories Reasoning about likely scenarios Scope Agents living in a virtual city Commuting between home, work and recreation Goals Coherent and consistent semantic framework Computational models for discrete event simulation Integration and validation of patterns/ theories Uwe Glässer Crime Hot Spots: Behavioral, Computational and Mathematical Models, IPAM, UCLA, Jan 29 - Feb 2, 2007 16 Software Technology Lab @ SFU Challenges and needs ``Computational thinking’’ Common semantic framework Abstract State Machines: common core for linking multi-disciplinary aspects Semantic foundation Discrete mathematics Computational logic Uwe Glässer System Dynamics Environment Planning Approach Multi-Agent Systems Criminology Experimental Validation ASM Navigation AI/ALife Knowledge Represent. Neural Nets Decision Making Learning Crime Hot Spots: Behavioral, Computational and Mathematical Models, IPAM, UCLA, Jan 29 - Feb 2, 2007 17 Mental Maps Software Technology Lab @ SFU “Every inhabitant of Amsterdam has an invisible map of the city in his head. The way he moves about the city and the choices made in this process are determined by this mental map. Amsterdam Real Time attempts to visualize these mental maps through examining the mobile behavior of the city's users.” Amsterdam Real Time Mental maps Uwe Glässer Crime Hot Spots: Behavioral, Computational and Mathematical Models, IPAM, UCLA, Jan 29 - Feb 2, 2007 18 Urban Environment(1) Objective Environment Software Technology Lab @ SFU Subjective Environment Subjective reality Agent’s perception Awareness Space Physical reality Part of perception Geographic Environment Objective Environment Perception Awareness Space Subjective Environment Activity Space Activity Space Uwe Glässer Subset of awareness space Frequently visited Crime Hot Spots: Behavioral, Computational and Mathematical Models, IPAM, UCLA, Jan 29 - Feb 2, 2007 19 Urban Environment(2) Software Technology Lab @ SFU Abstract mathematical data structure Attributed Directed Graph 49 21’ 06” 123 15’ 04” Max Speed 30 mi/h Construction Zone Uwe Glässer Traffic density Crime Hot Spots: Behavioral, Computational and Mathematical Models, IPAM, UCLA, Jan 29 - Feb 2, 2007 20 Urban Environment(3) Software Technology Lab @ SFU Directed graph H (V,E) topological aspects Attributed directed graph GGeoEnv (H,) attribution scheme (objective view) Attributed directed graph with colored attributes GEnv (GGeoEnv ,) subjective view (perception) Awareness space, activity space, crime occurrence space {e E density(a,e) thresholdactivity}a Goals: robustness, scalability, uniformity Uwe Glässer Crime Hot Spots: Behavioral, Computational and Mathematical Models, IPAM, UCLA, Jan 29 - Feb 2, 2007 21 Agent Architecture: BDI-based Model Communication FROM Environment Desires Space Evolution Module Profile Target Selection Module Cognition Rules Agent Decision Module Cognition Rules Intentions Intentions Deliberation Working Memory Motivations Intentions Working Memory Perception Action Rules Means-End Reasoning Awareness Space Environment Software Technology Lab @ SFU Beliefs Action Rules Activity Space Communication TO Environment Uwe Glässer Crime Hot Spots: Behavioral, Computational and Mathematical Models, IPAM, UCLA, Jan 29 - Feb 2, 2007 22 Software Technology Lab @ SFU Distributed ASM model Computational agents Path planning A Master Agent (PERSON agent) S e D B C SEM TSM ADM agent agent agent Space Evolution Module (SEM) Agents move within their environment Evolving spatial characteristics Uwe Glässer Awareness space Activity space Crime occurrence space Crime Hot Spots: Behavioral, Computational and Mathematical Models, IPAM, UCLA, Jan 29 - Feb 2, 2007 23 Software Technology Lab @ SFU Simulation: Activity Space Uwe Glässer Crime Hot Spots: Behavioral, Computational and Mathematical Models, IPAM, UCLA, Jan 29 - Feb 2, 2007 24 Software Technology Lab @ SFU Simulation: Activity Space Uwe Glässer Crime Hot Spots: Behavioral, Computational and Mathematical Models, IPAM, UCLA, Jan 29 - Feb 2, 2007 25 Software Technology Lab @ SFU Simulation: Activity Space Uwe Glässer Crime Hot Spots: Behavioral, Computational and Mathematical Models, IPAM, UCLA, Jan 29 - Feb 2, 2007 26 Fitness of the model Software Technology Lab @ SFU Checking the validity Role of modeling & simulation Descriptive rather than prescriptive Extracting behavior characteristics from response patterns Generating and testing hypothesis Identifying the system boundaries Understanding the effect of changes (causality) Providing evidence for the validity of a model has a different meaning than in prescriptive modeling Compositional validation? Uwe Glässer Crime Hot Spots: Behavioral, Computational and Mathematical Models, IPAM, UCLA, Jan 29 - Feb 2, 2007 27 Simulation Model: Architecture GIS Map Software Technology Lab @ SFU Text Files Graphical User Interface GIS2Graph Map (Graph) Agent Profiles Visualization Simulation Engine Uwe Glässer Crime Hot Spots: Behavioral, Computational and Mathematical Models, IPAM, UCLA, Jan 29 - Feb 2, 2007 28 Safeguard Software Technology Lab @ SFU Aviation security U. Glässer, S. Rastkar and M. Vajihollahi. Computational Modeling and Experimental Validation of Aviation Security Procedures. In Proc. IEEE International Conference on Intelligence and Security Informatics, volume 3975 of LNCS, pp. 420-431, Springer-Verlag, 2006. Idle secContrl Ensured Fals e Initialize-Screening InProgress secContrlPassed := True secContrlPassed := False Failed Done secContrlPassed := True Perform-Screening True Uwe Glässer Fals e Additional ScreenReq ? True Prepare-for-AdditionalScreening Fals e Screening Passed True Passed Crime Hot Spots: Behavioral, Computational and Mathematical Models, IPAM, UCLA, Jan 29 - Feb 2, 2007 29 Large area surveillance Software Technology Lab @ SFU Distributed information fusion and dynamic resources management for decision support Platforms Swarm CP140 MHP Shared informatio n CP140 MHP UAV UAV UAV Control Stations Uwe Glässer Crime Hot Spots: Behavioral, Computational and Mathematical Models, IPAM, UCLA, Jan 29 - Feb 2, 2007 30 Summary A novel approach to Computational Criminology Software Technology Lab @ SFU Modeling and simulation of crime patterns/ theories Well defined and robust semantic framework Tools for experimental research/ evidence based policy making Multi-agent system modeling ASM computation model Results Theoretical Abstract behavior model of person agents (agent architecture) Abstract data structure of the environment Practical Uwe Glässer Mastermind model as platform for experimental development of discrete event simulation models Crime Hot Spots: Behavioral, Computational and Mathematical Models, IPAM, UCLA, Jan 29 - Feb 2, 2007 31 Final remarks Abstract state machines provide Software Technology Lab @ SFU an intuitive formalization of the notion of algorithm in a fairly broad sense, a practical instrument for analyzing and reasoning about semantic properties of discrete dynamic systems, abstract specifications that are executable in principle, a corner stone in computer science education. Interdisciplinary research @ SFU ICURS: Computational Criminology (www.sfu.ca/icurs/) IRMACS (www.irmacs.ca) Uwe Glässer Crime Hot Spots: Behavioral, Computational and Mathematical Models, IPAM, UCLA, Jan 29 - Feb 2, 2007 32