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/
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...
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
Thank you, I'll check out.
Sorry, thought this was related to my question...
@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.To get this to work,
(defsession session `app.mv.clara2 :fact-type-fn :type)
the namespace would have to be provided