FAQ Database Discussion Community


how to force Clips to stay at the rule until is totally finished with the data without redundancy?

clips,expert-system
i want clips to follow my order with firing the rules. i have used "state" template to make sure rules will execute at my order(conflict resolution), by modifying slot "status" after firing each rule. but, clips modifies "status" after the first execute of the rule not after fishing all accepted...

Can I compare existing fact values to random numbers on the RHS of a defrule?

clips,expert-system
I am working on a Dots-and-Boxes game and the code I have thus far is: (deffacts Game_Start "Sets turn number to 1 and next turn to player" (turn_num 1) (next_turn p) (Line_Taken 0)) (defrule First_Three_Moves "Used for the first 3 moves of the game" ?f <-(turn_num ?t_num) (next_turn p) (or(turn_num...

CLIPS input taking and comparison

clips,expert-system
I need to take in input from the user which color and then output the flags that contain that color. I have this so far. I am pretty sure that the setup of my templates is correct. I just seem to be having issues with the input and the comparison...

prolog rules as arguments

prolog,artificial-intelligence,expert-system
I'm building an expert system shell based on Luger & Stubblefield's ExShell. In their system, they define rules in the following way: rule((Goal :- (Premise)), CF_Rule). Ignore the CF_Rule. An example of this syntax is: rule((fix(Advice) :- (bad_component(X),fix(X, Advice))), 100). I want to add an OR in certain rules, but...

First CLIPS code doesnt work

system,clips,expert-system
I wrote my first CLIPS code for a school project but I am not familiar with CLIPS (I use C# and python as main languages). This is my code and the errors I am gettin: (defrule determine-closing-date (not (day-to-close ?)) (billing-size ?) (unpaid-invoices-number ?) => (if (or (< billing-size 1000000)...

CLIPS incrementing variable without endless loop

infinite-loop,clips,expert-system
I would greatly appreciate some assistance with my CLIPS project. Okay so I'm attempting to create a dog breed adviser. The deftemplate looks like this: (deftemplate breed (multislot name) (slot size) (slot type-owner) (slot Living_Space) (slot children) (slot grooming) (slot exercise) (slot noisiness) (slot trainability) (slot aggression) (slot playfulness) (slot...

CLIPS defrule checking if multiple sides of a box are taken

clips,expert-system
I am working on a program that will tell me which moves to make in a dots-and-boxes game. I am trying to implement a defrule that will check to see if a box already has 2 of the possible 4 sides taken. If this is the case then I don't...

Write farsi in CLIPS(expert system)

clips,expert-system
I try to implementation a Expert System with Clips but clips doesn't support Farsi. How do I write Persian in CLIPS? Thank you....

Passing Values from Java to Jess

java,expert-system,jess
I have to send some values from the Java class which calls the Jess script for processing in the Jess script. This is my code till now: int val1=0; int val2=1; Rete engine = new Rete(); Value val = engine.batch("abc.clp"); System.out.println("\n"+val); engine.watchAll(); How do I pass the values val1 and...

expected the beginning of a construct error

clips,expert-system
When I run system, it shows error "expected the beginning of a construct" .. how can I correct this mistake my rules look like this (defrule UFP (not (repair ?)) ?f <- (rule1) => (retract ?f) (printout t "Finish UFP (y/n) yes> go to rule 10 - Advise : Select...