Production systems, predicates, and logic


next up previous contents
Next: Predicates and arguments
Up: No Title
Previous: Another example
Back: to main list of student notes

Production systems, predicates, and logic

In the examples above, all the rules' primitive conditions were simple ``words'' like hot and mp. It is possible to have more complex conditions, which is where a connection with logic comes in. For an example, have a look at the first two rules below. Ignore the third one for the moment: it's another trick for killing the bug once enough inferences have been made.

likes(mary,wine) => loves(john,mary).
likes(mary,beer) => loves(bill,mary).
loves(_,_) => exec([forward]), exec([right]).

You will find a copy of these in the file l1.pl, with the STM initialised to likes(mary,wine). Try running them with psworld0:

eps( l1, psworld0 ).
You will see that the final contents of STM is as shown below.
loves(john, mary) (1.1)
likes(mary, wine) (0.1)
That is, the symbols loves(john,mary) have been added. This was done by firing the first rule. So groups of symbols can have a more complicated structure than in the holidays example.




next up previous contents
Next: Predicates and arguments
Up: No Title
Previous: Another example
Back: to main list of student notes



Jocelyn Paine
Thu Feb 15 00:10:41 GMT 1996