Code Documentation MFA (Movable Finite Automata) Eric Klemchak CS391/CS392

Similar documents
Lab 6: Energizer Turtles

5 State of the Turtles

Lab 7: Experimenting with Life and Death

Writing Simple Procedures Drawing a Pentagon Copying a Procedure Commanding PenUp and PenDown Drawing a Broken Line...

GEOG 490/590 SPATIAL MODELING SPRING 2015 ASSIGNMENT 3: PATTERN-ORIENTED MODELING WITH AGENTS

Reference Guide Playful Invention Company

CS108L Computer Science for All Module 7: Algorithms

The City School. Learn Create Program

6.14(a) - How to Run CAT Reports Record Errors Report

Lab 10: Color Sort Turtles not yet sorted by color

1 Turtle Graphics Concepts

Scratch Lesson Plan. Part One: Structure. Part Two: Movement

User Manual. Senior Project Mission Control. Product Owner Charisse Shandro Mission Meow Cat Rescue and Adoptions, Inc.

~~~***~~~ A Book For Young Programmers On Scratch. ~~~***~~~

Getting Started! Searching for dog of a specific breed:

KB Record Errors Report

b. vulnerablebreeds.csv Statistics on vulnerable breeds for the years 2003 through 2015 [1].

Virtual Dog Program in Scratch. By Phil code-it.co.uk

Good Health Records Setup Guide for DHI Plus Health Event Users

W360 Multifunction Tabber System Operator Guide

Manual Compustam-Cloud

November Final Report. Communications Comparison. With Florida Climate Institute. Written by Nicole Lytwyn PIE2012/13-04B

A Guide to the TurtleGraphics Package for R

Sketch Out the Design

Half-Lives of Antibiotics

Lecture 1: Turtle Graphics. the turtle and the crane and the swallow observe the time of their coming; Jeremiah 8:7

Dr Karim Ben Jebara Head of Department, Copyright Animal ( OIE 2013) Health Information Department, OIE

SARG Guide Surrey Amphibian and Reptile Group. SARG Reptile Surveyor s Guide Using SARGWEB. April 2012 Version 1.0. Steve Langham

Effective Vaccine Management (EVM) Global Data Analysis

Required and Recommended Supporting Information for IUCN Red List Assessments

OIE Regional Commission for Europe Regional Work Plan Framework Version adopted during the 85 th OIE General Session (Paris, May 2017)

$2.85 $4.10 $1.00 $25.00 $2.25 $2.25 4X4 CUSTOM QUOTE: $55.00 PLUS $1.00 PER LINE 8X10 CUSTOM QUOTE: $75.00 PLUS $1.00 PER LINE

Bluefang. All-In-One Smart Phone Controlled Super Collar. Instruction Manual. US and International Patents Pending

RUBBER NINJAS MODDING TUTORIAL

Dasher Web Service USER/DEVELOPER DOCUMENTATION June 2010 Version 1.1

Table of Contents. Page 2 ebook created with Orion PDF Author orion.aidaluu.com. What is Orion Label Maker?

PNCC Dogs Online. Customer Transactions Manual

Lab 5: Bumper Turtles

Human Impact on Sea Turtle Nesting Patterns

PNCC Dogs Online. Customer Transactions Manual

APA APPROVED PROVIDER Ceridian Dayforce HCM Last Updated: 01/15/2016

OIE mission in the framework of One Health Focus on antimicrobial resistance (AMR)

Campaign Communication Materials 18 November 2008

Quick Setup Guide Model 5134G

Mendelian Genetics Using Drosophila melanogaster Biology 12, Investigation 1

Elite Outdoor Bark Control

SEDAR31-DW30: Shrimp Fishery Bycatch Estimates for Gulf of Mexico Red Snapper, Brian Linton SEDAR-PW6-RD17. 1 May 2014

How to Guide Pet Waste Station Community Program

Online WHIPPET User Guide September 2014

Congratulations! Thank you for purchasing a ScoopFree. The Only Self-Cleaning Litter Box You Can Leave Alone For Weeks At A Time

