© Egon Börger: Daemon Game 1 Daemon Game (Turner 1993) Problem Description Design a system for the following multi-player game: –A Daemon generates Bump.

Slides:



Advertisements
Similar presentations
Eugene Syriani and Huseyin Ergin University of Alabama Software Modeling Lab Software Engineering Group Department of Computer Science College of Engineering.
Advertisements

1 Reinforcement Learning (RL). 2 Introduction The concept of reinforcement learning incorporates an agent that solves the problem in hand by interacting.
© Egon Börger: Linked List 1 Double Linked Lists : Desired Operations Define an ASM which offers the following operations, predicates and functions on.
Ver 2.0. Producing questions with QFT 1.Ask as many questions as you can. 2. Do not stop to discuss, judge, or answer any questions. 3.Write down every.
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 6 Instructor: Haifeng YU.
PROTOCOL VERIFICATION & PROTOCOL VALIDATION. Protocol Verification Communication Protocols should be checked for correctness, robustness and performance,
1 Cell Probe Complexity - An Invitation Peter Bro Miltersen University of Aarhus.
For the ultimate in entertainment, play with 2 or more people, individually or as a team Players alternate turns Each player picks an “answer” and must.
Polar Bears: A n ice Game CMSC104 Spring 2010 Project 3
Copyright © Cengage Learning. All rights reserved.
SEARCHING, SORTING, TOPOLOGICAL SORTS Most real world computer applications deal with vast amounts of data. Searching for a particular data item can take.
Asynchronous ASMs Network Leader Election Egon Börger Dipartimento di Informatica, Universita di Pisa
Abstract State Machines Method for High-Level System Design and Analysis A Software EngineeringTechnique Egon Börger (Slightly adapted by Fabio Martinelli.
1 Introduction to Computability Theory Lecture15: Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
Process Description and Control
© Egon Börger: Lift 1 Lift Control (N.Davis, 1984) The Problem Design the logic to move n lifts bw m floors, and prove it to be well functioning, where.
Asynchronous ASMs Ring Load Balance Egon Börger Dipartimento di Informatica, Universita di Pisa
Asynchronous ASMs Master/Slave Agreement Egon Börger Dipartimento di Informatica, Universita di Pisa
CS 290C: Formal Models for Web Software Lecture 10: Language Based Modeling and Analysis of Navigation Errors Instructor: Tevfik Bultan.
Systems of Distributed Systems Module 2 -Distributed algorithms Teaching unit 3 – Advanced algorithms Ernesto Damiani University of Bozen Lesson 6 – Two.
5.6 Semaphores Semaphores –Software construct that can be used to enforce mutual exclusion –Contains a protected variable Can be accessed only via wait.
Some Thoughts on Game Design by Andrew Glassner Game Design Arcade Puzzle Strategy Story.
© Egon Börger: Backtracking ASM 1 Backtracking Machine (for Tree Computations) If mode = ramify then Let k = |alternatives (Params)| Let o 1,..., o k =new.
Probability And Expected Value ————————————
1 Hash-Based Indexes Chapter Introduction  Hash-based indexes are best for equality selections. Cannot support range searches.  Static and dynamic.
Asynchronous ASMs Phase Synchronization on Undirected Trees Egon Börger Dipartimento di Informatica, Universita di Pisa
Abstract State Machines Method for High-Level System Design and Analysis A Software EngineeringTechnique Egon Börger Dipartimento di Informatica, Universita.
1 More on Distributed Coordination. 2 Who’s in charge? Let’s have an Election. Many algorithms require a coordinator. What happens when the coordinator.
Copyright © Cengage Learning. All rights reserved. CHAPTER 9 COUNTING AND PROBABILITY.
20 Questions Assignment Intro James Wei Professor Peck March 19, 2014 Slides by James Wei.
Security and Integrity
© Egon Börger: Clock and Stopwatch ASM 1 Illustrating the ASM Function Classification A real-time CLOCK: –Monitored: CurrTime: Real (supposed to be increasing.
Introduction to TouchDevelop
Executable UML The Models are the Code - Executable UML Lecture 9 - Communication and Relationship Dynamics Paul Krause.
MOM! Phineas and Ferb are … Aims:
By Lecturer / Aisha Dawood 1.  You can control the number of dispatcher processes in the instance. Unlike the number of shared servers, the number of.
Objective: Students will add integers using models and rules (11-3).
Asynchronous Multi-Agent ASMs An Introduction Egon Börger Dipartimento di Informatica, Universita di Pisa
- 1 - Embedded Systems - SDL Some general properties of languages 1. Synchronous vs. asynchronous languages Description of several processes in many languages.
B A6 WEB. b PURPOSE.. This presentation will take you through various pages included on A6 web, serially with every possible detail included in the individual.
 5 Core Elements to Game Design Courtesy of Gamestar Mechanics.
14.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 14 Entity Authentication.
CSCI-383 Object-Oriented Programming & Design Lecture 18.
Warm Up Pg. 36 #’s 1-30 EVEN ONLY.
Interpersonal Relationships in Group Interaction in CSCW Environments Yang Cao, Golha Sharifi, Yamini Upadrashta, Julita Vassileva University of Saskatchewan,
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Hash-Based Indexes Chapter 11 Modified by Donghui Zhang Jan 30, 2006.
Real-Time & MultiMedia Lab Synchronization Distributed System Jin-Seung,KIM.
7.5 Notes: Solving Logs. What if there is a “log” in our equation?  What if our equations already have a “log” or “ln” in them? Can we still add “log”
School of Computer Science & Software Engineering
Lecture Coursework 2 AGAIN. Rectangle Game Look at proof of matchsticks A rectangular board is divided into m columns by n rows. The area of the board.
CSE 153 Design of Operating Systems Winter 2015 Midterm Review.
1 Chapter 9 Searching And Table. 2 OBJECTIVE Introduces: Basic searching concept Type of searching Hash function Collision problems.

Page 1 Mutual Exclusion & Election Algorithms Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content.
Summary from previous lectures
The Lovely Game of NIM. Version 1 - Classic NIM You will need seven objects, such as counters or blocks. It is a game for two players. Place the 7 counters.
Introduction to TouchDevelop Lesson 3 – Comments & Lists Created by S. Johnson
Pirates & Ninjas. P&N: Plan Project summary Architecture User Interface World Creation (town) World Content Creation Game Play Artificial Intelligence.
The Law of Averages. What does the law of average say? We know that, from the definition of probability, in the long run the frequency of some event will.
Asynchronous ASMs Echo Algorithm Egon Börger Dipartimento di Informatica, Universita di Pisa
Sage Franch | Technical Evangelist Susan Ibach | Technical Evangelist.
Name 8/29/17.
ECE 434 Advanced Digital System L13
CS 188: Artificial Intelligence Spring 2007
Process Description and Control
Process Identification (PId)
Chapter 5 (through section 5.4)
Chapter 4: Simulation Designs
Presentation transcript:

© Egon Börger: Daemon Game 1 Daemon Game (Turner 1993) Problem Description Design a system for the following multi-player game: –A Daemon generates Bump signals at random. Players in system env have to guess whether the number of generated Bump signals is odd or even, by sending a Probe signal. The system replies by sending the signal Win resp. Lose if the number of the generated Bump signals is odd resp. even. –The system keeps track of the score of each player. The score is initially 0. It is increased (decreased) by 1 for each (un) successful guess. A player can ask for the current value of the score by the signal Result, which is answered by the system with the signal Score. –Before a player can start playing, the player must log in via signal NewGame. A player logs out via signal EndGame. The system allocates a player a unique ID on logging in, and de-allocates it on logging out. The system cannot tell whether different IDs are being used by the same player.

© Egon Börger: Daemon Game 2 Multi-agent ASM for Daemon Game with global dynamic external lot issuing daemon Yes p.in = Probe & p in PLAY winning(lot) p.score : = p.score +1 p.out : = Win No p.score : = p.score -1 p.out : = Lose p.in = Result & p in PLAY p.out : = p.score p.in = EndGame & p in PLAY Delete p from PLAY user & play rules forall usr in USER, forall p in PLAY Synchronizing users and plays in parallel usr.in = NewGame & usr in USER let p = new (PLAY) p.initialize

© Egon Börger: Daemon Game 3 Daemon Game : Further Explanations p.initialize = p.score:=0 Is the (lot issuing) Daemon –‘integral part of the description’ or ‘artefact of the informal explanation’? –bump count global (‘since the system started’) or per game? Both questions are about the nature of a lot (global or local): –Monitored fct (s) winning/losing lot, Bump counter increasing by 1, alternating 0-1-fct –Agent with rule forall p in PLAY p.bump := 1 – p.bump –Derived fct p.bump = bump–p.bump init, with global bump, adding to p.initialize the update p.bump init := bump Identification of players and games: ’Presumably some identifiers are needed, but how should they be allocated and what should they distinguish?’ ‘The players should be an anonymous part of the env of the system.’ –new(PLAY) adds fresh elements p to PLAY, identified as instance parameters –possible to link user and play adding p.user:= sender to p.initialize

© Egon Börger: Daemon Game 4 Daemon Game : Further Explanations (Cont’d) Interruption of Probe or Result: ‘Should it be allowable for another signal to be processed by the system bw Probe and Win/Lose, or bw Result and Score?’ ‘Probe and Result should be followed by their respective responses before any other signal is processed.’ Guaranteed by atomicity of ASM rule exec Robustness Conditions: –‘What should happen if a player who is already logged in tries to issue NewGame again?’ ‘NewGame should be allowed to happen in a current game, but should be ignored.’ –‘What should happen if a player issues any signal other than NewGame before logging into a game?’ ‘The intention was to allow Probe, Result, or EndGame when a game is not current, but to ignore these signals.’ Guaranteed by no ASM rule being applicable (equiv to SKIP) Excluding behaviour: ‘What should happen if the player issues Win, Lose, or Score signals?’ ‘The intention was to disallow such behaviour:it simply must not happen, as opposed to happening but be ignored.’ Excluded by sign cond x.in = NewGame, Probe, Result, EndGame

© Egon Börger: Daemon Game 5 Daemon Game : References K. J. Turner (Ed.): Using Formal Description Techniques – An Introduction to Estelle, LOTOS and SDL. –John Wiley, New York, For a Petri net solution see section 11 (in particular Fig. 7, pg.314) of –J. Billington: Protocol Specification Using P-Graphs, a Technique Based on Coloured Petri Nets. In: W. Reisig, G. Rozenberg (Eds.): Lectures on Petri Nets II: Applications. Springer LNCS 1492 (1998) E. Börger, R. Stärk: Abstract State Machines. A Method for High-Level System Design and Analysis Springer-Verlag 2003, see –See Chapter 2.2