Introduction to CLIPS (Chapter 7) Fact List (contains data) Knowledge Base (contains rules) Inference Engine (controls execution)

Slides:



Advertisements
Similar presentations
Expert systems CLIPS Seyed Hashem Davarpanah
Advertisements

Chapter 3: Editing and Debugging SAS Programs. Some useful tips of using Program Editor Add line number: In the Command Box, type num, enter. Save SAS.
© 2010 Delmar, Cengage Learning Chapter 9: Using ActionScript.
Introduction to CLIPS COMP 474/674 FALL 2003 Michelle Khalifé.
The CLIPS Programming Tool History of CLIPS –Influenced by OPS5 and ART –Implemented in C for efficiency and portability –Developed by NASA, distributed.
CLIPS 1 Expert Systems Dr. Samy Abu Nasser. CLIPS 2 Course Overview u Introduction u CLIPS Overview u Concepts, Notation, Usage u Knowledge Representation.
November 2, 2004AI: CLIPS Language Tutorial1 CLIPS Michael Scherger Department of Computer Science Kent State University.
Expert System Shells - Examples
Samad Paydar Ferdowsi University of Mashhad.  C Language Integrated Production System (CLIPS)  A tool for building expert systems  An expert system.
1 01/12/2011Knowledge-Based Systems, Paula Matuszek Intro to CLIPS Paula Matuszek CSC 9010, Spring, 2011.
November 2, 2004AI: CLIPS Language Tutorial1 Artificial Intelligence CLIPS Language Tutorial Michael Scherger Department of Computer Science Kent State.
Chapter 8 Pattern Matching
© C. Kemke CLIPS 1 1 COMP 4200: Expert Systems Dr. Christel Kemke Department of Computer Science University of Manitoba.
Introduction to CLIPS (Lecture Note #17)
Chapter 7: Introduction to CLIPS
CLIPS C Language Integrated Production System Note: Some slides and/or pictures are adapted from Lecture slides / Books of Dr Zafar Alvi.
Artificial Intelligence Lecture No. 18 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
1 Computer Science Department California Polytechnic State University San Luis Obispo, CA, U.S.A. CPE/CSC 481: Knowledge-Based Systems Franz J. Kurfess.
Chapter 12: Expert Systems Design Examples
© Franz J. Kurfess CLIPS 1 CPE/CSC 481: Knowledge-Based Systems Dr. Franz J. Kurfess Computer Science Department Cal Poly.
Introduction to Oracle9i: SQL1 Basic SQL SELECT Statements.
Mary Lou Maher MIT Fall 2002 Jess: A Production System Language Agent-Based Virtual Worlds.
© C. Kemke CLIPS 1 1 COMP 4200: Expert Systems Dr. Christel Kemke Department of Computer Science University of Manitoba.
© C. Kemke Control 1 COMP 4200: Expert Systems Dr. Christel Kemke Department of Computer Science University of Manitoba.
Chapter 8: Advanced Pattern Matching Expert Systems: Principles and Programming, Fourth Edition.
Chapter 9: Modular Design, Execution Control, and Rule Efficiency Expert Systems: Principles and Programming, Fourth Edition.
Introduction to Jess.
CS 561, Session 25 1 Introduction to CLIPS Overview of CLIPS Facts Rules Rule firing Control techniques Example.
Lesson 4: Formatting the Worksheet
1 01/12/2011Knowledge-Based Systems, Paula Matuszek More Intro to CLIPS Paula Matuszek CSC 9010, Spring, 2011.
Chapter 2 Basic SQL SELECT Statements
Chapter 9: Modular Design, Execution Control, and Rule Efficiency Expert Systems: Principles and Programming, Fourth Edition.
Expert System Topic 2.
Chapter 2 Basic SQL SELECT Statements Oracle 10g: SQL.
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 7 INTRODUCTION TO STRUCTURED QUERY LANGUAGE (SQL) Instructor Ms. Arwa.
1 Programming a Knowledge Based Application. 2 Overview.
Chapter 7: Introduction to CLIPS Expert Systems: Principles and Programming, Fourth Edition.
Artificial Intelligence Lecture No. 17 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Chapter 10: Procedural Programming Expert Systems: Principles and Programming, Fourth Edition.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Week 1 Algorithmization and Programming Languages.
Jess: A Rule-Based Programming Environment Reporter: Yu Lun Kuo Date: April 10, 2006 Expert System.
Java Expert System Shell JESS 報告者 : 江梓安. Why we need an expert systems? Conventional programming languages Conventional programming languages Complex.
Chapter 7: Introduction to CLIPS Presented By: Farnaz Ronaghi.
IMSS013 CLIPS. 2 Background CLIPS is an expert system tool developed by the Software Technology Branch (STB), NASA/Lyndon B. Johnson Space Center. First.
Computer Science Department California Polytechnic State University San Luis Obispo, CA, U.S.A. Franz J. Kurfess CPE/CSC 481: Knowledge-Based Systems.
Expert Systems Chapter 7 Introduction to CLIPS Entering and Exiting CLIPS A> CLIPS  CLIPS (V6.5 09/01/97) CLIPS> exit exit CLIPS> (+ 3 4)  7 CLIPS>
Python Primer 1: Types and Operators © 2013 Goodrich, Tamassia, Goldwasser1Python Primer.
Introduction to CLIPS. Expert Systems: Principles and Programming, Fourth Edition2 What is CLIPS? CLIPS is a multiparadigm programming language that provides.
 2003 Prentice Hall, Inc. All rights reserved. 1 IS 0020 Program Design and Software Tools Preprocessor Midterm Review Lecture 7 Feb 17, 2004.
Artificial Intelligence Lecture No. 19 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Artificial Intelligence Lecture No. 23 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
1 Chapter 2 Basic SQL SELECT Statements. 2 Chapter Objectives Distinguish between an RDBMS and an ORDBMS Identify keywords, mandatory clauses, and optional.
Mostly adopted from Jason Morris notes (Morris Technical Solutions)
Artificial Intelligence Lecture No. 22 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
ORAFACT Text Processing. ORAFACT Searching Inside Files grep - searches for patterns within files grep [options] [[-e] pattern] filename [...] -n shows.
The CLIPS Expert System Shell Dr Nicholas Gibbins
Summary for final exam Agent System..
Introduction to CLIPS 2 Session 13 Course: T0273 – EXPERT SYSTEMS Year: 2014.
Jörg Kewisch, June 10, 2013, LILUG Meeting CLIPS C Language Integrated Production System Developed at the Software Development Branch, NASA Lyndon B. Johnson.
Intelligent Systems JESS constructs.
Chapter 1: Introduction to computers and C++ Programming
MS-Excel Part 1.
Chapter 7: Introduction to CLIPS
Chapter 8: Advanced Pattern Matching
بسم الله الرحمن الرحیم آموزش نرم افزار CLIPS
Chapter 11: Classes, Instances, and Message-Handlers
JESS (Java Expert System Shall)
CPE/CSC 481: Knowledge-Based Systems
Computer Based Tutoring
Presentation transcript:

Introduction to CLIPS (Chapter 7) Fact List (contains data) Knowledge Base (contains rules) Inference Engine (controls execution)

Overview n CLIPS is a programming language that provides support for rule-based, object- oriented and procedural programming. n The search in the Inference Engine uses forward chaining and rule prioritization. n Looks like LISP (List Processing) with object features.

Object Features n CLIPS Object-Oriented Language (COOL) is a hybrid of features found in Common Lisp Object and SmallTalk. n Example: object template or frame for a bearing – (deftemplate bearing (slot type) (slot size) (slot load) (slot lubrication) (slot max_temperature)...)

Car Frame or Template Example SlotsFillers Namecar name Typesedan, sports, station_wagon.. ManufacturerGM, Ford, Chrysler, Toyota... OwnerName of owner Wheels4, 6 Transmissionmanual, automatic Enginegasoline, diesel, methanol Conditionlemon, OK, peach Under-warrantyno, yes

Car Instance Example SlotsFillers NameAlice’s car Typestation_wagon ManufacturerGM OwnerAlice M. Agogino Wheels4 Transmissionmanual Enginegasoline ConditionOK Under-warrantyyes

Notation n Everything in parentheses is to be entered exactly are shown within the parentheses. (exit) or ( ) n Square brackets indicate that the contents are optional. (example [1]) n Pointed brackets indicate that a replacement is to be made with a value of the type specified within the brackets. (example )

Elementary Math Operators n Arithmetic – Addition ( ) – Subtraction ( ) – Multiplication (* 6 3 2) – Division (/ 6 3 2) n Logical Arithmetic – (> 6 3 2) – (< 6 3 2)

Notation wild cards n A * following a description indicates that the description can be replaced with zero or one or more occurrences of the value, separated by spaces. n A + following a description indicates that the description can be replaced with one or more occurrences of the value, separated by spaces. n + is equivalent to * n A vertical bar | indicates a choice among one or more of the items separated by the bars. n A | B | C means (A, B or C).

Fields n Tolkens represent groups of characters that have special meaning in CLIPS. n Fields or CLIPS primitive data types are groups of tokens. n Seven types of Fields – Float – Integer – Symbol – String – External address – Instance name – Instance address

Facts n A “chunk” of information in CLIPS is called a fact. n Facts consist of a relation name followed by zero or more slots and their associated values.

Deftemplate Construct n A template for a fact needs to be defined in order to determine the name and number and types of slots. n (deftemplate [ ] *] n (deftemplate apple “facts about the color of apples” (slot color))

Multifield Slots n Use multislot in cases where you want an undefined zero or more “arity” to the slot. n (deftemplate apple “facts about the color of apples” (multislot color)) n (assert (apple (color red))) n (assert (apple (color green))) n (assert (apple (color red green)))

Adding and Removing Facts n New facts are added with the assert command: (assert +) n Facts can be listed with: (facts) n Facts are numbered sequentially starting with 1. (fact 0 is baseline). n Remove facts with: (retract + ) n Facts can also be duplicated with slot modifications (duplicate 0 (color brown)).

Deffacts Construct n Useful for automatically asserting a set of facts. n Useful for defining initial knowledge. n Assumes template of first item and single slots by default. n (deffacts apple “apple color facts” (apple (color red)) (apple (color green)))

Watch Command n The watch command is for debugging programs. n (watch ) n ): – Facts or Rules – Activations – Statistics & Compilations – Focus or all

Rules n Rules are in the following form: (defrule [ ] * ; condition or left-hand side (LHS) => ; implies * ;action, consequence or right-hand side (RHS) n ( => *) or (IF * *)

Manipulating Constructs n Listing members of a construct: – (list-defrules) – (list-deftemplates) – (list-deffacts) n Display text of a construct with pp (pretty print command): – (ppdefrules ) – (ppdeftemplates ) – (ppdeffacts )

Deleting Constructs n Delete a member by undefining: – (undefrule ) – (undeftemplates ) – (undeffacts ) n Delete all with clear command: (clear)

Load, Save, Print, Break commands n Load and Save files: – (load ) – (save ) n printout command: – (printout *) – Default is usually the terminal. n The set-break command allows the execution to be halted before a rule is fired: (set-break )

Agenda and Execution n A CLIPS program can be made to run with the run command. – (run [ ]) – Where the optional is the maximum number of rules to be fired. n Rules which can be activated are put on the agenda list. n The rule with the highest salience or priority on the agenda is fired.

Pattern Matching: Rules and Facts Agenda FactsRules Inference Engine