Econometric Analysis Dr. Sobel

INFO 1103 Homework Project 2

In this project you will use loops to create a racing turtle game and draw a race track.

Smart Automatic Cat Feeding Machine (SACFM) (sack-ff-mm)

AquaReef 200. Instruction Manual

LITTER ROBOT LITTER ROBOT. Litter-Robot Manual. The Self-Cleaning Litter Box that Really Works. Automated Pet Care Products, Inc.

Global action plan to combat antimicrobial resistance (AMR)

Effective Vaccine Management (EVM) Global Data Analysis

Upgrade KIT IV Operation Manual

Texas Education Agency. Deployment Readiness Checklist: ESC TSDS PEIMS Champion

Controllability of Complex Networks. Yang-Yu Liu, Jean-Jacques Slotine, Albert-Laszlo Barbasi Presented By Arindam Bhattacharya

Congratulations on the completion of your project that was supported by The Rufford Small Grants Foundation.

AMOXICILLIN AND CLAVULANIC ACID TABLETS Draft proposal for The International Pharmacopoeia (February 2018)

Release note Chesar 3 (and migration tool)

HerdMASTER 4 Tip Sheet CREATING ANIMALS AND SIRES

Using Physics for Motion Retargeting

StarLogo Complete Command List (Edited and reformatted by Nicholas Gessler, 6 June 2001.)

Texel Sheep Society. Basco Interface Guide. Contents

Litter-Robot II Manual For Standard and Bubble Units

DIGITUS Network Cabinet Unique Series, 600, 800 mm width - 600, 800, 1000, 1200 mm depth

Supporting document Antibiotics monitoring Short database instructions for veterinarians

Call of the Wild. Investigating Predator/Prey Relationships

Little Love Puppy Pal

Package TurtleGraphics

Lab 7. Evolution Lab. Name: General Introduction:

The ALife Zoo: cross-browser, platform-agnostic hosting of Artificial Life simulations

Activity Sheet Chapter 6, Lesson 11 Chemical Reactions & Engineering Design

Chapter VII Non-linear SSI analysis of Structure-Isolated footings -soil system

Biol 160: Lab 7. Modeling Evolution

Kibble. Team and Roles. Problem and Solution Overview. Contextual Inquiry Target, Stakeholders, and Participants

Using social media research methods to identify hidden churches

Managing AMR at the Human-Animal Interface. OIE Contributions to the AMR Global Action Plan

Python 3 Turtle graphics. Lecture 24 COMPSCI111/111G SS 2017

COYOTES and FOXES. Final Report. - Chantilly Fulgham, - Gracie Sanchez,

Turtle Ballet: Simulating Parallel Turtles in a Nonparallel LOGO Version. Erich Neuwirth

Standard operating procedure

Western Painted Turtle Monitoring and Habitat Restoration at Buttertubs Marsh, Nanaimo, BC

Microsoft Dexterity. Comprehensive Index Release 12

Before and After: The Chicken and the Egg

Introducing and using InterHerd on the farm

Pixie-7P. Battery Connector Pixie-7P Fuse* Motor. 2.2 Attaching the Motor Leads. 1.0 Features of the Pixie-7P: Pixie-7P Batt Motor

A SPATIAL ANALYSIS OF SEA TURTLE AND HUMAN INTERACTION IN KAHALU U BAY, HI. By Nathan D. Stewart

Biology 164 Laboratory

Driving Questions: How much seagrass does a green sea turtle eat in a year? In its lifetime?

Effective Vaccine Management Initiative

Pet Selective Automated Food Dispenser

Hello Scratch! by Gabriel Ford, Sadie Ford, and Melissa Ford. Sample Chapter 3. Copyright 2018 Manning Publications

A Peek Into the World of Streaming

INSTALLATION INSTRUCTIONS

Activity 1: Changes in beak size populations in low precipitation

Transcription:

Code Documentation MFA (Movable Finite Automata) Eric Klemchak CS391/CS392

