CLIPS C Language Integrated Production System Note: Some slides and/or pictures are adapted from Lecture slides / Books of Dr Zafar Alvi.

Slides:



Advertisements
Similar presentations
Introduction to Visual Basic.NET Uploaded By: M.Sheraz anjum.
Advertisements

SYSTEM PROGRAMMING & SYSTEM ADMINISTRATION
The CLIPS Programming Tool History of CLIPS –Influenced by OPS5 and ART –Implemented in C for efficiency and portability –Developed by NASA, distributed.
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.
Simple Rule Based Systems Directly implementing rule based systems in Java Need vocabulary Simplicity sometimes works.
Introduction to CLIPS (Lecture Note #17)
Chapter 7: Introduction to CLIPS
Artificial Intelligence Lecture No. 18 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Creating Rout Paths Using CAMMaster. Step 1 Import Gerber File. Import Gerber File. User Ctrl+W to window around data. User Ctrl+W to window around data.
Chapter 12: Expert Systems Design Examples
Exploring Microsoft Access 2003 Chapter 7 Building Applications: The Switchboard, Macros, and Prototyping.
Lecture Roger Sutton CO331 Visual programming 15: Debugging 1.
Automating Tasks With Macros
Introduction to CLIPS (Chapter 7) Fact List (contains data) Knowledge Base (contains rules) Inference Engine (controls execution)
© 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.
Jess Presentation by Chun Ping Wang. What is Jess? Jess is an expert system shell made for java. Rete pattern algorithm. Purpose. –Jess is best use for.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Course Introduction and Getting Started with C 1 USF - COP C for Engineers Summer 2008.
CS 561, Session 25 1 Introduction to CLIPS Overview of CLIPS Facts Rules Rule firing Control techniques Example.
Programming with Microsoft Visual Basic th Edition
1 01/12/2011Knowledge-Based Systems, Paula Matuszek More Intro to CLIPS Paula Matuszek CSC 9010, Spring, 2011.
Chapter 9: Modular Design, Execution Control, and Rule Efficiency Expert Systems: Principles and Programming, Fourth Edition.
Review Topics Test 1. Background Topics Definitions of Artificial Intelligence & Turing Test Physical symbol system hypothesis vs connectionist approaches.
Expert System Topic 2.
Chapter 11: Introduction to the Visual Basic Environment Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University.
Chapter 1: A First Program Using C#. Programming Computer program – A set of instructions that tells a computer what to do – Also called software Software.
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.
Jess: A Rule-Based Programming Environment Reporter: Yu Lun Kuo Date: April 10, 2006 Expert System.
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.
Expert System Note: Some slides and/or pictures are adapted from Lecture slides / Books of Dr Zafar Alvi. Text Book - Aritificial Intelligence Illuminated.
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>
ENG College of Engineering Engineering Education Innovation Center 1 More Script Files in MATLAB Script File I/O : Chapter 4 1.Global Variables.
VARIABLES Programmes work by manipulating data placed in memory. The data can be numbers, text, objects, pointers to other memory areas, and more besides.
Advanced Pattern Matching. Field constraints Used to restrict the values of a field on LHS of a rule Used to restrict the values of a field on LHS of.
Mobile Programming Lecture 3 Debugging. Lecture 2 Review What widget would you use to allow the user to enter o a yes/no value o a range of values from.
Artificial Intelligence Lecture No. 26 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Working with Themes, Quick Parts, Page Backgrounds, and Headers and Footers Lesson 7.
Artificial Intelligence Lecture No. 24 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Introduction to CLIPS. Expert Systems: Principles and Programming, Fourth Edition2 What is CLIPS? CLIPS is a multiparadigm programming language that provides.
1 Knowledge Based Systems (CM0377) Lecture 10 (Last modified 19th March 2001)
Mr C Johnston ICT Teacher
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.
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.
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.
SEQUENCES. Learning Objectives Generate terms of a simple sequence, given a rule, finding a term from the previous term Generate terms of a simple sequence,
Intelligent Systems JESS constructs.
SQL and SQL*Plus Interaction
Chapter 7: Introduction to CLIPS
Chapter 8: Advanced Pattern Matching
بسم الله الرحمن الرحیم آموزش نرم افزار CLIPS
JESS (Java Expert System Shall)
CPE/CSC 481: Knowledge-Based Systems
Computer Based Tutoring
Presentation transcript:

CLIPS C Language Integrated Production System Note: Some slides and/or pictures are adapted from Lecture slides / Books of Dr Zafar Alvi.

CLIPS Download CLIPS for windows (CLIPSWin.zip) from: c/. Also download the complete documentation including the programming guide from: n/

Commands To leave CLIPS, enter (exit) All commands use ( ) as delimiters, i.e. all commands are enclosed in brackets. A simple command example for adding numbers CLIPS> (+ 3 4) CLIPS is case sensitive

The Deftemplate construct Before facts can be added, we have to define the format for our relations. Each relation consists of: relation name, zero or more slots (arguments of the relation) The Deftemplate construct defines a relation’s structure (deftemplate [ ] e.g. CLIPS> ( deftemplate father “Relation father” (slot fathersName) (slot sonsName) )

Adding facts Facts are added in the predicate format. The deftemplate construct is used to inform CLIPS of the structure of facts. The set of all known facts is called the fact list. To add facts to the fact list, use the assert command, e.g. Facts to add: man(ahmed), father(ahmed, belal), brother(ahmed, chand) CLIPS> (assert ( father ( fatherName “Ahmed”) (sonName “Belal”) ) )

Viewing fact list After adding facts, you can see the fact list using command: (facts). You will see that a fact index is assigned to each fact, starting with 0. For long fact lists, use the format (facts [ [ ]]) For example: (facts 1 10) lists fact numbers 1 through 10

Removing facts The retract command is used to remove or retract facts. For example: (retract 1) removes fact 1 (retract 1 3) removes fact 1 and 3

Modifying facts We add a fact: CLIPS>(assert ( father ( fathersName “Ahmed”) (sonsName “Belal”) ) ) To modify the fathers name slot, enter the following: CLIPS> (modify 2 ( fathersName “Ali Ahmed”)) Notice that a new index is assigned to the modified fact.

The WATCH command The WATCH command is used for debugging programs. It is used to view the assertion and modification of facts. The command is – CLIPS> (watch facts) After entering this command, for subsequent commands, the whole sequence of events will be shown. To turn off this option, use: – (unwatch facts)

The Components of a rule The Defrule construct is used to add rules. Before using a rule the component facts need to be defined. For example, if we have the rule – IF Ali is Ahmed’s father – THEN Ahmed is Ali’s son We enter this into CLIPS using the following construct: ;Rule header (defrule isSon “An example rule” ; Patterns (father (fathersName “ali”) (sonsName “ahmed”) ;THEN => ;Actions (assert (son (sonsName “ahmed”) (fathersName “ali”))) )

The Components of a rule CLIPS attempts to match the pattern of the rules against the facts in the fact list. If all patterns of a rule match, the rule is activated, i.e. placed on the agenda.

Agenda driven control and execution The agenda is the list of activated rules. We use the run command to run the agenda. Running the agenda causes the rules in the agenda to be fired. CLIPS>(run)

Displaying the agenda To display the set of rules on the agenda, enter the command (agenda)

Watching activations and rules You can watch activations in the agenda by entering (watch activations) You can watch rules firing using (watch rules) All subsequent activations and firings will be shown until you turn the watch off using the unwatch command.

Clearing all constructs (clear) clears the working memory

The PRINTOUT command Instead of asserting facts in a rule, you can print out messages using (printout t “Ali is Ahmed’s son” crlf)