CLIPS assignment - rule-based systems
-
Learn about CLIPS language and system, eg. read the official tutorial
available on the net, as well as
here.
Another tutorial, written in Polish by a friend of mine, is available
here.
-
Work out a sample problem, such that can be solved with a rule
knowledge base. Preferably, pick a domain, where you can be an expert
-- this can be your hobby, or some topic that fascinates you, and you
would like to advise other people on. For example:
- menu selection for a dinner on some significant occasion,
- wine selection to match a dinner menu,
- equipment selection and configuration for some venture, like a
mountain climbing excursion,
- a composition of crops for the home garden,
- advice on a financial investment package,
- advice on a decision to buy or sell stock,
- etc.
If you can not or do not want to use a domain from which you are a
real expert, then a topic for this assignment can be invented.
But the whole scenario should be carefully and realistically
conceived, to be able to provide realistic problems to solve, and to
be able to assess the value of the response.
-
Write a program in CLIPS as a set of rules, initial facts, constants,
functions, etc. Debug it, test on some simple cases first, then try
solving some more realistic examples.
Remember, and expert system does not have to solve all problems
correctly. Like a human expert, its knowledge is limited, and it may
make mistakes. And a simple prototype developed in a short time, must
make mistakes. If the system gives wrong asnwers because it lacks
adequate rules (knowledge), then everything is fine, you do not have
to achieve 100% performance. If, however, the system has the right
rules, but does not use them correctly, then something is wrong with
your program, and you have to keep working.
- Pay attention to the following:
- knowledge should be in rules; it is possible to write a fully
functional program in CLIPS (in the sense of functional programming),
or an object-oriented program, but that is not the objective (it is
also possible to write rules in such a way that they only serve to
invoke functions, and this is also wrong)
- do not use the salience declaration in rules to enforce a specific
order of their firing; if your program executes rules in a wrong
order, then do not change the rules; instead, first try to change
the strategy, CLIPS has 7 strategies to choose, try the mea or lex
strategy (set-strategy mea) - if this does not help then ask the
lecturer for advice
-
There are two known interpreters of CLIPS. One is the original program
from NASA, called CLIPS, now available as open-source. It is written
in C, and can be embedded in another system as an artificial
intelligence module. It can also call external functions.
CLIPS is available at the department laboratory computers. There is a
IDE version of CLIPS for Windows, with windowed editor and mini
runtime system.
The second interpreter of the language, named JESS, is a new
commercial product written in Java. 30-day demo versions are
available for popular operating systems.
Update: Thursday, 22-Dec-2011 23:01:42 CET