This document should help you to get you started quickly with the Zilonis Rules Engine.
What do I need to use Zilonis?
You must have a JRE 1.6 installed on your system. The environment variable JAVA_HOME must be set to point to the proper JDK installation directory.
How do I install Zilonis
After installation the directory layout will be:
| bin | The Zilonis startup script is in here |
| clp | Some clp examples |
| lib | Libraries that Zilonis uses |
| log | Location where the log files are going to be written too |
All you have to do is make sure that you followed the installation instructions in the previous
section and just run the "zilonis.sh" script.
From the Lobby click on the bottom-right icon "Zilonis Shell". It will take you to the Zilonis Shell Screen, where you will encounter the "$" prompt sign.
In there you have access to the Zilonis interpreter. To get started we will create a fact, type:
-
$ (deffact (it is raining))
Now we will check what facts are in our Working Memory type:
-
$ (facts)
(it is raining)
For a total of 1 Fact.
It is time to create our first rule:
$ (defrule rule1
(it is raining)
=>
(assert (you are wet)))
Try now
-
$ (run)
$ (facts)
(it is raining)
(you are wet)
It asserted to the Working Memory that you are wet!
Let's add another rule:
$ (defrule rule3
(you are wet)
=>
(printout t "You should buy an umbrella."))
$ (run)
You should buy an umbrella.
You can continue learning more about Zilonis in the tutorial
