The Discrete Event Calculus for Games and Other (Soft) Real Time Systems

Size: px
Start display at page:

Download "The Discrete Event Calculus for Games and Other (Soft) Real Time Systems"

Transcription

1 The Discrete Event Calculus for Games and Other (Soft) Real Time Systems Matthew Fuchs, PhD Paideia Computing Corp

2 Outline Movie The target DEC explained DEC as a programming language Implementation Future possibilities

3 Give me a command Video at

4 What I was looking for Unified approach Not mix of java, prolog, etc., with protocols and events passing among them Able to handle/model multi-modal input Speech, movement, pointing, possession Rich behavior, not just Finite State Machines Rich behavior set, but not difficult to add new behaviors Large variety of events arriving at any time Can integrate with other AI systems or handle such tasks directly Personality, planning, language Multitasking Handle multiple characters in a single environment Sufficiently fast soft real time not aware of any explicitly temporal rule engines Able to reason about programs

5 Event Calculus

6 What it s been used for Robotic path planning Linguistics Story understanding Abductive planning Agent programming Contract law Workflow modeling Mateas work in games Etc.

7 What I found: Rules with Time AI Logic Formalism Descended from Situation Calculus First proposed by Kowalski and Sergot, extended by Shanahan Has an explicit time parameter either continuous or discrete Commonsense law of inertia Handles the Frame Problem through Circumscription Sorted (multiple token types)

8 DEC What Fluents Events When Happens HoldsAt How Initiates Terminates Trajectory AntiTrajectory Releases

9 Fluents A function of sort fluent Unique names f 1 (p 1,,p n ) = f 2 (q 1,,q n ) iff f 1 =f 2 & p 1 =q 1,,p n =q n HoldsAt(f,t) is 2 parameter predicate HoldsAt(walks(John),0). Either holds or doesn t at t=0 Normally only changes value through events (law of inertia)

10 Events A function of sort event Unique Names e(p 1,,p n ) = e(q 1,,q n ) iff p 1 =q 1,,p n =q n Happens(e,t) is a 2 parameter predicate Happens(notices(John,Tiger),4). Events happen at particular moments in time and are only true at that moment (or happen again)

11 Initiates/Terminates Initiates(e,f,t) Happens(e,t) & ~HoldsAt(f,t) -> HoldsAt(f,t+1). Terminates(e,f,t) Happens(e,t) & HoldsAt(f,t) -> ~HoldsAt(f,t+1). [t]initiates(notices(john,tiger),runs(john),t). [t]terminates(notices(john,tiger),walks(john),t)

