JESS Java Expert System Shell - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

JESS Java Expert System Shell

Description:

Latest Version has a new Eclipse Plug-in and Rete Diagram View. Jess ... Rete Algorithm to process rules. Rete is a an efficient mechanism for solving the ... – PowerPoint PPT presentation

Number of Views:424
Avg rating:3.0/5.0
Slides: 13
Provided by: richard737
Category:
Tags: jess | expert | java | rete | shell | system

less

Transcript and Presenter's Notes

Title: JESS Java Expert System Shell


1
JESSJava Expert System Shell
  • Richard Pruitt
  • CAP5605
  • Dr. Lacher
  • 12.07.05

2
Setup
  • http//herzberg.ca.sandia.gov/jess/
  • Version 7.0b4
  • JDK 1.4
  • License
  • Government Agencies Unrestricted License
  • Academia Restricted License
  • Commercial Purchase License

3
Jess
  • Written by Ernest Friedman-Hill
  • 1995
  • Sandia National Laboratories in Livermore, CA
  • Latest Version has a new Eclipse Plug-in and Rete
    Diagram View

4
Jess
  • Rete Algorithm to process rules
  • Rete is a an efficient mechanism for solving the
    difficult many-to-many matching problem by
    remembering results
  • Forward and Backward Chaining
  • Working memory queries
  • Directly manipulate and reason about Java objects
  • You can create Java objects, call Java methods,
    and implement Java interfaces without compiling
    any Java code.

5
How it Works
  • Production System
  • Production Rules
  • Added with (defrule)
  • Working Memory
  • Shown by running (facts)
  • Recognize-Act Cycle
  • Started by running (run)
  • Forward-Chaining by default
  • Can do backward-chaining
  • (do-backward-chaining)

6
Animal Identification
  • Created an animal identification system.
  • System will ask questions trying to narrow down
    which animal it is.
  • Animals (16)
  • Snake
  • Cat
  • Dog
  • Shark
  • Whale
  • Kola
  • Panther

7
Syntax
  • Define Rules
  • (defrule purr (warmblood y)(water n)
  • gt (printout t "Does it purr? (y or n)")
    (assert (purr (read))))
  • Rule is fired if meets conditions on the left
    side
  • warmblooded y
  • water n
  • Executes RHS when fired
  • (printout t "Does it purr? (y or n)") (assert
    (purr (read)))

8
Syntax
  • Not
  • (not (warmblood n))
  • OR
  • (warmblood yn)
  • (or (furry n) (trees y))

9
Functions
  • (deffunction max (?a ?b)
  • (if (gt ?a ?b) then (return ?a)
  • else (return ?b)))

10
Rules
  • Questions
  • (defrule warmblood
  • (start y) gt (assert (warmblood
    (ask-question-yn "Is it warmblooded?"))))
  • (defrule water
  • (warmblood yn) gt (assert (water
    (ask-question-yn "Does it live in the
    water?"))))
  • (defrule carnivore
  • (warmblood yn)(water yn)
  • gt (bind ?ans (ask-question-yn "Is it a
    carnivore?"))
  • (assert (carnivore ?ans))
  • (assert (herbivore (neg-yn ?ans))))
  • (defrule herbivore
  • (warmblood yn)(water yn)
  • gt (bind ?ans (ask-question-yn "Is it a
    herbivore?"))
  • (assert (herbivore ?ans))
  • (assert (carnivore (neg-yn ?ans))))

11
Rules
  • Answers
  • (defrule snake (warmblood n)(slither y)(water
    yn)
  • gt (assert (answer snake)))
  • (defrule cat (warmblood y)(purr y)(trees n)
  • gt (assert (answer cat)))
  • (defrule dog (warmblood y)(bark y)
  • gt (assert (answer dog)))
  • (defrule shark (warmblood n)(carnivore y)(water
    y)
  • gt (assert (answer shark)))

12
Demos
  • (batch animals.clp)
  • (batch jframe.clp)
Write a Comment
User Comments (0)
About PowerShow.com