1 Contents 1.Overview... 2 1.1Introduction... 2 1.2MajorFunctions... 2 2.Dataflow... 2 3Controlflow... 3 4.Logical/PhysicalDataDesignDescription... 3 4.1TurtleVariables... 3 4.2GlobalVariables... 4 5.InterfacetotheOutsideWorld... 4 6.SystemCreation... 5

2 1. Overview 1.1 Introduction The purpose of this project is to rebuild a modeling program created by a graduate student of Narendra Goel. The original program was written in Turbo C++ and ran in a DOS environment. Dr. Goel used the program in his research to simulate the self-assembly of bacteriophages. Dr. Pryor wants a version of the program that will run in Net Logo so he could use it for classroom demonstrations. 1.2 Major Functions The program has four major functions. Move Groups This function moves each group one unit in a random direction (up, down, left, or right). If a translation will cause two groups to overlap, the translation is skipped and the next group will attempt to move. Rotate Groups This function attempts to rotate each group 90 degrees clockwise or counterclockwise. If a rotation will cause two groups to overlap, the rotation is skipped and the next group will attempt to rotate. Check for Bonds Each turtle will check if there is another turtle in an adjacent square (top, bottom, left, or right). If there is a neighboring turtle, the two turtles will check their corresponding rules to see if they will bond with each other. If the rules are satisfied, the adjacent turtle s group number will be set equal to the original turtle s group number. Get Input This function parses the MFA file that the user made. It checks to make sure that all five sections are present: Type, Color, Border, Qty, and Bond function and that they are correctly formatted. If there is a syntax error, the function will display an error message to the user. 2. Data flow The data flow diagram will be added to the final draft.

3 3 Control flow 4. Logical/Physical Data Design Description Net Logo has four types of agents: turtles, patches, links, and the observer. Each type of agent can own variables. For example, all turtles can have a hunger variable. When the simulation runs, each turtle updates its own copy of the hunger variable. The programmer can also make global variables which only have one copy. 4.1 Turtle Variables Heading Orientation of the turtle. North = 0 degrees, East = 90 degrees, South = 180 degrees, and West = 270 degrees. Color Color of the turtle. The turtles are colored according to the Net Logo color scheme. Size Size of the turtle relative to the patches. By default, the turtles are set to size 1 which is the same size as a single patch.

4 GroupNum Which group the turtles belong to. If two turtles have the same groupnum, they will rotate and move as one unit. When a bond is formed, the groupnum of the second turtle is set to the groupnum of the first turtle. bufferx, buffery, bufferheading Before a turtle rotates or moves, it uses the buffer to check if will overlap with another turtle. For example, suppose a turtle is at patch (3,4). If the turtle wants to move up, it will set its buffer to (3,5). If patch (3,5) is empty, the turtle s coordinates (and heading) as set to the buffer s coordinates. If patch (3,5) is not empty, the buffer is discarded and the turtle will remain at its original position. 4.2 Global Variables GroupList A list of groups in the current simulation. The list is actively updated as groups bonds with each other. For example, if the simulation starts with 5 turtles, grouplist is initialized with [1, 2, 3, 4, 5]. If group 2 bonds with group 4, group 2 is removed from the list: [1, 3, 4, 5]. 5. Interface to the Outside World

5 The program has three main buttons: Setup, Run Simulation, and Clear. The user can also adjust the speed at which the simulation runs by using the speed slider on the top. The program will accept a plain text file (extension.txt) as input. The text file is divided into five sections: Type, Color, Border, Qty, and Bond function. Please see user documentation for examples and a more detailed description of each field. 6. System Creation The program will be distributed as a zip file containing several items: MFA.nlogo This is the main program file. User Documentation.txt This file discusses how to use MFA.nlogo. It discusses how the program works, how to create an MFA file, and possible applications in chemistry and biology. Premade MFA Files Five.txt, T.txt, and Cross.txt. The program will come with several premade files to be used as templates and to demonstrate how the simulation works.