Usenet.com

www.Usenet.com

Group Index

Comp Thread Archive from Usenet.com

<-- __Chronological__ --> <-- __Thread__ -->

Re: CLIPS Question.



Possibly you could create, using your weighting of desirables a desirability
score and select the highest scoring desirables.

This may be a job for case based reasoning, not rule based reasoning.  

That said, I don't know of a free case based shell you could use that would
accomplish this.

Julie

StupendousMan <[EMAIL PROTECTED]> wrote:
> I think shells is the right group for this question.

> I am creating my first clips program and I have had a good read through 
> the Giarratano and Riley book but I think this is more of a taste/style 
> issue.

> I basically have two pools of objects that I need to match up based on 
> how well suited they are to each other.  There are numerous ways that 
> objects can match with each other, but in the end I need to end up with 
> one on one pairings of objects.  (no this isn't a dating service :-) )

> I have several dozen parameters that the objects could have in common, 
> which can be broken into two groups: mandatory and desirable.  Of course 
> the mandatory parameters must be met, which is easily done in CLIPS, but 
> its the desirable parameters that have me confused.

> Naturally, I want the object with the most matches in the desirable 
> group.  I'm really not sure how to accomplish this.

> If the desirable traits had some sort of weighting, I could create a 
> rule with every trait, give it the higest salience, then make another 
> rule with slightly lower salience that has one less trait in the LHS.

> The only solution I have come up with seems to be very inefficient, and 
> somewhat contrary to the principles of the language, but here goes (in 
> pseudo code)

> Add two new slots to the object, matches_mandatory and count_desirables

> IF object matches all mandatory constraints
>       THEN set matches_mandatory to true.

> IF object matches_mandatory AND matches desirable_quality_1
>       THEN set count_desirables = count_desirables + 1

> IF object matches_mandatory AND matches desirable_quality_2
>       THEN set count_desirables = count_desirables + 1

> blah ... blah ... blah...

> Finally, the object with the highest count is the right one and the rest 
> can be reset for the next object that comes along (since it will have 
> different desirable traits that it is looking for)

> Is there a better way?

> Rick


-- 
Julie 
**********
Check out my Travel Pages (non-commercial) at 
http://www.dragonsholm.org/travel.htm



<-- __Chronological__ --> <-- __Thread__ -->


Usenet.com



Please check out one of the premium Usenet Newsgroup Service Providers below for access to Usenet.