Fork me on GitHub
#clara
<
2018-05-07
>
jimbob15:05:19

Has anyone explored the area of exploration for why rules left-hand-side did not meet the rules prerequisites for firing of the RHS?

mikerod16:05:50

@ben.borders In a way yes. That is, if I understand your question.

mikerod16:05:48

Not directly that though, instead you could consider a pattern to create complementary rules to the primary rules. These complementary rules were meant to catch the opposite case of the assertions.

jimbob16:05:40

yes, thats exactly it.

jimbob16:05:26

Interesting.. im assuming then there are multiple complements to each core “rule”. maybe the # of complements = the number of left hand constrints or something similar? unless your compllement rule that is generated has more complex logic

4
mikerod16:05:50

I think the structure of generated rules may depend on which sorts of things you need to capture

mikerod16:05:22

You could end up writing rules in an alternative fixed format that can generated several “tiers” of rules from it. so there was the typically rule where you tried to match, but then there were tiers of unsatisfied matches where different parts of the rule were successively removed

jimbob16:05:30

ah interesting, so you made the rules very granular so that the complements might be easier to generate?

4
jimbob16:05:55

well.. the main rule you cared about at least.

mikerod16:05:57

In that example, you can see it’d get carried away if you tried to capture everything perhaps

mikerod16:05:13

but maybe you could split the “constraints” you want to test for into logical “chunks”

mikerod16:05:52

And when it comes to joining to other facts, you can do somewhat similar things

mikerod16:05:13

but you have to capture the case that facts you are joining to may not be satisfied themselves

mikerod16:05:41

So you have to basically just come up with a way to structure these aspects you care about, then probably write something to generate the rules via some extra metadata markup on what is hand-written

👍 8
mikerod16:05:30

I don’t think it is a trivial problem to solve and is going to end up being domain dependent. I think that this may also bring up another interesting question though regarding perhaps comparing the forward-chaining (as used in Clara) vs a backwards chaining approach to the problem

jimbob16:05:32

definitely! Thanks Mike this helps a lot!

mikerod16:05:53

No problem