clips

Does anyone have experience with Clipsmm?

Hey Stack Overflowers, I have been looking at using CLIPS as an expert system for a simulator i am working on, and so i had a look at clipsmm. The only problem is that their sourceforge page has broken links and private forums. I was just curious if anyone has had experience with clipsmm (i have learnt how to use CLIPS as a stand alone a...

Aggregating Facts in the CLIPS Expert System to Find a Maximum

I'm trying to clarify my understanding of semantics in the Clips expert system, so I'm trying to write some simple rules to aggregate a list of facts to find the fact with the highest slot value. The metaphor I'm using is that of a simple agent trying to decide whether it should eat or sleep. Facts describing the agent's states are expan...

How to read line in CLIPS?

I need to read a string in CLIPS so i'm usign (readline) but it doesn't seem to work. It doesn't let me enter anything and it just returns "". Any ideea what's the issue? CLIPS> (readline) "" I'm using latest version of http://clipsrules.sourceforge.net/ ...

Clips matching expression is not working

hello in clips i have this template: (deftemplate cell(slot x)(slot y)(slot alive)) and this fact : (start 1 1) then i have this claus in the LHS : ?start<-(start ?x ?y) and i want to get the variable ?a1 (cell (x (+ ?x 1) )(y ?y)(alive ?a1)) it seems that it's not allowed to add to the variable "(+ ?x 1)" so how can i achive what i wan...

Strange errors in Clips

Hello, I want to make a program in Clips which generates all the partitions of a number. First of all I start with the number like his basic partition: (1 1 1 1 1) if it is number 5, etc. (deftemplate partition (multislot p) ) (deffacts facts (p 1 1 1 1 1) ) (defrule adds (p $?a ?b ?c $?d) (not (p $?a (+ ?b ?c) $?d)) (not (...

Using Python Functions From the Clips Expert System

Using PyClips, I'm trying to build rules in Clips that dynamically retrieve data from the Python interpreter. To do this, I register an external function as outlined in the manual. The code below is a toy example of the problem. I'm doing this because I have an application with a large corpus of data, in the form of a SQL database, whic...

Dereferencing a Slot in a Matched Fact in Clips

How do you dereference a slot in a fact matched in the LHS of a rule? If a variable matches a fact, I can't find how to create further conditions that match slots within that fact. For example, in the code below, I want to print some text if there's a fact of the form "(do (action ?action))". However, ?action is itself a fact, and I ...

Counting Existing Facts in the RHS of Clips Rules

How do you test for fact existence in the RHS of rules in Clips? I'm trying to design a rule that will "score" the current state by counting how many goal facts exist. It's obvious how to test for facts in the LHS, but I can't find how to do the equivalent in the RHS. I want to do something like this, albeit this isn't valid Clips code:...

Propagating Clips Error Messages in PyClips

I'm finding it very difficult to develop with PyClips, because it appears to replace useful error messages thrown by Clips with a generic "syntax error" message. This makes debugging very laborious and practically impossible on large codebases when using PyClips. Consider the following example. I wrote a very large expression, which con...

Datalog vs CLIPS vs Prolog

As many programmers I studied Prolog in university, but only very little. I understand that Prolog and Datalog are closely related, but Datalog is simpler? Also, I believe that I read that Datalog does not depend on ordering of the logic clauses, but I am not sure why this is advantages. CLIPS is supposedly altogether different, but i...

Concatenate video clips with HTML <video> tag?

I am working on a web-based video editor. I wanted to be able to take clips from multiple video sources and create a single video from them (probably using handbrake of ffmpeg). Here's an example of what I'm looking to do: http://www.kaltura.org/apis/html5lib/mwEmbed/modules/Sequencer/tests/Sequence_Editor.html It reads from a SMIL...