clara

http://www.clara-rules.org/
2018-06-27T00:00:30.000383Z

@jeremy642 I believe what you are referring to was a bit of an experimental project and not actively maintained.

2018-06-27T00:01:06.000223Z

It maybe this https://github.com/rbrush/clara-tools

2018-06-27T00:03:05.000324Z

@tony.kay you can provided collections of rule structures to mk-session. It doesn’t only accept namespaces. You can also define a var that holds a collection of rules and give it metadata :production-seq. So that single var name can be passed.

2018-06-27T00:03:18.000261Z

Different ways to do things. Depending on your goals.

2018-06-27T00:04:01.000024Z

However sometimes it can be fine to combine into larger rule sets. Rules that don’t match facts won’t contribute much to runtime.

tony.kay 2018-06-27T00:13:21.000126Z

Ah, I misunderstood how mk-session worked…my bad

2018-06-27T00:54:10.000204Z

No problem!

jeremy 2018-06-27T02:22:43.000210Z

@mikerod Thanks

jeremy 2018-06-27T17:20:58.000191Z

I have a bunch of rules that derive some final state fact. What I run into is that multiple rules might match and in the end I get multiple results. So in the standard decision tree, there is order to the final state precedence. Would it be appropriate to add a priority property to these final state results and then query on that priority to narrow it down to a single result?

2018-06-27T17:58:21.000335Z

@jeremy642 that is one approach

2018-06-27T17:58:33.000273Z

I think I’ve answered variations of this question a lot of times, but don’t think it’s saved anywhere

jeremy 2018-06-27T17:58:42.000284Z

🙂

2018-06-27T17:58:43.000049Z

you can prioritize rules by building a tiered structure to them

2018-06-27T17:58:49.000149Z

or you can let them all fire

2018-06-27T17:58:55.000160Z

insert some “intermediate fact”

2018-06-27T17:59:13.000509Z

then have 1 more rule to accumulate all “intermediate facts” and insert your final fact based on the aggregate of them

2018-06-27T17:59:27.000036Z

I can give examlpes in a bit if needed

2018-06-27T17:59:50.000142Z

I guess I have one example of one approach here https://gist.github.com/mrrodriguez/6a6f8373b25d69826b3efe154c928fac#file-clara_tiered_fact_update_rules-clj

jeremy 2018-06-27T18:11:36.000099Z

Thanks. I'll check it out and play with it.