Questions tagged [clips]
CLIPS is an acronym for C Language Integrated Production System, rules-based programming framework designed for building expert systems.
714
questions
-1
votes
1
answer
65
views
How can you vary the facts using lists in clipspy
I have tried to vary the facts using lists and a cycle for but I have not succeeded, The way I tried it is to create a list for each variable in the template and then apply an cycle for but it didn't ...
0
votes
1
answer
17
views
CLIPS re run the entire program automatically
I have a program in CLIPS that when it starts ask the user for some inputs. I want when is no other rule to execute and finished to run again automatically the (initial-fact). Is there a way to do it?
0
votes
1
answer
29
views
hey i have a problem in this clips expert system code its not printing the result
this is a Diet and Nutrition Expert System i have a problem that i cant print the result to the user after entering the input so can any one help me to make it run correctly?
(defrule read-gender
(...
0
votes
1
answer
34
views
hey i have a problem in this clips code can any one please fix it?
this is a clips expert system code to make a diagnosis for a disease so i am trying to find out whats the problem in that code and i really dont know what to do
[CSTRCPSR1]
[CSTRCPSR2]
error
defrule ...
0
votes
1
answer
20
views
Member$ application in clips
This is the question I am faced with:
Depending on the type of the JDB, write a rule stipulating what to do when a JDB is in LTB or LTH. using member$
Initialisation:
(defrule to-do
(declare (salience ...
0
votes
1
answer
32
views
How can I write find-instance in def-rule in CLIPS?
What is Wrong with this defrule as it always give me this error
[PRNTUTIL2] Syntax Error: Check appropriate syntax for defrule.
ERROR:
(defrule MAIN::print-university-info
?university <- (...
0
votes
1
answer
50
views
I get a syntax error when executing the code using clipspy
I don't see the bug in the syntax of the program, the error I get is this:
Reglas.CLP, Line 6: Syntax Error: Check appropriate syntax for defrule. ERROR: (defrule MAIN::...
0
votes
1
answer
36
views
How to accumulate slots of facts?
I have the following two deftemplates:
(deftemplate effect (slot type) (slot value) (slot explanation))
(deftemplate result (slot type) (slot total_value) (multislot total_explanation))
and the ...
0
votes
2
answers
41
views
Why does this error occur when creating an expert system in Python using clipspy?
When I run the code I get this error:
clips.common.CLIPSError: [CSTRNCHK1] test.CLP, Line 7: A literal restriction value found in CE #1 does not match the allowed types for slot 'Presencia'. ERROR: (...
0
votes
1
answer
40
views
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 = ...
0
votes
1
answer
63
views
Am writing a project, my code will be in the form as describe below in the code, Is there any need to include salience and how can I use interface?
Am writing a project, my code will be in the form as describe below in the code, Is there any need to include salience and how can I use interface? The software will require the user to answer a ...
0
votes
1
answer
41
views
I want this Clips program to compare 4 symptoms of disease using if then(the symptoms are ows, yhp, sda and dgb)
I want this Clips program to compare 4 symptoms of a disease Bacterial fruit blotch of watermelon using if then rules of Clips (the symptoms are ows, yhp, sda and dgb). the issue is when I run the ...
2
votes
1
answer
32
views
CLIPS Error: Illegal use of the module specifier in clipspy
I'm using clipspy. I want to define some module-rules to assert module-facts. The rule is based on facts from multiple modules. I get a CLIPS Error:
Illegal use of the module specifier
import clips
...
1
vote
1
answer
25
views
How to obtain user input (as a number) to be applied to an equation
I am trying to program a scenario where a user will input two pieces of information, a 6-minute walk distance in meters at baseline (6MWDbaseline) and then a 6-minute walk distance in meters at 24-...
0
votes
1
answer
36
views
Create rules in CLIPS and template person
Template Person
a. Define a template for person, contains full name, children names
b. Define a rule that prints the parents that have more than 3 children
c. Define a rule that print the parent of a ...
0
votes
1
answer
12
views
Test Templates against each other in CLIPS RULES
How do I test if all variables in template equal variables in different templates or if they don't. Need to have different outcomes from each output.
Attaching my code below:
``;;;;;;;;;;;;;;;;;;;;;;;;...
0
votes
1
answer
65
views
how to read a data file that contain "name grade" and Calculate the GPA in clips
how to calculate the GPA in clips after reading from the file
the file is:
a 10 9 13 7
b 12 3 10 14
c 8 10 12 10
d 15 8 14 9
output:
a (10 9 13 7) 9.75
b (12 3 10 14) 9.75
0
votes
1
answer
20
views
CLIPs How can I print all defacts as result throught a Defrule? Or be able to insert multiple traits as answer?
I'm working on a project that let's users find a list of jasmines based on flower color and blooming seasons, but I haven't found an effective way to be able to print all jasmines currently on the ...
-1
votes
1
answer
24
views
CLIPS: How can I allow users to input sentences as answers? Jasmine Flower Guess
Im currently working on a CLIPS program that guesses the name of the jasmine flower based only on the flower color and season, but I don't know how to use sentences as possibles answers to be able to ...
0
votes
1
answer
16
views
CLIPS How can I create a print out for when the values inserted are not any of the options?
I need to add to my program a print for when the user inserts values that dont correspond to the existing fruits on my program.
(clear)
(deftemplate fruta
(slot nombre)
(multislot color
...
1
vote
1
answer
96
views
In custom Instrument, how can I include the duration in a value
I have a custom Instrument with a os-signpost-interval-schema that captures a "state" string. I would like the final plot value to be <state>: <duration>, but I don't know how to ...
0
votes
0
answers
75
views
Python Rule Engine
I have a set of rules that I need to apply on a couple of python objects and I am wondering how could I do this. The main goal would be to run my object through the set of rules and obtain which rule ...
0
votes
1
answer
49
views
How to use comparison operators on previous user input in CLIPS?
I'm a beginner to CLIPS. The goal of this program is to return the name of the company that best matches the user's demographics. I ask the user their gender and (might be storing it wrong) store it ...
1
vote
1
answer
51
views
Handling CLIPS C functions' return values as string(s)
I'm calling CLIPS Eval() and other functions from my C code and need help understanding how to handle return values that are CLIPSValue or UDFValue. A simple example ...
...
CLIPSValue cv;
UDFValue ...
0
votes
1
answer
51
views
CLIPS - compare 2 facts if are equal, with wildcard in rule
I am trying to create rule which compares in this way:
CLIPS> (assert (flower red yellow))
CLIPS> (assert (flower blue yellow))
CLIPS> (assert (isflower yellow))
CLIPS> (defrule has_color2
...
0
votes
2
answers
81
views
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 ...
1
vote
1
answer
56
views
What causes this segmentation fault in clips 6.3 when evaulating a NeqFunction
TL/DR:
I encounter segmentation faults using clips 6.3 within a large robotics framework and I would appreciate any hints of what could be causing them (e.g., is this something that is known and is ...
0
votes
1
answer
31
views
how to modify ordered (non template ) fact, say the nth value?
modify is not working. I expected fact 1 to be (a x y z).
Further, if I want to change the second element c of the fact 1 to say g, i.e the new fact should be (a b g d) is there a way using modify ?
...
0
votes
1
answer
144
views
Get list of slot names or slots from a deftemplate by name
Using the .NET wrapper, I have a c# method that is passed a deftemplate name and needs to iterate over all facts which are based on that deftemplate. The following code works but requires that I know ...
3
votes
1
answer
74
views
In Clips, Can I use the Instance to completly replace the Fact? What‘s the meaning of Fact's existence?
In my opinion, The Instance can do everything that Fact can, What's the meaning of the Fact's existence? In other words, What is the difference between the Instance and the Fact? Is there a situation ...
0
votes
0
answers
32
views
Can you use CLIPS to run on 3-valued logic?
Running if not X, assert Y with no initial fact resulted in Y.
From this I thought that CLIPS was a 2-valued logic. Is there a way to enable 3-valued logic in CLIPS?
0
votes
1
answer
36
views
Preventing CLIPS Rule from firing twice
How could I prevent the following rule from firing twice, without retracting the initial facts?
CLIPS>
(defrule cf_calculation
(CF ?cf1)
(CF ?cf2&~?cf1)
=>
(bind ?fCF (+ ?cf1 ?...
0
votes
1
answer
41
views
CLIPSjni integrated JADE java
I just started working with CLIPS integrated with Jade one agent.java, I have my facts and rules loaded in different .clp files, I already spent a lot of time trying to compare what I think are ...
1
vote
1
answer
69
views
CLIPS finding most common element across multiple multislot
I'm trying to find the most common element across multiple multislot entry of type symbol and I don't seem to get a decent way to extracts the content of those multislot to single entry to iterate ...
0
votes
1
answer
51
views
Nesting multiple If-then-else statements
I'm trying to make a CLIPS program that takes in a patient's and donor's blood type and returns if the doctor should go forward with the transfusion. When I load in the program, I get a FALSE flag at ...
0
votes
1
answer
61
views
How to calculate asserts with 2 same parameters in CLIPS?
I am new of CLIPS. I would like to calculate the average of asserts with two same parameters. For example, if i have this template:
(deftemplate quiz
(slot id (type INTEGER))
(slot course(type ...
0
votes
1
answer
101
views
How to pass a parameter in defrule function? CLIPS
I am new of CLIPS, thanks for your help.
THE ISSUE:
If I have below template:
(deftemplate user
(slot id (type INTEGER))
(slot firstname (type STRING))
(slot lastname (type STRING))
(slot ...
1
vote
0
answers
271
views
Publish jar to maven local and use this dependency in root project
Update
I would like to use external library that is not available on maven repository.
Currently, I have subproject called libs and within CLIPSJNI.jar
In Gradle.build of root project I declare ...
0
votes
0
answers
39
views
Clips not providing answer
So I get the program to say enter name. However, once I enter the name it doesn't output any other information. I'm trying to get it to print out the name, class, magnitude, and distance. Where am I ...
1
vote
1
answer
40
views
CLIPS program testing strings
Trying to ask for a star's spectral class and return those that meet the requirement. I am getting a syntax error in my p1 rule.
(deftemplate star
(slot name)
(slot spectral)
(slot magnitude)
...
0
votes
1
answer
59
views
How normalize case sensitive input using read in CLIPS?
I am a beginner in CLIPS. I need to interact with the user using read function. My problem is if the user says Yes is different to YES and to yes.
I was looking a long time in the documentation but I ...
0
votes
1
answer
49
views
clips how to make rule match forall but one
How could i make a rule that test if all facts from a deftemplate but one matches an specific condition?
Example: with
(deftemplate person (field name)(field hair-color))
having several blonde people,...
0
votes
1
answer
75
views
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 ...
0
votes
1
answer
33
views
clips rule incongruent matching with several conditional elements
I have this rule:
(defrule tio-varon
(hermano-de (persona1 ?tio)(persona2 ?padremadre));
(or
(padre-de (padre ?padremade)(hijo ?hijo))
(madre-de (madre ?padremade)(hijo ?hijo))
...
0
votes
1
answer
43
views
mantain CLIPS running when asserting new facts
It's possible to keep CLIPS running while asserting new facts?
example of execution
It would be possible not to have to make (run) to test this program after each assert command? I mean, making only ...
0
votes
1
answer
43
views
How to remove redundancies in a multifield in CLIPS?
Suppose we have ordered multifield facts such as:
(serie-1 7 7 5 5 1 1)
(serie-2 8 3 8 3 8 3)
(serie-3 6 4 9 4 6 2)
The problem is to remove redundant fields from this ordered multifield facts to ...
0
votes
1
answer
33
views
Pattern #1 field #2 has constraint conflicts which make the pattern
I would like to make this rule
(defrule practica-superada1
(or
(and
(oav ?alumno p1 apto)
(oav ?alumno p2 apto)
)
(and
(oav ?alumno p1|...
0
votes
1
answer
92
views
Clips 6.4 not generating initial-fact?
I'm testing if CLIPS generates the initial-fact after a (reset) command with CLIPSIDE 6.4. But it don't generates it.
It's dissapeared this initial-fact in the last versions?
Screenshot of clips (...
0
votes
2
answers
47
views
Variable Order of values in LHS, OR/AND operators
I'm trying to define a rule by this form:
;Plantilla Ficha de paciente
(deftemplate FichaPaciente
(multifield Nombre)
(field Casado)
(field Direccion))
;Plantilla DatosExploración
(...
0
votes
1
answer
133
views
CLIPS: Clear-window in CLIPSDOS.exe and tab to indent in CLIPSIDE
With CLIPS, It's possible some of the following?? (V 6.4 for Windows)
1 - Use a command like (clear-window) in the CLIPSDOS console for clear the console.
2 - Use tabs for indentation in CLIPSIDE. ...