Welcome to the homepage
of Kristof Van Laerhoven


Context
Here are some pointers to my whereabouts:
  • [ubicomp@lancs]
  • [computing@lancs]
  • [lancaster_uni]
  • [lancaster_city]
  • [lancashire]
  • [united_kingdom]

  • Categories:
  • basics
  • machine learning
  • classic AI
  • hardware
  • robotics

  • Site Info
    update at 18:20:26 -0000
    on 21-01-2003
    by Kristof Van Laerhoven

    Research

    Personal

    View

    [_publications_]
    [_research notes_]
    [_students_]
    [_projects_]
    [_research_abstract_]
    [_thesis_]
    [_contact_info_]
    [_travel_pics_]
    [_links_]
    [_text_only_]
    graphics
    [_flash_]
     

    Research Notes of Kristof Van Laerhoven. Last update: Tuesday, 21 January 2003 18:20:26 -0000


    Kristof Van Laerhoven 
    2e Licentie Informatica 1998-1999
    
    Comparison of the CLIPS and JESS expert system shells
    
    Project report for Industrial Applications of AI
    
    June 4, 1999
    

    Chapter 1
    Introduction
    Description of the software packages and the objectives
    

    CLIPS is an expert system tool developed by the Software Technology Branch (STB) at the NASA/ Lyndon B. Johnson Space Center. It was released in 1986 for the first time and has undergone continual refinement and improvement ever since. The authors claim that thousands of people use it around the world, although a precise market study has not been done to confirm this. Signals of its popularity are visible in the internet news group comp.ai.shells, which has often discussions of CLIPS. Distributed Computing Systems hosts a mailing list for CLIPS users at clips@discomsys.com. The official CLIPS web page can be found at the URL http://www.ghg.net/clips/CLIPS.html. Intelligent Software Professionals (ISP) has at the URL http://www.isphouston.com/swish-web.html a two-year archive of questions and answers to the CLIPS List Server.

    CLIPS is a tool that is designed to make the development of software to model human expertise easier. Apart from being used as a stand-alone tool, CLIPS can also be called from a procedural language, or CLIPS can call procedural code itself. It has been designed for integration with other languages such as C, C++, and Ada.

    CLIPS represents (human) knowledge in three ways:

    1)      Rules for experience-based, heuristic knowledge 

    2)      Deffunctions and generic functions for procedural knowledge

    3)      OO programming, also for procedural knowledge


    Jess (Java Expert System Shell)

    JESS is also an expert system shell and it is even based on CLIPS. JESS was originally a clone of the essential core of CLIPS, but has begun to “acquire a Java-influenced flavor of its own”, according to the authors, “and JESS is convenient for giving Java applets and applications the ability to "reason”.”.

    JESS-related topics are also being discussed now and then at the comp.ai.shells newsgroup, but more information is available at the majordomo@sandia.gov mailing list.  JESS is completely programmed in Java by Ernest J. Friedman-Hill at the Sandia National Laboratories for the U.S. Department of Energy. It was first released in 1995.

    JESS can be implemented as an applet, although this would probably be not such a good idea. A better alternative is to run JESS on the server side and run only the GUI on the client side. As in CLIPS, it is also possible in JESS to call (JAVA) procedures or be called by a procedure itself.


    Objectives

    The aim of this report is to get a clear view on what the possibilities and applications are of the two expert system tools. Not solely the comparison of CLIPS and JESS will be performed, but this report will also try to determine in what way JESS equals (or even outperforms) the CLIPS expert shell system. Since JESS was initially a CLIPS clone written in Java, the two shells have a lot in common. However, as this report will show, they are in general used in different application domains.
    Thus, the main objective is to give an overview on where both packages are different and on which points they are similar. Another objective is to determine the application domains for both expert system shells and to establish a user-profile.
    The information on which this report was based comes from mailings on the comp.ai.shells newsgroup, and mailings in the CLIPS and JESS mailing lists. Apart from this information, both packages were installed and tried out for basic functions, and the manuals were read.
     
    A few facts and figures about CLIPS and JESS:


    Chapter 2
    The comparison
    A step-by-step analysis of the performance of the software


    Obtaining and installing the software


    CLIPS
    CLIPS is freely downloadable from the CLIPS internet-site http://www.ghg.net/clips for non-commercial use. The package is downloadable as a collection of source-files or as an executable from the web page. CLIPS is also included with the book Expert Systems: Principles and Programming, 3rd Edition, by Giarratano and Riley and a Reference Manual.
    After uncompressing the file, the executable can be started and the user is immediately confronted with the CLIPS environment. The User’s manual, together with this environment, makes it easy to begin programming and experimenting with the software.


    JESS
    The JESS package can be obtained on the URL http://herzberg.ca.sandia.gov/jess, free from charge (for non-commercial use and for commercial use within the U.S.) as well. There are two possibilities: either JESS for UNIX or JESS for MS Windows can be downloaded. The former is compressed in tar.Z format, the latter in .zip format.
    In contrast with CLIPS, after the JESS distribution packages have been uncompressed, the whole software must be compiled from .java into .class files. This compiling procedure has a few tricky edges: the compile command must be executed from the main JESS directory, otherwise the Java compiler will give all kinds of errors. Furthermore, the right version of the Java compiler and virtual machine must be used. The included readme.html file gives only a brief (and incomplete) description on this procedure, so inexperienced users will need some time and patience.
    Conclusions
    Both expert system shells are easy to download and install, although JESS is a bit more complicated since the software has to be compiled before it can be started. It has also to be noted that the names and sites of both packages immediately show up when searching for freely available expert system shells on the internet. Both sites have also links to each other.


    Learning to work with the packages


    CLIPS
    The CLIPS user’s manual [1] is meant to be an easy-to-read, clear introduction to the CLIPS programming language. It contains many short examples than can be verified by typing them in after the CLIPS prompt. The manual is very complete, but it takes some time to read everything (approximately 6 hours, including trying the short, but illustrative examples). It is, however, a very good way to learn the syntax of CLIPS. After reading this manual, the user can use the CLIPS Reference Manual for quick reviews or for more advanced topics that were not explicitly mentioned in the User’s Manual. Both the user’ s manual and the reference manual are freely downloadable as Portable Document Format (PDF) files. The user’s manual has 154 pages, while the reference manual is 398 pages long. There is also an interface guide (114 pages) , an architecture manual (457 pages) and an advanced programming guide (205 pages). It is needless to say that all this literature, which is freely to download from the CLIPS internet site, is very complete.
    The CLIPS programming environment (for windows-based operating systems like MS Windows and Macintosh) is also very convenient and provides a good overview. Different windows show the facts, the agenda, the instances, the globals, and the focus (see the layout comparison in Figures 1 and 2 at the end of this report), making especially the debugging very easy task. The CLIPS input window has also a very complete and user-friendly menu with a lot of options in contrast with non-windows supporting CLIPS versions (DOS, UNIX, …) and JESS. The CLIPS package contains also a special editor to make programming expert systems easier.
    The CLIPS language looks a lot like LISP. Commands are written between ‘(‘ and ‘)’ characters and it uses similar features like atoms, numbers, strings and lists. Adding 7 and 5 would be done by typing: “(+ 7 5)” at the command line. CLIPS (and JESS) will then respond with 12. To illustrate the programming language, a simple example is shown in Figure 3 at the end of this report that contains the commands to create rules and facts.
     

    JESS
    The only reading material that is supplied with the JESS expert system shell, is a readme.html file that contains brief instructions on how to uncompress, compile and run the system. Apart from this information, a compact list of JESS functions is given. In the introduction, the author suggests that the CLIPS manual should be read first before beginning with this file. It is thus clear that JESS has no user’s manual for users that have no prior knowledge of CLIPS; JESS is therefore primarily intended for people that have experience in CLIPS programming. Figure 1 depicts the JESS console under MS-Windows.
    The JESS language is a subset of the most important features of CLIPS. This will make it extremely difficult to port CLIPS code to JESS if the program contains elements that were supported by CLIPS but not by JESS.
    Conclusions
    Again, CLIPS has some advantages over JESS when evaluated as a packet to learn the language:
    1) For the most popular operating systems, CLIPS has a windows-based environment, which helps in understanding, visualizing and debugging the expert system programs. This gives the beginning user also a feeling of completeness about the expert system shell, while JESS is just not that impressive.
    2) The User’s Manual supplied (or downloadable) with CLIPS enables an inexperienced user with only prior knowledge on functional programming to learn the CLIPS language in a relative short period. In contrast, the JESS read-me file expects the user to have already some experience with CLIPS.
    3) A special-purpose editor is supplied with the CLIPS package that facilitates the programming in CLIPS.
    This is of course not a coincidence, since JESS is more or less completely based on CLIPS. CLIPS has also a longer history, as well as a stronger support group.


    Programming expert systems


    The information in this section is based on user reactions to a mailing on the comp.ai.shells newsgroup, asking people to give their opinion about CLIPS and/or JESS. Further information was gathered via the CLIPS and JESS mailing lists, the CLIPS user’s manual and the JESS and CLIPS websites.

    CLIPS
    The CLIPS shell provides the basic elements of an expert system:
    1) A fact-list, and instance-list : this is global memory for data
    2) A knowledge-base: which contains all the rules
    3) An inference engine : for controlling the execution of rules
    Facts are data that usually designate relations or information like: (is-animal duck) or (animals duck horse cow chicken) or (this is a test). Rules can be applied on these facts in the form of IF-THEN rules. These rules are special because they ‘fire’ only once. Variables and wildcards can be used in the rules, functions can be defined to manage the rules. Figure 3 shows how these facts and rules can be implemented.
    Besides these basic properties, CLIPS has pattern matching abilities (the Rete Algorithm), extended math functions, conditional tests, object-oriented programming (COOL: Clips Object-Oriented Language) with abstraction, inheritance, encapsulation, polymorphism and dynamic binding. Elaborating on these elements would bring this report too far from its objective, so they are not discussed here. The CLIPS User’s Manual can be read for more information (see [1] in the references section).
     

    JESS
    JESS has the same basic properties CLIPS has, but its language lacks a few advanced features, for instance:
    1) The CLIPS-user has a choice of seven strategies in rule-firing, while JESS only has the two most important ones.
    2) The and and or conditional tests are not available in JESS in the left-hand side of rules.
    3) JESS does not implement modules.
    4) COOL: JESS lacks most COOL functions; however, this is not really necessary since JESS is able to manipulate and directly reason about Java objects (Java Beans). Considering the Java language is already object oriented, the lack of COOL is only a disadvantage when CLIPS code has to be ported to JESS.
    Most of these features can be implemented by rewriting code to achieve the same effects. In general, these shortcomings are not really an obstruction.
    The most harmful shortcomings of JESS are however situated in the performance of Java and the fact that it is still work in progress:
    1) It is generally accepted that JESS is up to three times (depending on the application) slower than CLIPS. This is primarily due to Java itself, although the implementation of JESS might also contribute significantly. Performance is improving, though.
    2) The JESS parser is considered less robust than CLIPS. The main reason for this is that, unlike CLIPS, JESS is still work in progress. The quality of JESS is improving with every new version, however.
    3) As a consequence of the absence of some features, CLIPS code is sometimes hard (or even impossible) to port to JESS. This will certainly be the case in the bigger projects.
    This does not mean that JESS is just a weak clone of CLIPS. JESS has some advantages over CLIPS as well:
    1) The Java language implementation makes JESS the choice for developing web-based expert systems, although some people say they prefer to use CLIPS with C++ in a CGI script. If Java is preferred, however, JESS is a more efficient choice.
    2) JESS enables the user to put multiple expert systems in one process. Java threads can be used to run these in parallel.
    To conclude, the choice whether to use CLIPS or JESS should depend strongly on the kind of application that will be created with it.


    Application Examples, Market Share and popularity

    CLIPS
    Giving a complete list of applications that use CLIPS is not possible since it has been used in numerous domains during the past thirteen years. Some examples that were mentioned in the newsgroup and on the webpage are:
    n Large medical expert systems
    n Control applications at NASA
    n Various applications for the U.S. government
    n (Soft) Real Time Applications
    During the past three months that I was subscribed to the CLIPS mailing list, approximately up to 50 mails per week were received from this list. The subjects were very diverse, but most of them were not as specific as the ones in the JESS mailing list.
    Another remark that has to be made with relation to applications is that CLIPS seems to be used in more industrial applications and large projects.

    JESS
    Examples of the kind of applications that can be created with JESS are available at the JESS website. They come from domains like:

    n News filtering
    n Intelligent tutoring systems
    n Children’s healthcare applications
    n Intelligent Agents (convenient since JESS can handle multiple expert systems in one process)
    n Reptile and amphibians identification
    n Medical expert systems
    n Education: used in various AI courses

    Most of these implementations were situated in smaller projects or education.
    The mailing list from JESS is comparable to that of CLIPS in activity, but the topics are generally a bit more technical. A lot of people have specific questions about the Java code, bug-reports and suggestions for the next version. This is hardly surprising since JESS is almost a one-man project.
     


    Chapter 3
    The conclusions


    Both CLIPS and JESS are products with a large support on the internet, but CLIPS seems to have a broader audience, probably because it exists longer. This difference in age results in the CLIPS package being more stable and complete, while JESS users will still experience some minor bugs. JESS is constantly updated and the author, Ernest Friedman-Hill, has been very responsive to user/developer feedback and regularly puts out new releases and bug fixes.

    Nowadays, the choice between JESS and CLIPS depends on the application. If it is web-based or should reside in applet-form, the choice of JESS is a very logical one (which is even supported by the authors of CLIPS). For the more classic applications, CLIPS will probably be chosen because of its reputation of being more stable and having more support. 

    The future of JESS depends highly on the evolution of the web, the Java programming language and its own future stability. These three conditions make that there is a great possibility that JESS will become more popular and more frequently used. Especially the object-oriented possibilities and the easy integration into Java code makes JESS’ future very promising.

    CLIPS, on the other hand, is more likely to implement the new and sophisticated features first as they come out, since it still has the advantage in time. CLIPS has also various extensions and variants(like FuzzyCLIPS, AGENT CLIPS, DYNACLIPS, KnowExec, CAPE, PerlCLIPS, wxCLIPS and EHSIS to name a few) that give it an advantage with respect to support of methods like fuzzy logic and agents.   

    The multifunctional developing environment of CLIPS for operating systems that support windows is also an advantage, while JESS has just one window with two buttons (‘clear window’ and ‘quit’), without a menu. Figures 1 and 2 depict both environments.

    To summarize, CLIPS is still more complete and stable than JESS, but this might change in the future, since the JESS package is being improved constantly. Besides that, JESS has also the property of using Java, which in the long run might prove to be a big advantage over CLIPS.


    References


    1. J. C. Giarratano. The CLIPS User’s Guide. 1998.
    2. E.J. Friedmann-Hill. Jess, The Java Expert System Shell. 1999.


     

    CLIPS> (assert (light green)) ;this is how to create a fact
    CLIPS> (defrule go ; this is how to create a rule
    (light green) ; if light is green
    => ; then
    (printout t “go” crlf)) ; print “go”
    CLIPS> (defrule stop
    (light red)
    =>
    (printout t “stop” crlf))
    CLIPS> (defrule red
    (light red)
    =>
    (retract *) ; retract all facts
    (assert (light green))) ; and assert the (light green) fact
    CLIPS> (defrule green
    (light green)
    =>
    (retract *)
    (assert (light red)))
    (run)
    CLIPS> stop
    Go
    Stop
    Go
    Stop


    Figure 3: The CLIPS language: an example.
     


         
             

    Last updated by Kristof Van Laerhoven, 21/01/2003 18:20:26 -0000