Questions tagged [clipspy]

For questions related to the embedding of the CLIPS engine in Python.

CLIPSPy is a FFI based binding module to embed the CLIPS expert system engine in Python.

35 questions
0
votes
1 answer

Does not generate anything in the output python code using clipspy

I am creating an expert system using clipspy, when I run the code in Python it throws nothing in the output and I have not been able to find the reason. Python code: import clips DEFTEMPLATE_STRING = """ (deftemplate dormitorio (slot Presencia…
0
votes
2 answers

Looking for source code repositories for AI Planning systems written in CLIPS

I have gone through github extensively. Last time I checked the CLIPS tag was removed btw. I am looking for CLIPS code repositories that contain AI Planners. Since the word CLIPS confuses many search engines, I was hoping the wider community might…
Voicegap
  • 33
  • 7
0
votes
1 answer

How can I find out at which step some rules have fired?

I need to know which rules and facts were fired in which inference step. I used watch rules to print out which rules have fired. But I cannot figure out how to output at which steps the rules have fired. Can anyone help?
Inyoung Kim 김인영
  • 1,434
  • 1
  • 17
  • 38
0
votes
1 answer

Clips Beginner: Add regular exp or any alternative to select * in clips rule in python and clipspy

I have a clips rule that matches the path given in the fact of a template and if path matches it assert the id and the text associated with that path into another template. The path is just a text entry in a dictionary. The path is…
ANA
  • 83
  • 5
0
votes
1 answer

Clipspy printout rule

So I have been working on an expert system using clipspy recently. I have already came out with the rule file and load it back in using the clipspy. Some my question is, how do I extract the printout content in the rule file using the clipspy…
Yew
  • 87
  • 5
0
votes
1 answer

CLIPS Beginner: How to add an automatic counter attribute in facts using Python and Clipspy

I want to add an automatic counter as an attribute in fact using clipspy it means The first fact, that you assert counts as number 1, the second as number 2 and so on. As I am beginner to Clips rules and facts coding I am not getting any idea how to…
ANA
  • 83
  • 5
0
votes
1 answer

CLIPS Beginner: How to add Python dictionary data into CLIPS facts using clipspy

I want to add facts using clipspy from dictionary in python (Dict to fact). But so far I am unable to do so. I am getting syntax errors as I am beginner to Clips rules and facts coding. Thank you in advance if anyone can help me resolve this…
ANA
  • 83
  • 5
0
votes
1 answer

CLIPS/clipspy Rule Order

So I'm trying to self-learn CLIPS and clipspy for a class assignment and I'm a bit stuck. The code below compiles and runs just fine but the output is a bit strange. I am trying to expand on examples I found in the manual. import clips import…
Pnick
  • 1
  • 1
0
votes
1 answer

Inconsistency in extracting string representation of facts using clipspy

Just started to work with clipspy-0.3.3 in Python 3.8.3. When extracting facts, an inconsistency was encountered in the .facts() enumerator. The code below import clips env = clips.Environment() env.assert_string("(value…
Heikki
  • 2,214
  • 19
  • 34
0
votes
1 answer

clipspy installing fatal error C1083: Cannot open include file: 'clips.h': No such file or directory

i'm trying to install clipspy on Python 3.8 but i get this error fatal error C1083: Cannot open include file: 'clips.h': No such file or directory i've tried installing previous versions of clipspy but didn't work thanks to everybody will answer
serc
  • 3
  • 1
0
votes
1 answer

Add multiple rules in clipspy

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…
Ray
  • 81
  • 1
  • 3
0
votes
1 answer

CLIPSpy: Getting "No module name 'clips._clips'" upon importing clips

I have installed CLIPSpy from the git repository, and followed the instructions for installing with the source files. Yet after installing and running the python shell I get this error: `import clips .../clipspy/clips/__init__.py", line…
Cartoli
  • 3
  • 1
  • 3
0
votes
1 answer

Using Logical And In CLIPS

I altered some CLIPS/CLIPSpy code to look for when the Variable column in a CSV is the word Oil Temp and when the duration of that column is above 600 or above. The rule should fire twice according to the CSV I'm using: I'm receiving the following…
Jay Py
  • 141
  • 9
0
votes
1 answer

Irregularity in modifying a slot value in a CLIPS fact template using clipsPy

I am trying to modify a fact template from python using CLIPSPY. It behaves strangely as it does modify a slot for the first time, but then for next slot, it does not and even re-modify the previous modified slot value to something else…
greenlantern
  • 374
  • 1
  • 3
  • 15
0
votes
1 answer

why retracted fact template is still available?

I am trying to modify a fact of a fact-template in clips using ClipsPY. Following code retracts and reasserts the fact. Why is it that after the fact is retracted, the slot value s_2 is not nil on reassert? run.py import clips clips_env =…
greenlantern
  • 374
  • 1
  • 3
  • 15