DOC PREVIEW
Chico CSCI 397 - FUZZY REASONING IN JESS

This preview shows page 1-2-3 out of 10 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

National ResearchCouncil CanadaInstitute forInformation TechnologyConseil nationalde recherches CanadaInstitut de technologiede l’informationFuzzy Reasoning in Jess: The FuzzyJ Toolkit andFuzzyJessOrchard, R.July 2001* Proceedings of the ICEIS 2001, Third International Conference on Enterprise InformationSystems, Setubal, Portugal. July 7-10, 2001. pp. 533-542. NRC 44882.Copyright 2001 byNational Research Council of CanadaPermission is granted to quote short excerpts and to reproduce figures and tables from this report,provided that the source of such material is fully acknowledged.FUZZY REASONING IN JESS: THE FUZZYJ TOOLKIT ANDFUZZYJESSRobert OrchardNational Research Council of Canada, Institute for Information Technology,Montreal Road, Building M-50, Ottawa, Ontario, Canada K1A 0R6Email: [email protected] words: fuzzy logic, Jess, fuzzy reasoning, java, fuzzy toolkit, expert system, FuzzyJ, FuzzyJess, FuzzyCLIPSAbstract: Jess, the Java™ Expert System Shell, provides a rich and flexible environment for creating rule-basedsystems. Since it is written in Java it provides platform portability, extensibility and easy integration withother Java code or applications. The rules of Jess allow one to build systems that reason about knowledgethat is expressed as facts. However, these facts and rules cannot capture any uncertainty or imprecision thatmay be present in the domain that is being modelled. This paper describes an extension to Jess that allowssome forms of uncertainty to be captured and represented using fuzzy sets and fuzzy reasoning. We describethe NRC FuzzyJ Toolkit, a Java API that allows one to express fuzzy concepts using fuzzy variables, fuzzyvalues and fuzzy rules. Next, we describe a Java API called FuzzyJess that integrates the FuzzyJ Toolkit andJess. Finally, we show the modifications that were made to the Jess code to allow this extension (and otherswith similar requirements) to be added with modest effort and with minimal or no impact as new releases ofJess are delivered.1. INTRODUCTIONThis paper describes an extension to Jess(Friedman-Hill 2001) that provides a fuzzyreasoning capability. The extension, calledFuzzyJess, is a Java™ 1 API that allows one to usethe FuzzyJ Toolkit (Orchard 2001) with Jess todefine fuzzy concepts and to create fuzzy rules usingthese concepts. It would be beneficial for the readerto have some knowledge of fuzzy reasoning or toreview some introductory information or books(Kosko 1997; Cox 1994; Tsoukalas 1997) that dealwith the topic. We begin with a brief overview of theFuzzyJ Toolkit showing how to create a simplefuzzy system using Java code.Then we describe the public FuzzyJess interfaceand illustrate, using the same example, the1 Java and all Java based marks are trademarks orregistered trademarks of Sun Microsystems, Inc. in theUnited States and other countries.corresponding Jess program for this fuzzy system.Finally we describe the hooks that were provided inthe Jess code and the private FuzzyJess code thatallowed the extension to be built with a modesteffort and in such a way that future revisions of Jessshould have little or no impact on FuzzyJess.2. FUZZYJ TOOLKITThe FuzzyJ Toolkit provides a capability formodelling fuzzy concepts and reasoning in a Javasetting. Much of the work is based on earlierexperience with the FuzzyCLIPS (Orchard 1998)extension to the CLIPS Expert System Shell (Riley2001).Fuzzy concepts are represented using fuzzyvariables, fuzzy sets and fuzzy values. AFuzzyVariable is used to describe a general fuzzyconcept. It consists of a name (for example, airtemperature), its units (such as Degrees C), a range(for example, from 0 to 100), and a set of fuzzyterms that can be used to describe specific fuzzyconcepts for this variable. The fuzzy terms aredefined using a term name such as cold or hot,together with a FuzzySet that identifies the degreeof membership of the term over the range of thefuzzy variable. In Figure 1 we show the fuzzy setrepresentations of the terms cold, OK, and hot for afuzzy variable air temperature. Notice that the termcold has a high degree of membership at 0 degreesC, since we are certain that a temperature of 0degrees C is cold. The degree of membership dropslinearly as the temperature moves toward 20 degreesC, indicating that our certainty that the temperatureis cold is decreasing. After 20 degrees C it has avalue of 0, meaning it is definitely not cold.The fuzzy variable terms along with a set ofsystem or user supplied fuzzy modifiers (like very orslightly), the operators and, or and not and the leftand right parentheses provide the basis for a simplegrammar that allows one to write fuzzy linguisticexpressions to describe fuzzy concepts in anenglish-like manner. These expressions are encodedin a FuzzyValue representing a specific fuzzyconcept. For example, the expressionair temperature is very cold or hotis composed of the terms cold and hot, along withthe fuzzy modifier very and the operator or.The logic of expert systems is often encoded inrules. In the FuzzyJ Toolkit these are fuzzy rules. AFuzzyRule holds three sets of FuzzyValuesrepresenting the antecedents, conclusions and inputvalues of the rule. A rule might be written asfollows:if a1 and a2 … and anthen c1 and c2 … and cmThe antecedents (ai) are the premises of the rulethat must be true before the rule can execute (fire)and the conclusions (ci) of the rule can be asserted.In non-fuzzy systems like Jess, the antecedents andconclusions are crisp and for an antecedent to betrue the facts (knowledge) of the system must matchexactly with the antecedent. Consider the crisp rule:If air temperature is 29.5 degrees Cthen set fan speed to 711.0 RPMIn this case the temperature must be exactly 29.5degrees C before the rule will fire. If the temperatureis 29.501 degrees C, the rule will not fire. Nowconsider a fuzzy variation of this rule:If air temperature is hotthen set fan speed to highIn this case the air temperature needs only tomatch the fuzzy concept of hot to some degree forthe antecedent to be true and for the rule to fire. Itwill assert a fuzzy value for fan speed that takes thisinto account so that the actual fan speed will varyaccording to the degree of hotness of the currenttemperature. This single rule represents a largenumber of discrete crisp rules and is much closer tothe way we would naturally express such a concept.Figure 1Note that with the FuzzyJ Toolkit we can createsimple rules that have


View Full Document
Download FUZZY REASONING IN JESS
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view FUZZY REASONING IN JESS and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view FUZZY REASONING IN JESS 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?