In the examples above, all the rules' primitive conditions were simple
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
likes(mary,wine). Try running them with
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.