12 Trajectory Trajectory(f 1,t 1,f 1,t 2 ) If f 1 is initiated at t 1 and holds at t 1 +t 2, then f 2 holds at t 2 Trajectory(walksFrom(John,X,Y,Phi),t1, position(john,x+t2*cos(phi),y+t2*sin(phi),t2) Assumes you calculate the arguments to f 2 at t 2 Depends on the math for f 2

13 AntiTrajectory AntiTrajectory(f 1,t 1,f 2,t 2 ) If f 1 is terminated at t 1 and doesn t hold at t 2, then f 2 holds at t 1 +t 2 HoldsAt(Height(bird,h),t1)->AntiTrajectory(Flapping(bird),t1, Height(bird,h ½ G t 22 ) Assumes you calculate the arguments to f 2 at t 2 Depends on the math for f 2

14 Released Releases(e,f,t). A released fluent may take any logically allowed value Allows fluents to function like ordinary logical variables HoldsAt(sees(John,Tiger),t) -> HoldsAt(scared(John),t).

15 Circumscription Handles frame problem Some variables change between t and t + 1 How to make sure nothing else does Essentially create equivalence between a predicate and the rules that cause it 1 -> Happens(e,t) 2 -> Happens(e,t) Happens(e,t) <-> 1 2

16 Rest of syntax [] for universal quantificaton {} for existential quantification! for negation & for and, for or -> for implication My additions: notices(john,tiger)!time

17 Example John is walking John is frightened of tigers If John is frightened he Stops walking Finds a place to run to Starts running

18 Declarations sort mob sort gait mob John, Tiger gait Walking, Running structure Location(x:integer,y:integer,z:integer,theta:integer) externevent SetGait(mob,gait) externevent MovesTo(mob,location) fluent Position(mob,location) event Sees(mob,mob) predicate IsVisible(location,location) function MoveAway(location,location):location fluent Frightens(mob,mob) fluent Position(mob,location)

19 Initial Conditions Position(John, Location(0, 0, 0, Position(Tiger, Location(0, 0, 8, SetGait(John,

20 Some rules [mob,location,time] MovesTo(mob,location)=>Position(mob,location),time). [mob,location1,location2,time] &!(location2 = location1) -> MovesTo(mob,location2) /=> Position(mob,location1)@time. [mob1,mob2,location1,location2,time] Position(mob1,location1)@time & Position(mob2,location2)@time & IsVisible(location2,location1) -> Sees(mob1,mob2)!time.

21 Last rules [mob1,mob2,time] & -> [mob1,mob2,location1,location2,time] & & & location3 = MoveAway(location1,location2) -> MovesTo(mob1,location3)!time

22 How it s used Model checking Completely static Tic Tac Toe as an example Rules to generate all games Generates all games given some moves SAT is slow Perhaps Answer Set Programming?

23 DEC as a programming language Time parameter maps to game/animation world and simulation communicate via events World events arrive at each tick Rules are evaluated with new events Some events are external and reflected back Don t need Conscription Many State Constraints (F(x) & F(y) => x = y)

24 Markov issues DEC rules are symmetric to time e!t -> e 2!(t 10) e 2!t -> e!(t + 10) Future can affect past running(john)@t1 -> {t2}t2 < t1 & scared(john)@t2. Programs run forward in time

25 Implementation Convert into forward chaining DEC rules don t have Markov Property Rules that don t obey MP are tests/asserts Might be used for reasoning later on Execution but not reasoning only goes forwards Apply rete for efficiency Simplify by translating to CLIPS style system Not included in current implementation Released fluents (state constraints) (Anti)Trajectory

26 Rete algorithm Greek for net Allows forward chaining systems to be fast Rules of form (LHS -> RHS) ((a & b) (c & d)) -> g ((e & b) (c & d)) -> h Break up LHS into variables and binary ops Create a network from the results combining LHS overlaps Facts (de)activate parts of network

27 Forward Chaining System Active axioms of forms -> Initiates(e,f,t) -> Terminates(e,f,t) -> Trajectory(f 1,t 1,f 2,t 1 ) -> AntiTrajectory(f 1,t 1,f 2,t 2 ) Implication means perform ->Initiates(e,f,t) changes an explicit state Other forms become tests Move(rc1,rc2,mark1)!time & Move(rc3,rc4,mark2)!time -> rc1 = rc3 & rc2 = rc4 & mark1 = mark2.

28 Primitives (Clips style) Fluents are atoms (fluent, time, p1,,pn) Events are atoms (event, time, p1,,pn) Add structures, lists (name, id, type, ref count, p1,,pn) Primitive pattern matching

29 Multistage architecture Each time step has four stages Prepare new fluents Create fluents Garbage Collect Generate new events

30 Stage 0 (with events and fluents remaining from t-1) Evaluate ->Initiates(e,f,t) Leads to createfluent fact Evaluate -> Terminates(e,f,t) Leads to retractfluent fact Test fluent contradictions Initiate(e,f,t) & Terminate(e,f,t) are illegal

31 Stage 1 Actually create fluents Actually retract fluents Clean up events from round t - 1

32 Stage 2 Garbage collection Structures have references Language is all functional GC is through reference counting

33 Stage 3 Create all events Add all world events All rules of the forms: -> Happens(e,t). Creates external events (for outside world )

34 Test constraint violations X ->!Y X -> * +Y or X ->, -Y * +!Y HoldsAt(f,t) where t > 0

35 Rule by Rule DEC Syntax Clips Syntax (defrule startup-1 => (Time 0) (round 0) (assert (createfluent Frightens 0 Tiger John)))

36 HoldsAt as Constraint (defrule rule-2 (not (fluent Frightens?_time0 Foobar John)) (round 4) => (assert (ConstraintViolation rule-2 "[Foobar,John]")))

37 Happens on RHS [mob1,mob2,location1,location2,time] & & IsVisible(location2,location1) -> Sees(mob1,mob2)!time. (defrule rule-8 (fluent Position?_time2?mob1?location1) (fluent Position?_time3?mob2?location2) (IsVisible?location2?location1 TRUE) (round 3) (Time?time) => (assert (event Sees?time?mob1?mob2)))

38 Initiates [mob,location,time] (defrule rule-11 (event MovesTo?_time0?mob?location) (round 0) (Time?time) => (assert (modifyrefs (++?*modifyindex*)?location 1)) (assert (createfluent Position?time?mob?location)))

39 Terminates &!(location2 = location1))-> MovesTo(mob,location2)/=>Position(mob,location1)@time) (defrule rule-10 (event MovesTo?_time0?mob?location2) (fluent Position?_time2?mob?location1) (and (fluent Position?_time3?mob?location1) (not (test (=?location2?location1)))) (round 0) (Time?time) => (assert (modifyrefs (++?*modifyindex*)?location1-1)) (assert (retractfluent Position?time?mob?location1)))

40 Predicates number7 = ViewAngle(number1,number2,number3,number4) & number8 = AngleDif(number7,number5) & number8 < number6)))-> LookingAt(number1,number2,number3,number4,number5,number6) (defrule LookingAt-62 =>?_need <- (need-lookingat?number1?number2?number3?number4?number5?number6?foo) (ViewAngle?number1?number2?number3?number4?number7) (AngleDif?number7?number5?number8) (test (<?number8?number6) (retract?_need) (assert (LookingAt?number1?number2?number3?number4?number5?number6 TRUE)))

41 Functions [integer1,integer2]add(integer1,integer2) = +(integer1,integer2) (defrule Add-74?_need <- (need-add?integer1?integer2?foo) => (bind?return (+?integer1?integer2)) (retract?_need) (assert (Add?integer1?integer2?return)))

42 Behavior Management Speech Services Actions Speech output Grammar/ Lexicon Recognition results Speech Generation (Nuance/Loquendo /Phonetic Arts) Recognition Engine (Nuance/IBM/Sphinx) NPC voice Game events VoIP Layer World Engine Game/Learning Player voice Player actions NPC Actions

43 Multiple versions Flash Media Server Multiverse for robot video HTTP version for Parrot

44 Dancing Parrot Video at Parrot front end by Oddcast ( )

45 Fun other stuff Petri nets Model checking not just SAT Better syntax Pattern matching Probabilistic processes Adding probabilities to traversal Implementing the other party

46 Better Syntax f (e 1 =>f & e 1 /=>f 2 & f -> e 2!t) ( 1 xor 2 xor 3 )

47 Probabilistic Processes Model opponents Add probabilities e 1!t:0.2 xor e 2!t:0.6 xor e 3!t: :e!t->f1@t f2@t

48 Conclusion Works for animation/games Can work for soft real time processes Combines a rule engine with temporal processes Currently translating to Drools

49 Thank you!

Intelligent Systems: Reasoning and Recognition. Rule based programming - Introduction to CLIPS 6.0

Intelligent Systems: Reasoning and Recognition. Rule based programming - Introduction to CLIPS 6.0 Intelligent Systems: Reasoning and Recognition James L. Crowley ENSIMAG 2 / MoSIG M1 Second Semester 2010/2011 Lesson 5 16 February 2011 Rule based programming - Introduction to CLIPS 6.0 Production Systems...2

More information

Encoding functions in FOL. Where we re at. Ideally, would like an IF stmt. Another example. Solution 1: write your own IF. No built-in IF in Simplify

Encoding functions in FOL. Where we re at. Ideally, would like an IF stmt. Another example. Solution 1: write your own IF. No built-in IF in Simplify Where we re at We explored the three standard logics, and compared them along three dimensions expressiveness automation human-friendliness Next we ll look in more detail at FOL we will explore how to

More information

LOGIC AND DISCRETE MATHEMATICS

LOGIC AND DISCRETE MATHEMATICS LOGIC AND DISCRETE MATHEMATICS A Computer Science Perspective WINFRIED KARL GRASSMANN Department of Computer Science University of Saskatchewan JEAN-PAUL TREMBLAY Department of Computer Science University

More information

Intermediate Code Generation

Intermediate Code Generation Intermediate Code Generation In the analysis-synthesis model of a compiler, the front end analyzes a source program and creates an intermediate representation, from which the back end generates target

More information

Ensuring a Rigorous Curriculum: Practices and Goals

Ensuring a Rigorous Curriculum: Practices and Goals Ensuring a Rigorous Curriculum: Practices and Goals Allen B. Tucker Bowdoin College www.bowdoin.edu/~allen April 12, 2002 1 of 30 Goals of an Undergraduate Program To prepare graduates for the computing

More information

Defining an Abstract Core Production Rule System

Defining an Abstract Core Production Rule System WORKING PAPER!! DRAFT, e.g., lacks most references!! Version of December 19, 2005 Defining an Abstract Core Production Rule System Benjamin Grosof Massachusetts Institute of Technology, Sloan School of

More information

Lecture 5. Logic I. Statement Logic

Lecture 5. Logic I. Statement Logic Ling 726: Mathematical Linguistics, Logic. Statement Logic V. Borschev and B. Partee, September 27, 2 p. Lecture 5. Logic I. Statement Logic. Statement Logic...... Goals..... Syntax of Statement Logic....2.

More information

Knowledge Representation

Knowledge Representation Knowledge Representation References Rich and Knight, Artificial Intelligence, 2nd ed. McGraw-Hill, 1991 Russell and Norvig, Artificial Intelligence: A modern approach, 2nd ed. Prentice Hall, 2003 Outline

More information

1. true / false By a compiler we mean a program that translates to code that will run natively on some machine.

1. true / false By a compiler we mean a program that translates to code that will run natively on some machine. 1. true / false By a compiler we mean a program that translates to code that will run natively on some machine. 2. true / false ML can be compiled. 3. true / false FORTRAN can reasonably be considered

More information

Introduction to CLIPS

Introduction to CLIPS Introduction to CLIPS Overview of CLIPS Facts Rules Rule firing Control techniques Example CS 460, Session 21 1 CLIPS basic elements Fact-list: global memory of data Knowledge-base: contain all the rules

More information

WWW.STUDENTSFOCUS.COM REPRESENTATION OF KNOWLEDGE Game playing - Knowledge representation, Knowledge representation using Predicate logic, Introduction to predicate calculus, Resolution, Use of predicate

More information

Design Issues. Subroutines and Control Abstraction. Subroutines and Control Abstraction. CSC 4101: Programming Languages 1. Textbook, Chapter 8

Design Issues. Subroutines and Control Abstraction. Subroutines and Control Abstraction. CSC 4101: Programming Languages 1. Textbook, Chapter 8 Subroutines and Control Abstraction Textbook, Chapter 8 1 Subroutines and Control Abstraction Mechanisms for process abstraction Single entry (except FORTRAN, PL/I) Caller is suspended Control returns

More information

Intelligent Systems: Reasoning and Recognition. Rule based programming - Introduction to CLIPS 6.0. Production System Architecture...

Intelligent Systems: Reasoning and Recognition. Rule based programming - Introduction to CLIPS 6.0. Production System Architecture... Intelligent Systems: Reasoning and Recognition James L. Crowley ENSIMAG 2 / MoSIG M1 Second Semester 2015/2016 Lesson 14 6 April 2016 Rule based programming - Introduction to CLIPS 6.0 Production System

More information

Module 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur

Module 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur Module 6 Knowledge Representation and Logic (First Order Logic) 6.1 Instructional Objective Students should understand the advantages of first order logic as a knowledge representation language Students

More information

SLA Representation, Management and Enforcement

SLA Representation, Management and Enforcement SLA Representation, Management and Enforcement Adrian Paschke, Martin Bichler Internet-based Information Systems, Technical University Munich [paschke, bichler]@in.tum.de Abstract As the IT industry is

More information

Propositional Logic Formal Syntax and Semantics. Computability and Logic

Propositional Logic Formal Syntax and Semantics. Computability and Logic Propositional Logic Formal Syntax and Semantics Computability and Logic Syntax and Semantics Syntax: The study of how expressions are structured (think: grammar) Semantics: The study of the relationship

More information

COMS 1003 Fall Introduction to Computer Programming in C. Bits, Boolean Logic & Discrete Math. September 13 th

COMS 1003 Fall Introduction to Computer Programming in C. Bits, Boolean Logic & Discrete Math. September 13 th COMS 1003 Fall 2005 Introduction to Computer Programming in C Bits, Boolean Logic & Discrete Math September 13 th Hello World! Logistics See the website: http://www.cs.columbia.edu/~locasto/ Course Web

More information

the gamedesigninitiative at cornell university Lecture 13 Architecture Design

the gamedesigninitiative at cornell university Lecture 13 Architecture Design Lecture 13 Take Away for Today What should lead programmer do? How do CRC cards aid software design? What goes on each card? How do you lay m out? What properties should y have? How do activity diagrams

More information

the gamedesigninitiative at cornell university Lecture 12 Architecture Design

the gamedesigninitiative at cornell university Lecture 12 Architecture Design Lecture 12 Take Away for Today What should lead programmer do? How do CRC cards aid software design? What goes on each card? How do you lay m out? What properties should y have? How do activity diagrams

More information

The Prolog to Mercury transition guide

The Prolog to Mercury transition guide The Prolog to Mercury transition guide Version 14.01.1 Thomas Conway Zoltan Somogyi Fergus Henderson Copyright c 1995 2014 The University of Melbourne. Permission is granted to make and distribute verbatim

More information

Formal specification of semantics of UML 2.0 activity diagrams by using Graph Transformation Systems

Formal specification of semantics of UML 2.0 activity diagrams by using Graph Transformation Systems Formal specification of semantics of UML 2.0 activity diagrams by using Graph Transformation Systems Somayeh Azizi 1, Vahid Panahi 2 Computer science department, Sama Technical and vocational, Training

More information

Formal Structural Requirements. Functional Requirements: Why Formal? Revisiting SADT. A Formalization of RML/Telos. A Survey of Formal Methods

Formal Structural Requirements. Functional Requirements: Why Formal? Revisiting SADT. A Formalization of RML/Telos. A Survey of Formal Methods Functional Requirements: Formal Structural Requirements Why Formal? Revisiting SADT RML/Telos Essentials A Formalization of RML/Telos A Survey of Formal Methods 1 2 RML/Telos Essentials [S. Greenspan,

More information

A Small Interpreted Language

A Small Interpreted Language A Small Interpreted Language What would you need to build a small computing language based on mathematical principles? The language should be simple, Turing equivalent (i.e.: it can compute anything that

More information

Programming Languages Third Edition

Programming Languages Third Edition Programming Languages Third Edition Chapter 12 Formal Semantics Objectives Become familiar with a sample small language for the purpose of semantic specification Understand operational semantics Understand

More information

Abstract Data Structures IB Computer Science. Content developed by Dartford Grammar School Computer Science Department

Abstract Data Structures IB Computer Science. Content developed by Dartford Grammar School Computer Science Department Abstract Data Structures IB Computer Science Content developed by Dartford Grammar School Computer Science Department HL Topics 1-7, D1-4 1: System design 2: Computer Organisation 3: Networks 4: Computational

More information

CSE 413 Languages & Implementation. Hal Perkins Winter 2019 Structs, Implementing Languages (credits: Dan Grossman, CSE 341)

CSE 413 Languages & Implementation. Hal Perkins Winter 2019 Structs, Implementing Languages (credits: Dan Grossman, CSE 341) CSE 413 Languages & Implementation Hal Perkins Winter 2019 Structs, Implementing Languages (credits: Dan Grossman, CSE 341) 1 Goals Representing programs as data Racket structs as a better way to represent

More information

INF5390 Kunstig intelligens. First-Order Logic. Roar Fjellheim

INF5390 Kunstig intelligens. First-Order Logic. Roar Fjellheim INF5390 Kunstig intelligens First-Order Logic Roar Fjellheim Outline Logical commitments First-order logic First-order inference Resolution rule Reasoning systems Summary Extracts from AIMA Chapter 8:

More information

Languages for goals and plans

Languages for goals and plans Languages for goals and plans Overview of the existing plan languages Dmitry Shaparau shaparau@itc.it ITC-IRST Languages for goals and plans p. 1/2 Motivation One of the key components of the planning

More information

Foundations of AI. 9. Predicate Logic. Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution

Foundations of AI. 9. Predicate Logic. Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution Foundations of AI 9. Predicate Logic Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution Wolfram Burgard, Andreas Karwath, Bernhard Nebel, and Martin Riedmiller 09/1 Contents Motivation

More information

Z Notation. June 21, 2018

Z Notation. June 21, 2018 Z Notation June 21, 2018 1 Definitions There are many different ways to introduce an object in a Z specification: declarations, abbreviations, axiomatic definitions, and free types. Keep in mind that the

More information

Propositional Calculus: Boolean Functions and Expressions. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

Propositional Calculus: Boolean Functions and Expressions. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson Propositional Calculus: Boolean Functions and Expressions CS 270: Mathematical Foundations of Computer Science Jeremy Johnson Propositional Calculus Objective: To provide students with the concepts and

More information

Context-sensitive Analysis. Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved.

Context-sensitive Analysis. Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved. Context-sensitive Analysis Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved. Beyond Syntax There is a level of correctness that is deeper than grammar fie(a,b,c,d) int

More information

Automata Theory for Reasoning about Actions

Automata Theory for Reasoning about Actions Automata Theory for Reasoning about Actions Eugenia Ternovskaia Department of Computer Science, University of Toronto Toronto, ON, Canada, M5S 3G4 eugenia@cs.toronto.edu Abstract In this paper, we show

More information

Introduction to Scheme

Introduction to Scheme How do you describe them Introduction to Scheme Gul Agha CS 421 Fall 2006 A language is described by specifying its syntax and semantics Syntax: The rules for writing programs. We will use Context Free

More information

Visually Interacting with a Knowledge Base

Visually Interacting with a Knowledge Base Visually Interacting with a Knowledge Base Using Frames, Logic, and Propositional Graphs With Extended Background Material Daniel R. Schlegel and Stuart C. Shapiro Department of Computer Science and Engineering

More information

Notes on Default Reasoning

Notes on Default Reasoning Notes on Default Reasoning Stuart C. Shapiro November 30, 2004 1 Introduction These notes comment on, and are, in part, derived from Brachman & Levesque, Knowledge Representation and Reasoning, Chapter

More information

Smart usage of Mobile Phones Sensors within an Event Calculus Engine

Smart usage of Mobile Phones Sensors within an Event Calculus Engine Smart usage of Mobile Phones Sensors within an Event Calculus Engine Student experiences inside AI courses Valerio Mazza, Michele Solimando Dipartimento di Informatica Scienza e Ingegneria Università di

More information

Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Chapter 6 Outline. Unary Relational Operations: SELECT and

Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Chapter 6 Outline. Unary Relational Operations: SELECT and Chapter 6 The Relational Algebra and Relational Calculus Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 6 Outline Unary Relational Operations: SELECT and PROJECT Relational

More information

Introduction to Rules Engines

Introduction to Rules Engines Introduction to Rules Engines Brian McCallister brianm@chariotsolutions.com http://www.chariotsolutions.com/ Objectives Understanding of forward-chaining rules engines Introduction to the Drools rules

More information

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter p. 1/27

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter p. 1/27 CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter 2.1-2.7 p. 1/27 CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer

More information

L322 Syntax. Chapter 3: Structural Relations. Linguistics 322 D E F G H. Another representation is in the form of labelled brackets:

L322 Syntax. Chapter 3: Structural Relations. Linguistics 322 D E F G H. Another representation is in the form of labelled brackets: L322 Syntax Chapter 3: Structural Relations Linguistics 322 1 The Parts of a Tree A tree structure is one of an indefinite number of ways to represent a sentence or a part of it. Consider the following

More information

26:198:722 Expert Systems

26:198:722 Expert Systems 26:198:722 Expert Systems Machine learning Rule-based Expert Systems CLIPS Machine Learning ASSISTANT uses Binarization -------------Attributes------------- ---Decision--- Height Hb Hr Hd Eyes Attractiveness

More information

Semantic Analysis. Outline. The role of semantic analysis in a compiler. Scope. Types. Where we are. The Compiler so far

Semantic Analysis. Outline. The role of semantic analysis in a compiler. Scope. Types. Where we are. The Compiler so far Outline Semantic Analysis The role of semantic analysis in a compiler A laundry list of tasks Scope Static vs. Dynamic scoping Implementation: symbol tables Types Statically vs. Dynamically typed languages

More information

Overview of expert system shells

Overview of expert system shells Overview of expert system shells Krzysztof Kaczor, Szymon Bobek, Grzegorz J. Nalepa Institute of Automatics AGH University of Science and Technology, Poland In»ynieria wiedzy 12.05.2010, Kraków http://geist.agh.edu.pl

More information

Knowledge Representation and Reasoning Logics for Artificial Intelligence

Knowledge Representation and Reasoning Logics for Artificial Intelligence Knowledge Representation and Reasoning Logics for Artificial Intelligence Stuart C. Shapiro Department of Computer Science and Engineering and Center for Cognitive Science University at Buffalo, The State

More information

PdOd Kev Events I Re-world war I1 rwa

PdOd Kev Events I Re-world war I1 rwa I PdOd Kev Events I Re-world war I rwa LECTURE: Knowledge Representation Overview 0 'Qpes of knowledge: objects, events, meta-knowledge, etc. 0 Characteristics of representation: expressive adequacy vs.

More information

CS357 Lecture: BDD basics. David Dill

CS357 Lecture: BDD basics. David Dill CS357 Lecture: BDD basics David Dill BDDs (Boolean/binary decision diagrams) BDDs are a very successful representation for Boolean functions. A BDD represents a Boolean function on variables x, x 2,...

More information

Principles of Computer Game Design and Implementation. Lecture 23

Principles of Computer Game Design and Implementation. Lecture 23 Principles of Computer Game Design and Implementation Lecture 23 We already learned Decision Tree 2 Outline for today Finite state machine 3 Creating & Controlling AI Behaviors Behavior: A Sequence of

More information

Knowledge Representation and Reasoning Logics for Artificial Intelligence

Knowledge Representation and Reasoning Logics for Artificial Intelligence Knowledge Representation and Reasoning Logics for Artificial Intelligence Stuart C. Shapiro Department of Computer Science and Engineering and Center for Cognitive Science University at Buffalo, The State

More information

Non-numeric types, boolean types, arithmetic. operators. Comp Sci 1570 Introduction to C++ Non-numeric types. const. Reserved words.

Non-numeric types, boolean types, arithmetic. operators. Comp Sci 1570 Introduction to C++ Non-numeric types. const. Reserved words. , ean, arithmetic s s on acters Comp Sci 1570 Introduction to C++ Outline s s on acters 1 2 3 4 s s on acters Outline s s on acters 1 2 3 4 s s on acters ASCII s s on acters ASCII s s on acters Type: acter

More information

Parsing. Zhenjiang Hu. May 31, June 7, June 14, All Right Reserved. National Institute of Informatics

Parsing. Zhenjiang Hu. May 31, June 7, June 14, All Right Reserved. National Institute of Informatics National Institute of Informatics May 31, June 7, June 14, 2010 All Right Reserved. Outline I 1 Parser Type 2 Monad Parser Monad 3 Derived Primitives 4 5 6 Outline Parser Type 1 Parser Type 2 3 4 5 6 What

More information

CS311 - Neural Nets Lab Thursday, April 11

CS311 - Neural Nets Lab Thursday, April 11 CS311 - Neural Nets Lab Thursday, April 11 In class today we re going to be playing with a software that simulates neural networks to get a better feeling for how they work, how they can be used to solve

More information

1 Undirected Vertex Geography UVG

1 Undirected Vertex Geography UVG Geography Start with a chip sitting on a vertex v of a graph or digraph G. A move consists of moving the chip to a neighbouring vertex. In edge geography, moving the chip from x to y deletes the edge (x,

More information

Proving the Correctness of Distributed Algorithms using TLA

Proving the Correctness of Distributed Algorithms using TLA Proving the Correctness of Distributed Algorithms using TLA Khushboo Kanjani, khush@cs.tamu.edu, Texas A & M University 11 May 2007 Abstract This work is a summary of the Temporal Logic of Actions(TLA)

More information

Chapter 3. Describing Syntax and Semantics ISBN

Chapter 3. Describing Syntax and Semantics ISBN Chapter 3 Describing Syntax and Semantics ISBN 0-321-49362-1 Chapter 3 Topics Introduction The General Problem of Describing Syntax Formal Methods of Describing Syntax Attribute Grammars Describing the

More information

The role of semantic analysis in a compiler

The role of semantic analysis in a compiler Semantic Analysis Outline The role of semantic analysis in a compiler A laundry list of tasks Scope Static vs. Dynamic scoping Implementation: symbol tables Types Static analyses that detect type errors

More information

The Three Rules. Program. What is a Computer Program? 5/30/2018. Interpreted. Your First Program QuickStart 1. Chapter 1

The Three Rules. Program. What is a Computer Program? 5/30/2018. Interpreted. Your First Program QuickStart 1. Chapter 1 The Three Rules Chapter 1 Beginnings Rule 1: Think before you program Rule 2: A program is a human-readable essay on problem solving that also executes on a computer Rule 3: The best way to improve your

More information

Introduction to dependent types in Coq

Introduction to dependent types in Coq October 24, 2008 basic use of the Coq system In Coq, you can play with simple values and functions. The basic command is called Check, to verify if an expression is well-formed and learn what is its type.

More information

Axioms: Semantics Aspects of C++ Concepts

Axioms: Semantics Aspects of C++ Concepts Doc no: N2887=09-0077 Date: 2009-06-21 Project: ISO/IEC JTC1/SC22/WG21 Reply-To: Gabriel Dos Reis gdr@cs.tamu.edu Axioms: Semantics Aspects of C++ Concepts Gabriel Dos Reis Bjarne Stroustrup Alisdair Meredith

More information

Recursive Functions of Symbolic Expressions and Their Application, Part I

Recursive Functions of Symbolic Expressions and Their Application, Part I Recursive Functions of Symbolic Expressions and Their Application, Part I JOHN MCCARTHY Review: Amit Kirschenbaum Seminar in Programming Languages Recursive Functions of Symbolic Expressions and Their

More information

Chapter 3. Describing Syntax and Semantics

Chapter 3. Describing Syntax and Semantics Chapter 3 Describing Syntax and Semantics Chapter 3 Topics Introduction The General Problem of Describing Syntax Formal Methods of Describing Syntax Attribute Grammars Describing the Meanings of Programs:

More information

ALGEBRA Sec. 5 IDENTITY AXIOMS. MathHands.com. IDENTITY AXIOMS: Identities

ALGEBRA Sec. 5 IDENTITY AXIOMS. MathHands.com. IDENTITY AXIOMS: Identities IDENTITY AXIOMS IDENTITY AXIOMS: Identities It is helpful to recall the definition of a binary operation. As we have stated it, a binary operation is a mixing recipe for mixing two items. We used the color

More information

CS 457 Multimedia Applications. Fall 2014

CS 457 Multimedia Applications. Fall 2014 CS 457 Multimedia Applications Fall 2014 Topics Digital audio and video Sampling, quantizing, and compressing Multimedia applications Streaming audio and video for playback Live, interactive audio and

More information

Lecture 3 Local Optimizations, Intro to SSA

Lecture 3 Local Optimizations, Intro to SSA Lecture 3 Local Optimizations, Intro to SSA I. Basic blocks & Flow graphs II. Abstraction 1: DAG III. Abstraction 2: Value numbering IV. Intro to SSA ALSU 8.4-8.5, 6.2.4 Phillip B. Gibbons 15-745: Local

More information

Course on Artificial Intelligence and Intelligent Systems. A short introduction to CHR and its application for rule-based expert systems

Course on Artificial Intelligence and Intelligent Systems. A short introduction to CHR and its application for rule-based expert systems Course on Artificial Intelligence and Intelligent Systems A short introduction to CHR and its application for rule-based expert systems A course note Henning Christiansen Roskilde University, Computer

More information

Chapter 3. Set Theory. 3.1 What is a Set?

Chapter 3. Set Theory. 3.1 What is a Set? Chapter 3 Set Theory 3.1 What is a Set? A set is a well-defined collection of objects called elements or members of the set. Here, well-defined means accurately and unambiguously stated or described. Any

More information

CSE413: Programming Languages and Implementation Racket structs Implementing languages with interpreters Implementing closures

CSE413: Programming Languages and Implementation Racket structs Implementing languages with interpreters Implementing closures CSE413: Programming Languages and Implementation Racket structs Implementing languages with interpreters Implementing closures Dan Grossman Fall 2014 Hi! I m not Hal J I love this stuff and have taught

More information

Lecture Outlines. CSCI- 360 Section R Spring 2016 Wei- Min Shen

Lecture Outlines. CSCI- 360 Section R Spring 2016 Wei- Min Shen Lecture Outlines CSCI- 360 Section- 30304R Spring 2016 Wei- Min Shen Wk1 Ch1: Introduction * Welcome * Class structures/rules (syllabus, HM, projects, tests) * What is AI? * What are the related fields

More information

Regarding Python level necessary for the course

Regarding Python level necessary for the course Logistics First two recitations (next two weeks) Python basics (installation, basic syntax, basic programming), optional Making models for 3D printing w/ Blender Will announce details through Sakai Regarding

More information

Promela and SPIN. Mads Dam Dept. Microelectronics and Information Technology Royal Institute of Technology, KTH. Promela and SPIN

Promela and SPIN. Mads Dam Dept. Microelectronics and Information Technology Royal Institute of Technology, KTH. Promela and SPIN Promela and SPIN Mads Dam Dept. Microelectronics and Information Technology Royal Institute of Technology, KTH Promela and SPIN Promela (Protocol Meta Language): Language for modelling discrete, event-driven

More information

Semantic Analysis. CSE 307 Principles of Programming Languages Stony Brook University

Semantic Analysis. CSE 307 Principles of Programming Languages Stony Brook University Semantic Analysis CSE 307 Principles of Programming Languages Stony Brook University http://www.cs.stonybrook.edu/~cse307 1 Role of Semantic Analysis Syntax vs. Semantics: syntax concerns the form of a

More information

EECS150 - Digital Design Lecture 20 - Finite State Machines Revisited

EECS150 - Digital Design Lecture 20 - Finite State Machines Revisited EECS150 - Digital Design Lecture 20 - Finite State Machines Revisited April 2, 2009 John Wawrzynek Spring 2009 EECS150 - Lec20-fsm Page 1 Finite State Machines (FSMs) FSM circuits are a type of sequential

More information

Semantic Analysis. Role of Semantic Analysis

Semantic Analysis. Role of Semantic Analysis Semantic Analysis Chapter 4 Role of Semantic Analysis Following parsing, the next two phases of the "typical" compiler are semantic analysis (intermediate) code generation The principal job of the semantic

More information

Control in Sequential Languages

Control in Sequential Languages CS 242 2012 Control in Sequential Languages Reading: Chapter 8, Sections 8.1 8.3 (only) Section 7.3 of The Haskell 98 Report, Exception Handling in the I/O Monad, http://www.haskell.org/onlinelibrary/io-13.html

More information

Object-based representation. Objects

Object-based representation. Objects Object-based representation Luger, Part III, 6.0, 6.1, 6.2.2-6.2.4, 6.4 (skim) Objects Two basic forms of Structured Objects Semantic Nets Frames Semantic Nets (Associative Nets) Components Nodes - represent

More information

Topic III. LISP : functions, recursion, and lists References: Chapter 3 of Concepts in programming languages by J. C. Mitchell. CUP, 2003.

Topic III. LISP : functions, recursion, and lists References: Chapter 3 of Concepts in programming languages by J. C. Mitchell. CUP, 2003. Topic III LISP : functions, recursion, and lists References: Chapter 3 of Concepts in programming languages by J. C. Mitchell. CUP, 2003. Chapters 5( 4.5) and 13( 1) of Programming languages: Design and

More information

Semantic Analysis. Outline. The role of semantic analysis in a compiler. Scope. Types. Where we are. The Compiler Front-End

Semantic Analysis. Outline. The role of semantic analysis in a compiler. Scope. Types. Where we are. The Compiler Front-End Outline Semantic Analysis The role of semantic analysis in a compiler A laundry list of tasks Scope Static vs. Dynamic scoping Implementation: symbol tables Types Static analyses that detect type errors

More information

Computing Fundamentals 2 Introduction to CafeOBJ

Computing Fundamentals 2 Introduction to CafeOBJ Computing Fundamentals 2 Introduction to CafeOBJ Lecturer: Patrick Browne Lecture Room: K408 Lab Room: A308 Based on work by: Nakamura Masaki, João Pascoal Faria, Prof. Heinrich Hußmann. See notes on slides

More information

Intelligent Systems: Reasoning and Recognition. Rule based programming - Forward chaining

Intelligent Systems: Reasoning and Recognition. Rule based programming - Forward chaining Intelligent Systems: Reasoning and Recognition James L. Crowley ENSIMAG 2 / MoSIG M1 Second Semester 2015/2016 Lesson 13 1 April 2016 Rule based programming - Forward chaining Production Systems...2 Production

More information

Situation Calculus and YAGI

Situation Calculus and YAGI Situation Calculus and YAGI Institute for Software Technology 1 Progression another solution to the projection problem does a sentence hold for a future situation used for automated reasoning and planning

More information

Resolution in FO logic (Ch. 9)

Resolution in FO logic (Ch. 9) Resolution in FO logic (Ch. 9) Review: CNF form Conjunctive normal form is a number of clauses stuck together with ANDs Each clause can only contain ORs, and logical negation must appears right next to

More information

Notes for Chapter 12 Logic Programming. The AI War Basic Concepts of Logic Programming Prolog Review questions

Notes for Chapter 12 Logic Programming. The AI War Basic Concepts of Logic Programming Prolog Review questions Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions The AI War How machines should learn: inductive or deductive? Deductive: Expert => rules =>

More information

Intelligent Systems: Reasoning and Recognition. CLIPS: RULE Syntax, Actions, The RETE Algorithm. Production System Architecture...

Intelligent Systems: Reasoning and Recognition. CLIPS: RULE Syntax, Actions, The RETE Algorithm. Production System Architecture... Intelligent Systems: Reasoning and Recognition James L. Crowley ENSIMAG 2 / MoSIG M1 Second Semester 2014/2015 Lesson 5 25 February 2015 CLIPS: RULE Syntax, Actions, The RETE Algorithm Production System

More information

Lecture 17 of 41. Clausal (Conjunctive Normal) Form and Resolution Techniques

Lecture 17 of 41. Clausal (Conjunctive Normal) Form and Resolution Techniques Lecture 17 of 41 Clausal (Conjunctive Normal) Form and Resolution Techniques Wednesday, 29 September 2004 William H. Hsu, KSU http://www.kddresearch.org http://www.cis.ksu.edu/~bhsu Reading: Chapter 9,

More information

Java Review. Fundamentals of Computer Science

Java Review. Fundamentals of Computer Science Java Review Fundamentals of Computer Science Link to Head First pdf File https://zimslifeintcs.files.wordpress.com/2011/12/h ead-first-java-2nd-edition.pdf Outline Data Types Arrays Boolean Expressions

More information

9/19/12. Why Study Discrete Math? What is discrete? Sets (Rosen, Chapter 2) can be described by discrete math TOPICS

9/19/12. Why Study Discrete Math? What is discrete? Sets (Rosen, Chapter 2) can be described by discrete math TOPICS What is discrete? Sets (Rosen, Chapter 2) TOPICS Discrete math Set Definition Set Operations Tuples Consisting of distinct or unconnected elements, not continuous (calculus) Helps us in Computer Science

More information

Predicate Calculus. Problems? Syntax. Atomic Sentences. Complex Sentences. Truth

Predicate Calculus. Problems? Syntax. Atomic Sentences. Complex Sentences. Truth Problems? What kinds of problems exist for propositional logic? Predicate Calculus A way to access the components of an individual assertion Predicate Calculus: used extensively in many AI programs, especially

More information

Process Modelling. Fault Tolerant Systems Research Group. Budapest University of Technology and Economics

Process Modelling. Fault Tolerant Systems Research Group. Budapest University of Technology and Economics Process Modelling Budapest University of Technology and Economics Fault Tolerant Systems Research Group Budapest University of Technology and Economics Department of Measurement and Information Systems

More information

CS558 Programming Languages

CS558 Programming Languages CS558 Programming Languages Fall 2017 Lecture 2a Andrew Tolmach Portland State University 1994-2017 Review: Expressions Inspired by familiar mathematical notation Usually have recursive (tree-like) structure

More information

Chapter 11 :: Functional Languages

Chapter 11 :: Functional Languages Chapter 11 :: Functional Languages Programming Language Pragmatics Michael L. Scott Copyright 2016 Elsevier 1 Chapter11_Functional_Languages_4e - Tue November 21, 2017 Historical Origins The imperative

More information

CS 3512, Spring Instructor: Doug Dunham. Textbook: James L. Hein, Discrete Structures, Logic, and Computability, 3rd Ed. Jones and Barlett, 2010

CS 3512, Spring Instructor: Doug Dunham. Textbook: James L. Hein, Discrete Structures, Logic, and Computability, 3rd Ed. Jones and Barlett, 2010 CS 3512, Spring 2011 Instructor: Doug Dunham Textbook: James L. Hein, Discrete Structures, Logic, and Computability, 3rd Ed. Jones and Barlett, 2010 Prerequisites: Calc I, CS2511 Rough course outline:

More information

Chapter 3. Describing Syntax and Semantics

Chapter 3. Describing Syntax and Semantics Chapter 3 Describing Syntax and Semantics Chapter 3 Topics Introduction The General Problem of Describing Syntax Formal Methods of Describing Syntax Attribute Grammars Describing the Meanings of Programs:

More information

Overview (4) CPE 101 mod/reusing slides from a UW course. Assignment Statement: Review. Why Study Expressions? D-1

Overview (4) CPE 101 mod/reusing slides from a UW course. Assignment Statement: Review. Why Study Expressions? D-1 CPE 101 mod/reusing slides from a UW course Overview (4) Lecture 4: Arithmetic Expressions Arithmetic expressions Integer and floating-point (double) types Unary and binary operators Precedence Associativity

More information

Fuzzy Reasoning. Outline

Fuzzy Reasoning. Outline Fuzzy Reasoning Outline Introduction Bivalent & Multivalent Logics Fundamental fuzzy concepts Fuzzification Defuzzification Fuzzy Expert System Neuro-fuzzy System Introduction Fuzzy concept first introduced

More information

HOL DEFINING HIGHER ORDER LOGIC LAST TIME ON HOL CONTENT. Slide 3. Slide 1. Slide 4. Slide 2 WHAT IS HIGHER ORDER LOGIC? 2 LAST TIME ON HOL 1

HOL DEFINING HIGHER ORDER LOGIC LAST TIME ON HOL CONTENT. Slide 3. Slide 1. Slide 4. Slide 2 WHAT IS HIGHER ORDER LOGIC? 2 LAST TIME ON HOL 1 LAST TIME ON HOL Proof rules for propositional and predicate logic Safe and unsafe rules NICTA Advanced Course Forward Proof Slide 1 Theorem Proving Principles, Techniques, Applications Slide 3 The Epsilon

More information

An Introduction to Subtyping

An Introduction to Subtyping An Introduction to Subtyping Type systems are to me the most interesting aspect of modern programming languages. Subtyping is an important notion that is helpful for describing and reasoning about type

More information

CSc 372. Comparative Programming Languages. 2 : Functional Programming. Department of Computer Science University of Arizona

CSc 372. Comparative Programming Languages. 2 : Functional Programming. Department of Computer Science University of Arizona 1/37 CSc 372 Comparative Programming Languages 2 : Functional Programming Department of Computer Science University of Arizona collberg@gmail.com Copyright c 2013 Christian Collberg 2/37 Programming Paradigms

More information

CS 387: GAME AI TACTIC AND STRATEGY

CS 387: GAME AI TACTIC AND STRATEGY CS 387: GAME AI TACTIC AND STRATEGY 5/16/2017 Instructor: Santiago Ontañón so367@drexel.edu Class website: https://www.cs.drexel.edu/~santi/teaching/2017/cs387/intro.htm Outline Projects 1/2 Tactic and

More information

UNIT 3A Algorithmic Thinking Principles of Computing, Carnegie Mellon University GUNA

UNIT 3A Algorithmic Thinking Principles of Computing, Carnegie Mellon University GUNA UNIT 3A Algorithmic Thinking Carnegie Mellon University GUNA 1 Algorithms Rule the world Kevin Slavin argues that we're living in a world designed for -- and increasingly controlled by -- algorithms. In

More information

ARTIFICIAL INTELLIGENCE (CS 370D)

ARTIFICIAL INTELLIGENCE (CS 370D) Princess Nora University Faculty of Computer & Information Systems ARTIFICIAL INTELLIGENCE (CS 370D) (CHAPTER-7) LOGICAL AGENTS Outline Agent Case (Wumpus world) Knowledge-Representation Logic in general

More information