5 Pages

Jess101

Course: TCSS 435, Fall 2009
School: Washington
Rating:
 
 
 
 
 

Word Count: 1264

Document Preview

Intelligence TCSS435A Artificial & Knowledge Acquisition Winter 2009 Jess: an Introduction Jess is a first-order logic (FOL) inference engine for developing expert systems in Java. Jess derives from a FOL inference engine written in LISP, named CLIPS. CLIPS is defined as an expert system tool developed by the Software Technology Branch (STB) at the NASA/ Lyndon B. Johnson Space Center. The Java port of...

Register Now

Unformatted Document Excerpt

Coursehero >> Washington >> Washington >> TCSS 435

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
Intelligence TCSS435A Artificial & Knowledge Acquisition Winter 2009 Jess: an Introduction Jess is a first-order logic (FOL) inference engine for developing expert systems in Java. Jess derives from a FOL inference engine written in LISP, named CLIPS. CLIPS is defined as an expert system tool developed by the Software Technology Branch (STB) at the NASA/ Lyndon B. Johnson Space Center. The Java port of CLIPS has consisted mainly in writing a LISP interpreter in Java, under which the native CLIPS runs. Consequently, Jess syntax is that of LISP, and LISP programs can also be interpreted under Jess. How to Program in Jess In the labs, Jess is installed under the G: drive in a folder corresponding to its version the latest one being Jess71p2. It is recommended to work in the directory where your Jess code will be developed. For example, to run the Monkey and Bananas example fullmab.clp located in the folder C:\TCSS435\labs: 1. Start Jess from development folder by invoking at the DOS-prompt G:\Jess71p2\bin\jess.bat: C:\TCSS435\labs>G:\Jess71p2\bin\jess.bat 2. Load the CLIPS file fullmab.clp Jess, the Rule Engine for the Java Platform Copyright (C) 2008 Sandia Corporation Jess Version 7.1p2 11/5/2008 Jess> (batch fullmab.clp) Jess> (reset) Jess> (run) Monkey jumps off the green-couch onto the floor. Monkey walks to t2-2. Jess> 3. Tips o To reinitialize the set of facts, command is (reset). o To run the inference engine, command is (run). o To remove all rules and facts from memory, command is (clear). Whenever you modify the set of rules or the set of facts, it is important to clear the previous knowledge base and working memory entirely by using this (clear) command. Structure of a Jess Program A Jess program has three main parts, which can be separated into several files, like in the Wumpus example, where the facts are separated from the templates and rules: TCSS435A Artificial Intelligence & Knowledge Acquisition Winter 2009 1. Templates declarations, corresponding to classes and attributes declarations, for example: (deftemplate hunter A hunter (slot agent (default Xena)) (slot x (type INTEGER)) (slot y (type INTEGER)) (slot gold (default 0) (type INTEGER)) (slot alive (default TRUE)) ) 2. Rules declarations, corresponding to processes declarations, for example: (defrule desire-to-leave-caves (task think) (hunter (agent ?a)(x ?x)(y ?y)(gold ~0)) (cave (x ?x)(y ?y)(has-exit TRUE)) => (printout t "Having found the gold and killed the wumpus, " ?a " want to leave the caves." crlf) (assert (desire (agent ?a)(strength ?*veryhigh*) (action leavecaves)))) 3. Facts definition, corresponding to problem situation description, populating the working memory, for example: (deffacts caves (worldsize 4 4) (wumpus (x 1) (y 3)) (pit (x 3)(y 1)) (pit (x 3)(y 3)) (pit (x 4)(y 4)) (gold (x 2)(y 3)(amount 10)) (exit (x 1)(y 1)) (nocave (x 2)(y 4)) (hunter (agent Xena))) Jess Syntax Jess syntax is that of Lisp, with the addition of rules, templates, and facts concepts. 1. Lisp syntax: Symbols: can be letters, digits and punctuation symbols. Symbols cannot start with a digit. They are case sensitive. Example: hunter, _abc. Numbers: can be integer, long, and floating point numbers. Example: 1, 4.2. Strings: are enclosed in double quotes (). Example: Hello. Lists: are composed of a set of parentheses enclosing symbols. Example: (+ 1 2) represents the 1 + 2 and will return the value 3. Comments: are preceded by a semi-colon, or enclosed within /* and */. Example: ; comment. Function calls: there is no operator, only function calls. All function calls are lists where the function is the leftmost symbol. Example: (+ (+ 2 3) (* 3 3)). TCSS435A Artificial Intelligence & Knowledge Acquisition Winter 2009 Printout: is used to display a message. Example: (printout t Hello world ! crlf). Variables: start with the question mark ? character. Variables do not have to be declared before being used. Assignment of a value to a variable can be obtained with (bind ?x 2). Example: ?x. Global variables: defined are with a defglobal function. All other variables are local to the rules in which they will be used. Example: (defglobal ?*highest* = 6 ? *veryhigh* = 5 ). Branching: is defined by if then else pattern. Example: (if (> ?x 100) then (printout t X is large crlf) else (printout t X is small crlf) ) 2. Template syntax: Templates are composed of a name and slots corresponding to variables. Inheritance can be defined between templates. A slot can have a type within INTEGER, FLOAT, NUMBER, SYMBOL, STRING, LONG, LEXEME, and OBJECT. 3. Fact syntax: Facts can be added or removed from the working memory. Add a fact: assert the fact. Example: (assert (goal (action ?act) (x ?x) (y ?y) )). Remove a fact: retract the fact. Example: (retract ?desire). Modify a fact: modify the fact. Example: (modify ?f (has-wumpus FALSE)). 4. Rule syntax: A rule is composed of a left-hand side (LHS) containing conditions or a pattern to be matched against the facts in working memory, and a right-hand side (RHS) containing actions or consequents. A rule of the form IF LHS THEN RHS is expressed in Jess as: (defrule rule-name (LHS) => (RHS) ) Both LHS and RHS are fully parenthesized expressions. LHS conditions are prefixed by an AND which is implicit (not represented). Boolean expressions use operators such as <= (less equal), == (equals), <> or != (not equals), && (and), || (or). It is recommended to look at several rules to try to understand the many different ways rules can be expressed. Some examples are represented below. Example 1: (defrule safe-cave (task think) ?f <- (cave (x ?x)(y ?y) (has-wumpus FALSE)(has-pit FALSE)(safe UNKNOWN)) => TCSS435A Artificial Intelligence & Knowledge Acquisition Winter 2009 (printout t "With neither wumpus nor pit, (" ?x "," ?y ") is safe." crlf) (modify ?f (safe TRUE))) This rule will be executed when the working memory contains both a fact with a variable name task of value think and a cave template instance with slots has-wumpus with value FALSE, has-pit with value FALSE, slot safe with value UNKNOWN, and any value for slots x and y. In addition, the LHS of the rule stores the cave fact in a variable ?f (remember that variables do not have to be declared in advance, and are local to the rule). This saving of the fact is necessary because the rule will modify the cave slot values. Therefore the LHS of the rule will make the rule e...

