KM’s Inference Algorithm Peter Clark Knowledge Systems Boeing Math & Computing Technology.

Slides:



Advertisements
Similar presentations
Kurt Hungerford CSCI The Knowledge Machine is a knowledge representation and reasoning system that allows users to store concepts and relationships.
Advertisements

NP-Hard Nattee Niparnan.
Inference Rules Universal Instantiation Existential Generalization
Semantics Static semantics Dynamic semantics attribute grammars
Knowledge & Reasoning Logical Reasoning: to have a computer automatically perform deduction or prove theorems Knowledge Representations: modern ways of.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Adapted from Scott, Chapter 6:: Control Flow Programming Language Pragmatics Michael L. Scott.
Inference and Reasoning. Basic Idea Given a set of statements, does a new statement logically follow from this. For example If an animal has wings and.
Getting started with ML ML is a functional programming language. ML is statically typed: The types of literals, values, expressions and functions in a.
Functional Programming. Pure Functional Programming Computation is largely performed by applying functions to values. The value of an expression depends.
For Friday No reading Homework: –Chapter 9, exercise 4 (This is VERY short – do it while you’re running your tests) Make sure you keep variables and constants.
Type checking © Marcelo d’Amorim 2010.
ML: a quasi-functional language with strong typing Conventional syntax: - val x = 5; (*user input *) val x = 5: int (*system response*) - fun len lis =
Logic CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Logic.
Knowledge Representation
ISBN Chapter 3 Describing Syntax and Semantics.
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Lecture 9 Jim Martin.
ML: a quasi-functional language with strong typing Conventional syntax: - val x = 5; (*user input *) val x = 5: int (*system response*) - fun len lis =
Functional programming: LISP Originally developed for symbolic computing First interactive, interpreted language Dynamic typing: values have types, variables.
Type Checking  Legality checks  Operator determination  Overload resolution.
Lesson 6. Refinement of the Operator Model This page describes formally how we refine Figure 2.5 into a more detailed model so that we can connect it.
Describing Syntax and Semantics
CHAPTER 10 Recursion. 2 Recursive Thinking Recursion is a programming technique in which a method can call itself to solve a problem A recursive definition.
PLANNING Partial order regression planning Temporal representation 1 Deductive planning in Logic Temporal representation 2.
Maria-Cristina Marinescu Martin Rinard Laboratory for Computer Science Massachusetts Institute of Technology A Synthesis Algorithm for Modular Design of.
INFERENCE IN FIRST-ORDER LOGIC IES 503 ARTIFICIAL INTELLIGENCE İPEK SÜĞÜT.
© 2010 The MITRE Corporation. All rights reserved CPE Prefix Property MythBusters* CPE Core Team Technical Working Group (TWG) 05/11/2010 * This presentation.
Syntax & Semantic Introduction Organization of Language Description Abstract Syntax Formal Syntax The Way of Writing Grammars Formal Semantic.
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions.
Chapter 9 Integrity. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.9-2 Topics in this Chapter Predicates and Propositions Internal vs.
1 Automatic Refinement and Vacuity Detection for Symbolic Trajectory Evaluation Orna Grumberg Technion Haifa, Israel Joint work with Rachel Tzoref.
מבוא מורחב 1 Review: scheme language things that make up scheme programs: self-evaluating 23, "hello", #t names +, pi combinations (+ 2 3) (* pi 4) special.
Knowledge Representation CPTR 314. The need of a Good Representation  The representation that is used to represent a problem is very important  The.
Logical Agents Logic Propositional Logic Summary
1 Knowledge Representation. 2 Definitions Knowledge Base Knowledge Base A set of representations of facts about the world. A set of representations of.
Slide: 1 Copyright © AdaCore Subprograms Presented by Quentin Ochem university.adacore.com.
Overview Concept Learning Representation Inductive Learning Hypothesis
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
Chapter 3 Part II Describing Syntax and Semantics.
Automated Reasoning Early AI explored how to automate several reasoning tasks – these were solved by what we might call weak problem solving methods as.
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
UMass Lowell Computer Science Java and Distributed Computing Prof. Karen Daniels Fall, 2000 Lecture 9 Java Fundamentals Objects/ClassesMethods Mon.
Basic Scheme February 8, 2007 Compound expressions Rules of evaluation Creating procedures by capturing common patterns.
ANU COMP2110 Software Design in 2003 Lecture 10Slide 1 COMP2110 Software Design in 2004 Lecture 12 Documenting Detailed Design How to write down detailed.
1/33 Basic Scheme February 8, 2007 Compound expressions Rules of evaluation Creating procedures by capturing common patterns.
Reasoning with Propositional Logic automated processing of a simple knowledge base CD.
An Object-Oriented Approach to Programming Logic and Design Chapter 5 Making Decisions.
Lecture 5 Frames. Associative networks, rules or logic do not provide the ability to group facts into associated clusters or to associate relevant procedural.
Overview of Compilation Prepared by Manuel E. Bermúdez, Ph.D. Associate Professor University of Florida Programming Language Principles Lecture 2.
Knowledge Engineering. Sources of Knowledge - Books - Journals - Manuals - Reports - Films - Databases - Pictures - Audio and Video Tapes - Flow Diagram.
Definition and Technologies Knowledge Representation.
KM: The Knowledge Machine A knowledge representation and reasoning system Peter Clark Knowledge Systems Boeing Math and Computing Technology.
Artificial Intelligence Logical Agents Chapter 7.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Basic Scheme February 8, 2007 Compound expressions Rules of evaluation
ML: a quasi-functional language with strong typing
Knowledge Representation
Elementary Metamathematics
The Metacircular Evaluator
Artificial Intelligence
Artificial Intelligence: Logic agents
3. Decision Structures Rocky K. C. Chang 19 September 2018
6.001 SICP Variations on a Scheme
Semantic Nets and Frames
Lecture 2 מבוא מורחב.
This Lecture Substitution model
Lecture 2 מבוא מורחב.
Presentation transcript:

