I have been working on an expert system using clipspy recently. A problem I find is whenever I build a rule, all the previous rules are lost and only one rule can be defined. This is what I have tried.
If I also tried to merge two rule strs into one, and call env.build() once. It doesn't work.
I also tried to put these rules into a text file, and use env.load() function to load that file. However there is still one rule I can find.
I really run out of ways to define more than one rule. I am not sure if this is a bug, or maybe there is something I didn't do correctly. Any help is appreciated!
The
build
function is supposed to be used on one construct at a time. Passing more than a construct to thebuild
function will lead to only the first one being loaded into the environment.To pass multiple constructs to the environment, simply write them down into a file and use the
load
function.