Textbooks related to the document above:
Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Mercer - ETM - 645
ETM 645-8 (Spring '09) Lesson: Integer Problems Heuristics and Local Improvement Algorithms Objectives:1. Define and understand benefits of heuristics or in-exact methods. 2. Review heuristics for the Knapsack problem, Scheduling problems, and TSP
Mercer - EGR - 312
EGR 312-8 (Summer '08) Lesson: Annual Worth Analysis Objectives: 1. 2. 3. 4. Select best alternative from an Annual Worth (AW) perspective. Describe advantages of an AW approach. Describe and calculate capital recovery (CR). Calculate the Annual Wort
Allan Hancock College - TPDAR - 200012000
TELECOMMUNICATIONS (SERVICE PROVIDER DETERMINATIONS) AMENDMENT REGULATIONS 2000 (NO. 1) 2000 NO. 246 TELECOMMUNICATIONS (SERVICE PROVIDER DETERMINATIONS) AMENDMENT REGULATIONS 2000 (NO. 1) 2000 NO. 246 - TABLE OF PROVISIONS1. Name of Regulation
Allan Hancock College - TAAR - 200412004
TAXATION ADMINISTRATION AMENDMENT REGULATIONS 2004 (NO. 1) 2004 NO. 112 TAXATION ADMINISTRATION AMENDMENT REGULATIONS 2004 (NO. 1) 2004 NO. 112 - TABLE OF PROVISIONS1. Name of Regulations 2. Commencement 3. Amendment of Taxation Adminis
Winona - COURSE - 104
Water PollutionTypes and Sources of Water Pollution #1 problem - Eroded soils Organic wastes, disease-causing agents Chemicals, nutrients Radioactive stuff, heatPoint and Nonpoint SourcesNONPOINT SOURCES Rural homesUrban streetsCropland
Winona - BIO - 241
Bio 241 Laboratory Worksheet Lab 12-13 Names _ _ _ _ Please hand in one worksheet per lab group (4 students). 1. Briefly describe why each of these suspects was chosen to undergo this particular experiment.2. Briefly describe RFLP analysis. How doe
UCSC - ASTR - 1110
ASTR 1110 Midterm Evaluation 15 June 20051. How much do you think you're learning in this class? a. b. c. d. e. OMGWTF, I never knew anything about all this! Lots A reasonable amount Not so much Nothing I couldn't get of the internet2. How is the
Maine - STA - 582
BostonCrime4139504043384435393529495059633239475360575270907462558494701081391209712614915812414010911477120133110929778991071129098125155190236189174178136161171149184155276224213
Maine - MAT - 212
University of Southern Maine College of Arts and Sciences Department of Mathematics and StatisticsSpring 2007 MAT 212: Statistics Policy Statement and Course InformationInstructor: Dr. AbouEl-Makarim Aboueissa &quot;Abou&quot; Office/Phone: (301C Payson/228
Maine - MAT - 210
Will be updated
Maine - STA - 582
SunSpots15.317.716.58.69.59.13.19.34.76.17.415.117.514.211.76.824.115.911.98.916.820.115.817.028.224.425.348.745.347.756.751.250.257.257.270.4110.993.6111.869.586.567.391.5107.276.888.294.3126.4121.81
Maryland - G - 342
G342 Sedimentation and Stratigraphy Laboratory 10 Assoc. Prof. A Jay Kaufman 25 April 2005Name:_Graphic expression of correlation A statistical view of the time equivalence of stratigraphic levels in two or more sections is accomplished by plotti
NJIT - CS - 111
Midterm1 Practice Problems Part A Define a class called Triangle There should be 2 data pieces as follows: int base int height There should be 6 methods as follows: getHeight getBase setHeight setBase getArea toString The constructor should set the v
NJIT - CS - 104
Midterm Exam Review: Lectures/Topics -1A-B, 2A-B (how to create a webpage and launch it on the web), 3A, 5A, Integer and Floating-point binary representation, 6A, 7A, 8A, 11A, E-R Diagram, Relational Model, SQL (up to (not including) sub queries). Ex
Wyoming - CS - 2150
Cosc 2150Chapter 17 Micro-programmed ControlMicro-programmed Control Use sequences of instructions (chapter 16) to control complex operations Called microprogramming or firmwareImplementation (1) All the control unit does is generate a set
NJIT - CS - 114
Chapter 5 (continued)Linked Lists 2006 Pearson Addison-Wesley. All rights reserved5 B-1A Reference-Based Implementation of the ADT List A reference-based implementation of the ADT list Does not shift items during insertions and deletions D
NJIT - CS - 114
Chapter 4 Data Abstraction: The Walls 2006 Pearson Addison-Wesley. All rights reserved4-1Abstract Data Types Modularity Keeps the complexity of a large program manageable by systematically controlling the interaction of its components Isolat
NJIT - CS - 280
Programming Languages2nd edition Tucker and NoonanChapter 7 Semantics Surely all this is not without meaning.Ishmael, Moby Dick by Herman MelvilleCopyright 2006 The McGraw-Hill Companies, Inc.Contents7.1 7.2 7.3 7.4 7.5 7.6 7.7 Motivation E
NJIT - CS - 114
public class Sorts { public static &lt;T extends Comparable&lt;T&gt; void heapSort(T[] array) { } public static &lt;T extends Comparable&lt;T&gt; void mergeSort(T[] array) { } public static &lt;T extends Comparable&lt;T&gt; void quickSort(T[] array) {
NJIT - CIS - 663
Software Requirements Specification DocumentVersion 1.0 December 8, 2002Created by: Mohammad Ali Peishih ChangNkechi Nnadi Hongfang Shen Tiffany Small2Table of ContentsTable of Contents..3 1. Introduction.4 1.1 Purpose ..4 1.2
New Mexico - EPS - 365
Extra-Solar Planetary SystemsIn 1995, a breakt hrough: t he f irst planet around anot her st ar.Didier Queloz and Michel MayorA Swiss t eam discovers a planet 51 Pegasi 48 light years from Eart h.Artist's concept of an extrasolar planet (
New Mexico - EPS - 465
Mars Evolution EPS 465/565 Mid-term Exam Spring 2009 Answer each question for 100 pts full credit, total exam: 100 pts. This exam is worth 25% of your final grade. Please turn in your answers as an email attachment (MS Word file or PDF) to agee@unm.e
Allan Hancock College - PWCAB - 2006343
2004-2005-2006 THE PARLIAMENT OF THE COMMONWEALTH OF AUSTRALIA THE SENATE PUBLIC WORKS COMMITTEE AMENDMENT BILL 2006 EXPLANATORY MEMORANDUM
New Mexico - MGMT - 720
Statistics for Business and EconomicsChapter 10 Simple Linear Regression John J. McGill/Lyn Noble Revisions by Peter JurkatLearning Objectives1. Describe the Linear Regression Model 2. State the Regression Modeling Steps 3. Explain Least Squares
New Mexico - ECE - 344
## This system.ucf file is generated by Base System Builder based on the# settings in the selected Xilinx Board Definition file. Please add other# user constraints to this file based on customer design specifications.#Net sys_clk_pin LOC=AE14;
NJIT - IS - 465
IS465: Adv. Info. Sys. What is IS?Min Song Information Systems Dept.Information Systems and Computer ScienceComputer Science study of algorithms, computation, software, and data structures. roots are in mathematics and engineeringInformation
NJIT - CIS - 656
Interdomain Routing and BGP RoutingTimothy G. GriffinAT&amp;T Research griffin@research.att.com http:/www.research.att.com/~griffinNJITMay 3, 2003Architecture of Dynamic RoutingOSPFAS 1IGP = Interior Gateway Protocol Metric based: OSPF, IS-I
NJIT - CIS - 456
CIS 456-102, Spring 2006, Dr OttMidterm I, 02/17/2006.Be clear and concise, and within the constraints of clear and concise, be short.6:00 - 7:00. Class resumes 7:10. Name on every sheet!1. Draw, in detail, the header of an IPv4 packet w
Allan Hancock College - AIR - 20072007
The legislation that is being viewed is valid for Sessional. Associations Incorporation Regulations 2007 (S.R. 2007, No. 107)- CONTENTS Associations Incorporation Regulations 2007
Penn State - SAH - 5098
Shehla Hasan I strongly believe Tenner when he says that a writer loses some of his or her luster if it turns out someone else previously published the same phrase but only if it was done purposefully. Plagiarizing is one of the worst techniques kn
Purdue - CE - 512
The 2008 Supplemental Notes for CE512 are organized into 23 sections. See also the CE512 website at http:/cobweb.ecn.purdue.edu/~ce512/. Section 1 2 3 4 5 6 7-10 11 12 13 14 15 16 17 18 19 20 21 22 23 Topic The Planning Process (not used) The Compreh
UCSD - PSYC - 102
Caloric Stimulation of the Vestibular SystemWhat is caloric stimulation? A reflex that occurs when cold water or air is put into the human ear. The cold water/air begins to draw heat away from the inner ear and creates a convection current in the
Penn State - RXC - 122
September 18, 2001 9:13 a.m. EDTHow Policy Makers Regrouped To Defend the Financial SystemBy GREG IP and JIM VANDEHEIStaff Reporters of THE WALL STREET JOURNALWASHINGTON - At 7:30 a.m. Monday, Alan Greenspan convened Federal Reserve Board membe
Stetson - LOG - 350
Conception centre utilisateurQuelques exemples de systmes inspirs (partiellement) en tudiant les utilisateursExemple 1: Le bureau virtueltudes de l'organisation des documents dans un bureau physiqueMalone (ACM TOIS 1983) Au moment de l'tude,
Texas El Paso - CS - 3331
Program 4: Due 3/5 Extend program 3 to allow &quot;smart&quot; copying of cells across rows or columns. For this, you must support two types of cell addresses: relative and absolute. An absolute cell address has either the column or the row (or both) start wit
Youngstown - CIS - 6962
CSCI 6962: Server-side Design and ProgrammingLecture 4: Java Server Pages for Complex FormsParsing Numeric Input getParameter method returns a StringThis is &quot;5&quot;, not the number 5! Must parse strings into numbers before performing numeric compu
Youngstown - CIS - 5857
CSIS 5857: Encoding and EncryptionLecture 22: Message Authentication Code AlgorithmsTopics Authentication and hashing Keyed hash systems Plug and play systems Can be used with any hash algorithm that is resistant to preimage/collision attacks
Youngstown - CIS - 5857
CSIS 5857: Encoding and EncryptionLecture 21: Cryptographic Hashing Algorithms and SHA-512Topics Goals of a cryptographic hashing function General structure of most hashing functions Basic types of hashing functions Based on existing block cip
Youngstown - CIS - 5857
CSIS 5857: Encoding and EncryptionLecture 6: Modern Block Ciphers Part 1: Encryption for Binary PlaintextBinary Text and Keys Text now binary (only characters 1 and 0) Plaintext encrypted a block at a time Neither substitution nor permutation e
Youngstown - CIS - 4801
Design Specification DocumentATM SystemSystem ArchtiectureData DictionaryMajor System Components Account: Data control object storing information about current user LoginInterface: User interface object for ID and PIN entry LoginLogic: Busin
Youngstown - CSIS - 3783
Semester 3 Chapter 6ACLsOverview Router can provide basic traffic filtering capability Access Control Lists can prevent packets from passing through the interface Sequential collection of permit or deny statements Can be applied IN or OUT of i
Youngstown - CSIS - 3782
Cisco S2 C4Router ComponentsConfigure a Router You can configure a router from from the console terminal (a computer connected to the router through a console port) during its installation via modem by using the auxiliary port from Virtual Te
Youngstown - CSIS - 3782
Cisco Academy Chapter 5Physical LayerPhysical Layer - 1 defines the electrical, mechanical, procedural, and functional specifications for activating, maintaining, and deactivating the physical link between end systems Media Devices Topologies
Youngstown - CSIS - 4883
S6C12 - AAAAAA FactsAAA Defined Authentication, Authorization, and Accounting Central Management of AAA Information in a single, centralized, secure database Easier to administer Permits access control from a central database Access server,
Youngstown - CSIS - 4883
S6-C7 Frame RelaySon of X.25Frame Relay Facts Replaced X.25 as the packet-switching technology of choice Frame Relay streamlines Layer 2 functions and provides only basic error-checking Provides efficiency ITU-T and ANSI standard that defines
Youngstown - CSIS - 4883
InterVLAN RoutingDesign and ImplementationWhat Routers Do Intelligent, dynamic routing protocols for packet transport Packet filtering capabilities Connectivity enhancements DHCP, NAT, QoS, policy-based routing Connectivity between LAN and WA
Youngstown - CSIS - 3782
Cisco Chapter 7 Layer 2 TechnologiesIEEE LAN StandardsLAN Technologies Token Ring 802.5 IBM 1970s Large installed base but losing favor FDDI Popular as campus backbone 4 specifications Ethernet 802.3 Many flavorsToken Ring Ring L
Youngstown - CSIS - 4884
Otero Junior College Cisco Networking AcademyChapter 7 ReviewRoute OptimizationPreventing Propagation Times you do not want routing information propagated: When using an on-demand WAN link You may want to minimize, or stop entirely, the exchan
Youngstown - CSIS - 3783
Cisco Semester 4 Chapter 2WANSTechnologies Not Covered in Semester 4 DSL Cable Modem ATM SONET SMDSWAN Services Layer 1 CSU/DSU connects to WAN to CSU/DSU to other route Service Providers POTS, X.25/Frame Relay, TDM or T1/E1, Call setu
Youngstown - CSIS - 4883
Multi-Layer SwitchingLayers 1, 2, and 3Cisco Hierarchical Model Access Layer Workgroup Access layer aggregation and L3/L4 services Distribution Layer Services, Server Farms ACLs, Queues; policy-based connectivity Core Layer Rapid Packet
Youngstown - CSIS - 3722
Database OverviewCreated by Virginia PhillipsWhat is a Database Integrated Many tables, reports, views, queries Shared Can be used by many users simultaneously Minimizes Redundancy Foreign keys are only repeated fields Maximum Integrity
Youngstown - CSIS - 3782
1Course Syllabus CSIS 3782: Cisco Networking Academy 1Summer, 2003 A. General InformationScheduleRoom 305 Meshel Hall 6-10 p.m. M-WPrerequisites Required: CSIS 2610 or 1560 or concurrent, Active Internet access &amp; e-mail at your residence. Helpf
Youngstown - CLASS - 610
The Make Utility Make is a utility that is used for combining a number of files together to produce a running program. Once a program is created, make can bring the program up-to-date if any changes are made to it by only compiling the files that hav
Youngstown - CIS - 824
; This is a very simple example of a CLIPS knowledge base,; just using the pattern matching to create new knowledge.; To run this example:; 1) start CLIPSWin from Explorer; 2) load the KB with (load &quot;emh1.txt&quot;); 3) initialize with (reset); 4)
Youngstown - CIS - 824
; This is a very simple example of a CLIPS knowledge base,; just using the pattern matching to create new knowledge.; We have modified this to use binding to prompt users for input.; To simplify this, we will no longer use a single &quot;Patient&quot;; o
Youngstown - ASSIGNMENT - 3701
/* * MathApp.java * * Created on September 12, 2007, 2:05 PM * * To change this template, choose Tools | Template Manager * and open the template in the editor. *// import libraries for visual componentsimport javax.swing.*;import java.awt
Youngstown - CIS - 3701
CSIS 3701: Advanced Object-Oriented ProgrammingInterfacesIntroduction: Polymorphism Without InheritancePreviously, we described how polymorphism could be used to allow objects of different types to be substituted for one another, as long as they
Youngstown - CIS - 3701
CSIS 3701: Advanced Object-Oriented ProgrammingGraphics and Drawing in JavaIntroductionJava has a number of built-in methods for drawing simple shapes on the surface of visual components. While they have greatly expanded in Java 2, they are still
Youngstown - CIS - 3701
CSIS 3701: Advanced Object-Oriented ProgrammingMouse, Keyboard, and Window EventsMany of the events that we handle in Java do not directly involve actions taken on Java components (such as pressing a button) they instead more general input device
Youngstown - CIS - 3701
CSIS 3701: Advanced Object-Oriented ProgrammingCreating Exception ClassesCreating Your Own Exception TypesAs described in the previous section, exceptions are the preferred way to signal circumstances that are beyond the ability of a class to han
Youngstown - CIS - 3701
CSIS 3701: Advanced Object-Oriented ProgrammingJava Visual Classes and ObjectsNow that you have been introduced to the Java syntax for defining classes and creating and using objects, you are now in a position to understand a lot more about Javas