Facts asserting

29 views
Skip to first unread message

bilal murat

unread,
Nov 16, 2024, 11:24:05 PM11/16/24
to CLIPSESG

Dear All,

I am working on an expert system project using CLIPS. In this project, I use a Python-developed interface to collect answers to user-directed questions and save them in a file named Finalfacts.fct (Figure 2) through a CLIPS environment created with the help of the clipspy library. I write the CLIPS rules using the Jupyter Notebook CLIPS kernel because of its typing advantages. Once the rule-writing process is complete, I run all the rules through the CLIPS IDE.

My goal is to execute the developed rules by loading the facts generated with Python. However, none of the rules are being triggered. To troubleshoot, I verified the facts, and it appears that the necessary facts for the rules to run are present. Despite the facts being properly formatted and structured, the rules still do not fire.

Interestingly, when I manually type the same facts through the keyboard, the system records the facts with a new fact index number, and the rules are triggered successfully. However, if I try to copy and assign the same fact from the facts list or directly from Finalfacts.fct (Figure 1), it returns the already existing fact index, and no rules are triggered.

You can find a sample screenshot attached.

I would greatly appreciate your assistance in resolving this issue. Thank you in advance for your help!

Best regards,

SS of CLIPS IDE.docx

CLIPS Support

unread,
Nov 17, 2024, 5:13:03 PM11/17/24
to CLIPSESG
You can't assert the same fact twice. If it's working in one situation, but not the other it could be that your rules didn't load in your python environment.
Reply all
Reply to author
Forward
0 new messages