clara

http://www.clara-rules.org/
Matthew Pettis 2019-12-31T18:19:05.020700Z

Does anyone know of any examples of clara-rules that solve logic problems? Or similarily, sudoku? I'm looking for examples of rules, or good architecture, to make rules that enforce unique exclusions. Such as in logic problems found here: https://www.brainzilla.com/logic/logic-grid/apples-to-apples/

Matthew Pettis 2019-12-31T18:20:46.022400Z

I"m looking to do this in an industrial setting ("machine A can't be on if machine B is on", or "machine B cannot turn on unless machine A is already on", etc.) Logic puzzles seem to be a template for what this concept is...

2019-12-31T19:29:41.023400Z

https://gist.github.com/geraldodev/076ccb995db907644070f134656fb74b Hi can you comment on this gist. It looks like defsession with :fact-type-fn does not stick with the var

Matthew Pettis 2019-12-31T20:05:22.023600Z

Thank you, I'll check out.

Matthew Pettis 2019-12-31T20:09:09.023900Z

Sorry, thought this was related to my question...

ethanc 2019-12-31T20:54:59.024100Z

@geraldodev, I don’t typically use the defsession macro, but it seems to me that it is building the call to mk-session differently. https://github.com/cerner/clara-rules/blob/master/src/main/clojure/clara/rules.cljc#L368

(mk-session [:fact-type-fn :type])
vs
(mk-session :fact-type-fn :type)
so the session in this case is empty(no productions) due to defsession not appending the current namespace.

ethanc 2019-12-31T20:57:30.024500Z

To get this to work,

(defsession session `app.mv.clara2 :fact-type-fn :type)
the namespace would have to be provided