Multiagent Simulation and the MASON Library

Total Page:16

File Type:pdf, Size:1020Kb

Multiagent Simulation and the MASON Library Multiagent Simulation And the MASON Library Sean Luke Department of Computer Science George Mason University Manual Version 20 August, 2019 Where to Obtain MASON http://cs.gmu.edu/∼eclab/projects/mason/ Copyright 2010–2019 by Sean Luke. Thanks to Claudio Cioffi Revilla and Carlotta Domeniconi. Get the latest version of this document or suggest improvements here: http://cs.gmu.edu/∼eclab/projects/mason/ This document is licensed under the Creative Commons Attribution-No Derivative Works 3.0 United States License, except for those portions of the work licensed differently as described in the next section. To view a copy of this license, visit http://creativecommons.org/licenses/by-nd/3.0/us/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. A quick license summary: • You are free to redistribute this document. • You may not modify, transform, translate, or build upon the document except for personal use. • You must maintain the author’s attribution with the document at all times. • You may not use the attribution to imply that the author endorses you or your document use. This summary is just informational: if there is any conflict in interpretation between the summary and the actual license, the actual license always takes precedence. This document is was produced in part through funding from grants 0916870, 1205626, and 1317813 from the National Science Foundation. 0 Contents 1 Introduction 7 1.1 Architectural Layout . .9 1.2 Unpacking MASON . 10 1.3 Running MASON . 11 1.4 Additional MASON Modules . 11 2 Tutorial: Student Schoolyard Cliques 13 2.1 Create an Empty Simulation . 13 2.2 Add Some Students . 15 2.3 Make the Students Do Something . 16 2.4 Add a GUI Control . 19 2.5 Add Visualization . 21 2.6 Add a Social Network . 25 2.7 Visualize the Social Network . 28 2.8 Inspect Student Agitation and Customize its Visualizaion . 30 2.9 Inspect the Model . 35 2.10 Select, Label, and Move Students . 39 2.11 Add an Anonymous Agent . 43 2.12 Checkpoint the Simulation . 47 2.13 Add a Description . 48 2.14 Go 3D . 51 3 Basic Utility Classes 57 3.1 Random Number Generation . 57 3.1.1 Distributions with COLT . 59 3.1.2 Distributions with Apache Commons Math . 61 3.2 Coordinate Wrapper Classes . 61 3.3 Collections . 69 3.4 Properties . 74 3.4.1 Java Bean Property Methods and Extensions . 74 3.4.2 MASON Extensions . 75 3.4.3 Object Properties . 77 3.4.4 Collection Properties . 80 3.4.5 Dynamic Properties . 80 3.5 Other Classes . 81 4 The Simulation Core 85 4.1 The Model . 85 4.2 The Big Loop . 87 4.2.1 Checkpointing . 89 1 4.2.1.1 Debugging Checkpointing . 90 4.2.2 The doLoop() Method . 90 4.2.3 Starting and Finishing . 92 4.3 Agents and the Schedule . 93 4.3.1 Scheduling . 93 4.3.2 Iterating and Stopping the Schedule . 97 4.3.3 Bookend Steppables . 98 4.3.4 Under the Hood . 99 4.3.5 Utility Agent Classes . 100 5 Grids 117 5.1 General Topics . 117 5.1.1 Extents . 119 5.1.2 Hexagonal and Triangular Grids . 120 5.1.3 Neighborhood Lookup . 121 5.1.4 Maps . 124 5.2 Array Grids . 125 5.2.1 Grids of Integers . 127 5.2.2 Grids of Doubles . 128 5.2.3 Grids of Objects . 129 5.2.4 Grids of Bags of Objects . 129 5.3 Sparse Fields and Sparse Grids . 132 5.3.1 Sparse Fields . 132 5.3.1.1 Tuning . 134 5.3.1.2 Under the Hood . 134 5.3.2 Sparse Grids . 135 5.3.2.1 Sparse Grids Versus Object Grids Versus Dense Grids . 136 6 Continuous Space 139 6.1 Extents . 141 6.2 Storing, Moving, Looking Up, and Removing Objects . 143 6.3 Discretization . 144 6.3.1 Objects with Area or Volume . 145 6.3.2 Discretization Methods . 145 6.4 Neighborhood Lookup . 146 6.5 Maps . 147 7 Networks 149 7.1 Edges . 150 7.2 Using a Network . 151 7.2.1 Adjacency Lists and Adjacency Matrices . 153 7.2.2 Maps . 153 8 Making a GUI 155 8.1 Encapsulation of the Model, Control, and Visualization . 156 8.1.1 Running a GUI-based Simulation . 158 8.1.2 Properly Scheduling non-Model (GUI) Events . 159 8.1.3 Calling GUI Elements From the Schedule/Mini-Schedule Thread (and Vice Versa) . 160 8.1.4 Handling Checkpoints . 163 8.2 Controllers . 164 8.2.1 The Controller’s Big Loop . 164 8.2.2 The Console . 165 2 8.2.2.1 Setting up and Shutting Down the GUI . ..
Recommended publications
  • KIMONO, a Descriptive Agent-Based Modelling Method for the Exploration of Complex Systems: an Application to Epidemiology
    KIMONO, a descriptive agent-based modelling method for the exploration of complex systems: an application to epidemiology. Edouard Amouroux To cite this version: Edouard Amouroux. KIMONO, a descriptive agent-based modelling method for the exploration of complex systems: an application to epidemiology.. Modeling and Simulation. Université Pierre et Marie Curie - Paris VI, 2011. English. tel-00630779 HAL Id: tel-00630779 https://tel.archives-ouvertes.fr/tel-00630779 Submitted on 5 Dec 2011 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. THESE DE DOCTORAT DE L’UNIVERSITE PIERRE ET MARIE CURIE Spécialité: Informatique (Ecole doctorale: EDITE) Présentée par Edouard AMOUROUX Pour obtenir le grade de DOCTEUR de l’UNIVERSITÉ PIERRE ET MARIE CURIE Sujet de la thèse : KIMONO: une méthode de modélisation descriptive centrée agent pour l'explication des systèmes complexes, une application en épidémiologie soutenue le 30/09/2011 devant le jury composé de : M. Directeur de thèse: Alexis Drogoul, Directeur de Recherche, IRD - UMMISCO / IFI - MSI Rapporteurs: David
    [Show full text]
  • Metadefender Core V4.17.3
    MetaDefender Core v4.17.3 © 2020 OPSWAT, Inc. All rights reserved. OPSWAT®, MetadefenderTM and the OPSWAT logo are trademarks of OPSWAT, Inc. All other trademarks, trade names, service marks, service names, and images mentioned and/or used herein belong to their respective owners. Table of Contents About This Guide 13 Key Features of MetaDefender Core 14 1. Quick Start with MetaDefender Core 15 1.1. Installation 15 Operating system invariant initial steps 15 Basic setup 16 1.1.1. Configuration wizard 16 1.2. License Activation 21 1.3. Process Files with MetaDefender Core 21 2. Installing or Upgrading MetaDefender Core 22 2.1. Recommended System Configuration 22 Microsoft Windows Deployments 22 Unix Based Deployments 24 Data Retention 26 Custom Engines 27 Browser Requirements for the Metadefender Core Management Console 27 2.2. Installing MetaDefender 27 Installation 27 Installation notes 27 2.2.1. Installing Metadefender Core using command line 28 2.2.2. Installing Metadefender Core using the Install Wizard 31 2.3. Upgrading MetaDefender Core 31 Upgrading from MetaDefender Core 3.x 31 Upgrading from MetaDefender Core 4.x 31 2.4. MetaDefender Core Licensing 32 2.4.1. Activating Metadefender Licenses 32 2.4.2. Checking Your Metadefender Core License 37 2.5. Performance and Load Estimation 38 What to know before reading the results: Some factors that affect performance 38 How test results are calculated 39 Test Reports 39 Performance Report - Multi-Scanning On Linux 39 Performance Report - Multi-Scanning On Windows 43 2.6. Special installation options 46 Use RAMDISK for the tempdirectory 46 3.
    [Show full text]
  • Logo Tree Project
    LOGO TREE PROJECT Written by P. Boytchev e-mail: pavel2008-AT-elica-DOT-net Rev 1.82 July, 2011 We’d like to thank all the people all over the globe and all over the alphabet who helped us build the Logo Tree: A .........Daniel Ajoy, Eduardo de Antueno, Hal Abelson B .........Andrew Begel, Carl Bogardus, Dominique Bille, George Birbilis, Ian Bicking, Imre Bornemisza, Joshua Bell, Luis Belmonte, Vladimir Batagelj, Wayne Burnett C .........Charlie, David Costanzo, John St. Clair, Loïc Le Coq, Oliver Schmidt-Chevalier, Paul Cockshott D .........Andy Dent, Kent Paul Dolan, Marcelo Duschkin, Mike Doyle E..........G. A. Edgar, Mustafa Elsheikh, Randall Embry F..........Damien Ferey, G .........Bill Glass, Jim Goebel, H .........Brian Harvey, Jamie Hunter, Jim Howe, Markus Hunke, Rachel Hestilow I........... J..........Ken Johnson K .........Eric Klopfer, Leigh Klotz, Susumu Kanemune L..........Janny Looyenga, Jean-François Lucas, Lionel Laské, Timothy Lipetz M.........Andreas Micheler, Bakhtiar Mikhak, George Mills, Greg Michaelson, Lorenzo Masetti, Michael Malien, Sébastien Magdelyns, Silvano Malfatti N .........Chaker Nakhli ,Dani Novak, Takeshi Nishiki O ......... P..........Paliokas Ioannis, U. B. Pavanaja, Wendy Petti Q ......... R .........Clem Rutter, Emmanuel Roche S..........Bojidar Sendov, Brian Silverman, Cynthia Solomon, Daniel Sanderson, Gene Sullivan, T..........Austin Tate, Gary Teachout, Graham Toal, Marcin Truszel, Peter Tomcsanyi, Seth Tisue, Gene Thail U .........Peter Ulrich V .........Carlo Maria Vireca, Álvaro Valdes W.........Arnie Widdowson, Uri Wilensky X ......... Y .........Andy Yeh, Ben Yates Z.......... Introduction The main goal of the Logo Tree project is to build a genealogical tree of new and old Logo implementations. This tree is expected to clearly demonstrate the evolution, the diversity and the vitality of Logo as a programming language.
    [Show full text]
  • Starlogo TNG: the Convergence of Graphical Programming and Text Processing by Corey Mccaffrey
    StarLogo TNG: The Convergence of Graphical Programming and Text Processing by Corey McCaffrey Submitted to the Department of Electrical Engineering and Computer Science in Partial Fulfillment of the Requirements for the Degrees of Bachelor of Science in Computer Science and Engineering and Master of Engineering in Electrical Engineering and Computer Science at the Massachusetts Institute of Technology May 26, 2006 Copyright 2006 Corey McCaffrey. All rights reserved. The author hereby grants to M.I.T. permission to reproduce and distribute publicly paper and electronic copies of this thesis and to grant others the right to do so. Author__________________________________________________________________ Department of Electrical Engineering and Computer Science May 26, 2006 Certified by______________________________________________________________ Eric Klopfer Thesis Supervisor Accepted by_____________________________________________________________ Arthur C. Smith Chairman, Department Committee on Graduate Theses 2 StarLogo TNG: The Convergence of Graphical Programming and Text Processing by Corey McCaffrey Submitted to the Department of Electrical Engineering and Computer Science May 26, 2006 In Partial Fulfillment of the Requirements for the Degrees of Bachelor of Science in Computer Science and Engineering and Master of Engineering in Electrical Engineering and Computer Science ABSTRACT StarLogo TNG is a robust graphical programming environment for secondary students. Despite the educational advantages of graphical programming, TNG has sustained criticism from some who object to the exclusion of a textual language. Recognizing the benefits of text processing and the power of controlling software with a keyboard, I sought to incorporate text-processing techniques into TNG’s graphical language. The key component of this work is an innovation dubbed “Typeblocking,” by which users construct block code through the use of a keyboard.
    [Show full text]
  • Comparative Programming Languages CM20253
    We have briefly covered many aspects of language design And there are many more factors we could talk about in making choices of language The End There are many languages out there, both general purpose and specialist And there are many more factors we could talk about in making choices of language The End There are many languages out there, both general purpose and specialist We have briefly covered many aspects of language design The End There are many languages out there, both general purpose and specialist We have briefly covered many aspects of language design And there are many more factors we could talk about in making choices of language Often a single project can use several languages, each suited to its part of the project And then the interopability of languages becomes important For example, can you easily join together code written in Java and C? The End Or languages And then the interopability of languages becomes important For example, can you easily join together code written in Java and C? The End Or languages Often a single project can use several languages, each suited to its part of the project For example, can you easily join together code written in Java and C? The End Or languages Often a single project can use several languages, each suited to its part of the project And then the interopability of languages becomes important The End Or languages Often a single project can use several languages, each suited to its part of the project And then the interopability of languages becomes important For example, can you easily
    [Show full text]
  • Survey of Agent Based Modelling and Simulation Tools
    Technical Report DL-TR-2010-007 Survey of Agent Based Modelling and Simulation Tools RJ Allan October 2010 ©2010 Science and Technology Facilities Council Enquiries about copyright, reproduction and requests for additional copies of this report should be addressed to: Chadwick Library Science and Technology Facilities Council Daresbury Laboratory Daresbury Science and Innovation Campus Warrington WA4 4AD Tel: +44(0)1925 603397 Fax: +44(0)1925 603779 email: [email protected] Science and Technology Facilities Council reports are available online at: http://epubs. .ac.uk/ stfc ISSN 1362-0207 Neither the Council nor the Laboratory accept any responsibility for loss or damage arising from the use of information contained in any of their reports or in any communication about their tests or investigations. Survey of Agent Based Modelling and Simulation Tools Rob Allan Computational Science and Engineering Department, STFC Daresbury Laboratory, Daresbury, Warrington WA4 4AD Contact e-Mail: [email protected] October 7, 2010 Abstract Agent Based Modelling and Simulation is a computationally demanding technique having its origins in discrete event simulation, genetic algorithms and cellular automata. It is a powerful technique for simulating dynamic complex systems and observing \emergent" behaviour. There is currently a lot of interest in developing ABMs as a general computational technique applicable to the study of large scale systems. ABMs has been adapted to run on novel architectures such as GPGPU, e.g. nVidia hardware using the CUDA programming language. Argonne National Laboratory have a Web site on Exascale ABMs and have run models on the IBM BlueGene with funding from the SciDAC Programme.
    [Show full text]
  • Netlogo: Design and Implementation of a Multi-Agent Modeling Environment
    NetLogo: Design and Implementation of a Multi-Agent Modeling Environment Seth Tisue Uri Wilensky [email protected] [email protected] Center for Connected Learning and Computer-Based Modeling Northwestern University, Evanston, Illinois Presented at SwarmFest, Ann Arbor, May 9–11, 2004 1 Introduction [Resnick & Wilensky, 1993, Resnick, 1994] was on a supercomputer, it had always been primarily in- In this paper we examine design and implemen- tended for use in schools.1 But StarLogoT became tation choices we made when creating NetLogo very popular among researchers. So with NetLogo, [Wilensky, 1999], a multi-agent programming lan- we now aim more explicitly to satisfy the needs of guage and modeling environment for simulating com- both audiences. plex phenomena [Wilensky, 2001]. Although NetL- All the multi-agent Logos have adopted design ogo is used across a wide range of education levels principles from the Logo language [Papert, 1980]. A from grade school up, we focus here on NetLogo as a central principle is “low threshold, no ceiling.” Low tool for research and for teaching at the undergradu- threshold means new users, including those who never ate level and higher. programmed before, should find it easy to get started. Our earlier paper on NetLogo as a research No ceiling means the language shouldn’t be limiting tool [Tisue & Wilensky, 2004] is recommended back- for advanced users. We wanted NetLogo to be just as ground reading, especially if you are not already fa- popular with researchers as StarLogoT had been, so miliar with NetLogo. It includes a history of Net- that meant devoting significant attention to the “no Logo’s origins, a tour of the NetLogo interface, an ceiling” side of the principle.
    [Show full text]
  • Agent Monitoring and Mouse Interactivity in Starlogo Nova
    Agent Monitoring and Mouse Interactivity in StarLogo Nova by Abigail Choe S.B., C.S. M.I.T., 2017 Submitted to the Department of Electrical Engineering and Computer Science in Partial Fulfillment of the Requirements for the Degree of Master of Engineering in Electrical Engineering and Computer Science at the Massachusetts Institute of Technology February 2019 © 2018 Massachusetts Institute of Technology. All rights reserved Author: _________________________________________________________________ Department of Electrical Engineering and Computer Science December 13, 2018 Certified by: _____________________________________________________________ Eric Klopfer Professor and Director of the MIT Scheller Teacher Education Program Thesis Supervisor Accepted by: ____________________________________________________________ Katrina LaCurts Chairman, Masters of Engineering Thesis Committee Agent Monitoring and Mouse Interactivity in StarLogo Nova by Abigail Choe S.B., C.S. M.I.T., 2017 Submitted to the Department of Electrical Engineering and Computer Science in Partial Fulfillment of the Requirements for the Degree of Master of Engineering in Electrical Engineering and Computer Science ABSTRACT StarLogo Nova is a powerful programming environment that allows anyone to easily create a 3D simulation and 3D game using block-based programming language. Due to its intuitive interface and ability to model complex systems, StarLogo is mainly used in primary and secondary school class settings. While StarLogo Nova effectively visualizes a wide range of simulations from biology to economy, the current implementation has two areas for improvement that will help cover more use cases. First, StarLogo Nova currently offers statistics only at the level of agent types. Users can track, for example, changes in population of a given agent type, but cannot track property changes of an individual agent.
    [Show full text]
  • Moving Beyond Syntax: Lessons from 20 Years of Blocks Programing in Agentsheets
    Moving Beyond Syntax: Lessons from 20 Years of Blocks Programing in AgentSheets Alexander Repenning University of Colorado Boulder, Colorado 80309 [email protected] School of Education University of Applied Sciences and Arts Northwestern Switzerland (PH FHNW) Brugg-Windisch, Switzerland [email protected] Abstract The blocks programming community has been preoccupied the “compute prime numbers” using C++ and Emacs activity with identifying syntactic obstacles that keep novices from learning which, by the vast majority of kids, is considered to be hard to program. Unfortunately, this focus is now holding back research and boring. In the upper right corner is the elusive holy grail of from systematically investigating various technological affordances Computer Science education providing activities that are easy, that can make programming more accessible. Employing approaches or at least accessible, and exciting. This journey started in the from program analysis, program visualization, and real-time lower left corner and is gradually moving towards the upper interfaces can push blocks programming beyond syntax towards the support of semantics and even pragmatics. Syntactic support could right corner. The path of this journey is not straight. It includes be compared to checking spelling and grammar in word processing. setbacks and detours. Also, while progress has been made, the Spell checking is relatively simple to implement and immediately journey is far from over. useful, but provides essentially no support to create meaningful text. Over the last 25 years, I have worked to empower students to create their own games, simulations, and robots. In this time I have explored, combined, and evaluated a number of programming paradigms.
    [Show full text]
  • Metadefender Core V4.14.2
    MetaDefender Core v4.14.2 © 2018 OPSWAT, Inc. All rights reserved. OPSWAT®, MetadefenderTM and the OPSWAT logo are trademarks of OPSWAT, Inc. All other trademarks, trade names, service marks, service names, and images mentioned and/or used herein belong to their respective owners. Table of Contents About This Guide 11 Key Features of Metadefender Core 12 1. Quick Start with MetaDefender Core 13 1.1. Installation 13 Operating system invariant initial steps 13 Basic setup 14 1.1.1. Configuration wizard 14 1.2. License Activation 19 1.3. Process Files with MetaDefender Core 19 2. Installing or Upgrading Metadefender Core 20 2.1. Recommended System Requirements 20 System Requirements For Server 20 Browser Requirements for the Metadefender Core Management Console 22 2.2. Installing Metadefender 22 Installation 22 Installation notes 23 2.2.1. Installing Metadefender Core using command line 23 2.2.2. Installing Metadefender Core using the Install Wizard 25 2.3. Upgrading MetaDefender Core 25 Upgrading from MetaDefender Core 3.x 25 Upgrading from MetaDefender Core 4.x 26 2.4. Metadefender Core Licensing 26 2.4.1. Activating Metadefender Licenses 26 2.4.2. Checking Your Metadefender Core License 33 2.5. Performance and Load Estimation 34 What to know before reading the results: Some factors that affect performance 34 How test results are calculated 35 Test Reports 35 Performance Report - Multi-Scanning On Linux 35 Performance Report - Multi-Scanning On Windows 39 2.6. Special installation options 42 Use RAMDISK for the tempdirectory 42 3. Configuring MetaDefender Core 46 3.1. Management Console 46 3.2.
    [Show full text]
  • Performance Engineering of the Starlogo Nova
    Performance Engineering of the StarLogo Nova Execution Engine by Jin Pan Submitted to the Department of Electrical Engineering and Computer Science in partial fulfillment of the requirements for the degree of Master of Engineering in Computer Science and Engineering at the MASSACHUSETTS INSTITUTE OF TECHNOLOGY September 2016 ○c Massachusetts Institute of Technology 2016. All rights reserved. Author................................................................ Department of Electrical Engineering and Computer Science August 16, 2016 Certified by. Eric Klopfer Director of MIT Scheller Teacher Education Program Thesis Supervisor Accepted by . Christopher J. Terman Chairman, Masters of Engineering Thesis Committee 2 Performance Engineering of the StarLogo Nova Execution Engine by Jin Pan Submitted to the Department of Electrical Engineering and Computer Science on August 16, 2016, in partial fulfillment of the requirements for the degree of Master of Engineering in Computer Science and Engineering Abstract StarLogo Nova is an online blocks-based programming environment designed for pre- college students to explore the collective behavior of decentralized agents. Users can drag and drop blocks to construct graphical scripts that control how individual agents respond to stimuli. These scripts are run by the Execution Engine and rendered in real-time. By investigating hypotheses about how small tweaks to individual behav- ior impact the entire system, students learn to think beyond the centralized mindset where all actions are dictated by a singular leader. This thesis migrates the Execution Engine from the aging Adobe ActionScript 3 language to TypeScript, a weakly typed language that transpiles to JavaScript. To promote code health, this thesis introduces code formatters, linters, test cases, and a build process.
    [Show full text]
  • Blocks Languages for Creating Tangible Artifacts
    Blocks Languages for Creating Tangible Artifacts Franklyn Turbak, Smaranda Sandu, Olivia Kotsopoulos, Emily Erdman, Erin Davis, and Karishma Chadha Computer Science Department, Wellesley College Wellesley, Massachusetts, USA Email:ffranklyn.turbak, smaranda.sandu, olivia.kotsopoulos, emily.erdman, erin.davis, [email protected] Abstract—Logo turtles and Henderson’s picture language have for fabrication, many of which involve sketching or gesturing long been used to teach computational thinking by inspiring (e.g., [3], [4]). But we also wanted the environments to learners to construct programs that create complex geometric introduce nonprogrammers to computational thinking [5] and designs. We have developed visual blocks-based versions of these languages, TurtleBlocks and PictureBlocks, that allow users to give them hands-on experience with techniques like procedural transform their designs into tangible artifacts produced by laser abstraction, modularity, and divide/conquer/glue problem solv- cutters and vinyl cutters. Our languages embody two novel ing. We were inspired by the Eisenbergs’ Craft Technology features. First, they use constructive area geometry to convert Group at the University of Colorado, Boulder, which focuses the geometric designs generated by our programs into formats on computer science activities that involve creating personally suitable for laser and vinyl cutters. Second, they leverage static typing and polymorphism to provide a new way to reference the meaningful physical artifacts, including those fabricated on names of procedure parameters and local variables in a blocks rapid prototyping machines ([6], [7]). Another exemplar of language. this spirit is Johnson’s FlatLang, a Logo-like language for specifying laser-cut construction kit parts [8]. I. INTRODUCTION We adapted two existing environments for creating geomet- Rapid prototyping machines such as vinyl cutters, laser ric designs.
    [Show full text]