KM’s Inference Algorithm Peter Clark Knowledge Systems Boeing Math & Computing Technology

The Top-Level KM Algorithm An atomic value returns itself Otherwise, apply a set of rewrite rules to decompose the expression Decomposing a KM expression corresponds to breaking up its equivalent logical expression KM: (the age of (the spouse of Pete)) -> find x, (the spouse of Pete) -> find (the age of x) LOGIC: {y | spouse(Pete,x), age(x,y)} -> find x in spouse(Pete,x) -> find y in age(x,y) Eventually, decomposed to KM’s basic operations If an instance changes, re-check its classification

The Top-Level KM Algorithm PROCEDURE km(expr) -> values If expr is an atomic value, return expr Else: REWRITES: PATTERN:REWRITE AS: (the slot of expr)km(expr) -> f, km(the slot of f) (allof expr where test)km(expr) -> set, return i in set if km(test) (if test then expr)km(test) -> boolean, if boolean then km(expr)... PRIMITIVES: (instance has slotsvals) : Assert in KB (every class has slotsvals) : Assert in KB (a class has slotsvals) : Generate Skolem, then assert in KB (the slot of frame) (frame1 & frame2) (set1 && set2) PROCEDURE classify(instance) If instance’s properties change then check its classification

1. Computing the value of a slot Corresponds to: –find all the x where slot(instance,x) is true –(or, can think of slot as a function on instance) Algorithm: –Collect all the information about instance’s slot local inherited –Evaluate and combine that information

1. Computing the value of a slot ;;; Working on an individual clause PROCEDURE: (the slot of frame) -> values 1. Find the set of "local" values on frame's slot [projection, subslots, global situation] 2. a. Find all the classes of frame b. For each class, find the set of values on the class's slot 3. Set-unify the sets together km(set1 && set2 &&..) [For single-valued slots, do km(set1 & set2 & set3...)] 4. a. Find the local and inherited constraints on the slot b. Check and enforce those constraints 5. Assert the resulting values on the frame's slot 6. Return the final set of values *Fred age: 32 Person age: (a Number)

2. Unification (asserting equality) The syntactic process of merging two data structures corresponds to the semantic process of asserting equality –if x = y, then all things true of x will be true of y, and vice versa so the data structure denoting things true of x will also be part of the data structure denoting things true of y, and vice versa

2. Unification (asserting equality) PROCEDURE: (frame1 & frame2) -> frame12 1. Choose a name for the unified frame frame12 2. For the slots used in frame1 and frame2: a. Find the values vals1 of slot on frame1 b. Find the values vals2 of slot on frame2 c. Create a new structure (slot ((vals1 && vals2))) d. Find constraints on slot (in vals1, vals2, and inherited) Check that vals1, vals2, and (vals1 && vals2) don't violate constraints 3. Assemble these pieces together (frame12 has (slot1 ((vals1 && vals2))) (slot2 ((vals1 && vals2)))...) 4. Assert it in the KB 5. "Bind" frame1 and frame2 to frame12 *Fred age: 32 owns: _Car1 _Person2 owns: _Car2 & Binding List: _Person2 -> *Fred *Fred age: 32 owns: ((_Car1) && (_Car2))

3. Set Unification Goal is to “sensibly” combine information from different frames together Can think of this as: –non-deductive inference step –deductive based on an additional coreference algorithm

3. Set Unification PROCEDURE: (set1 && set2) -> set12 1. For each value v in set1 a. Find a value v' in set2 a. whose classes are equal/generalization/specialization of v's b. which can be consistently unified with v b. If there is a v' then add (v & v') to set12, and remove v' from set2 else add v to set12 2. Add remaining values in set2 to set12 3. Return set12 (_Cat1 _Dog1) && ((a Cat) (a Dog)) -> (_Cat1 _Dog1)

The next level of detail Situations, projection Caching Explanation Automatic classification Text generation Defaults KB loading/saving/checking Loop detection Recursive calls Prototypes

Further Reading The KM Manuals The KM Tutorial –powerpoint “Building Knowledge Bases from Reusable Components” AAAI’97 –paper, describes an example of the interleaving of backward chaining (path following) and automatic classification “Using Access Paths to Guide Inference with Conceptual Graphs”, ICCS’97 –paper and animated powerpoint. Describes KM’s top-level algorithm in detail, along with a worked example. –The powerpoint gives an animation of this inferencing in operation. Short note on the implementation of situations –technical note All available at: