Section 1 - Clauses, Types and Rules
Rules are an automatic way of doing queries on the database (as we have been doing) but they also allow the assertion of clauses onto the database of knowledge depending on the results of the queries. These are divided into Content, Initial and Final. Those rules in Initial are done first - they are usually rules for setting things up. Then the rules in Content are done - this is usually where the work of the simulation is performed. Finally (surprise, surprise) the Final rules are done - typically tidying up and reporting results.
The sequence can be pictured like this.
Click on the Initial radio-button, then on the large button which says No time level selected and choose eternity (this won't take long).
The rules are also bunched into categories (e.g. create objects) at the top left. When you select a category you get the rules in it at the top right. When you select a rule it displays it below. The three panes below are the rule comment on the left and the two parts of the rule on the right.
Select the category create objects and then the rule create producers.
The larger centre right panel shows the query part of the rule - this could have been entered in exactly the same format in the experimental browser of the universe. This is called the antecedent of the rule. If it can it will produce a number of successful bindings when fired on a database.
Select the whole of the antecedent of this rule and copy it. then paste it in the experiment pane of the Agent: universe browser and evaluate it.
You will see all the possible bindings displayed. The bottom part of the rule (back on the Type: UniversalAgent browser) is called the consequent. It puts things on the database (in this case) - this represents the results. In this case all possibilities for the variable ?producer is substituted in this antecedent and put on the database. In this particular case this will have the effect of asserting the clauses producer `producer-1', producer `producer-2', etc. onto the universe's database.
If there were no possible bindings then the rule would not fire, i.e. it would have no effect upon the database. In this case in order to fire the clause noProducers 10 had had to have been on the database already. Look at the rule that asserted this under category settable model parameters in the rule producer parameters. This is a rule with no variables in it! The antecedent is simply true this always succeeds (although with no visible bindings), the consequent has clauses with definite values in it (e.g. noProducers 10). this is how initial knowledge is asserted.
Generated with CERN WebMaker