Have You Implemented Backward Chaining On A Microsoft Rule Engine?

Every so often I hear about a “friend of a friend” who has implemented a backward chaining project with one of the Microsoft rule engines (WF Rules, BizTalk MS BRE). However, the details usually fail to materialize. If you have worked on such a system, or know someone who has – please contact me using the contact form on this blog. I’m interested in understanding more about your project and how successfully the backward chaining implementation went.

(As always – this is mainly personal interest, and does not reflect on any future directions of my employer’s products.)

7 responses to “Have You Implemented Backward Chaining On A Microsoft Rule Engine?”

  1. LOL. Karl didn’t say that I’m one of the people who told him it can be done. I will rise to the challenge, I promise, and document something. It’s actually quite straightforward in MS BRE, and a testament to the power of the ‘situated rule engine’ concept that Microsoft picked up from IBM Research via CommonRules and BRML, together with the predicate/function aspect of BRL, built-in functions and predicates (still there, essentially, in W3C RIF) and things like long- and short-term facts.

    I do want to do a bit more research on this before I blog. In particular, I’m intrigued by the prospect of implementing what others have called ‘full opportunistic backward chaining’. I am fairly confident this can be done, but I need to look a bit deeper at the idea of automating the instrumentation of rule sets before they are translated to Rete and executed. It would take some non-trivial coding.

    Another interesting bit of trivia. Turns out that you can quite easily implement ‘continuous query’ on top of BRE as well. Again, no in-built or explicit support (except, in a sense, the ‘halt’ and ‘execute’ engine methods), but it isn’t hard to do.

  2. Karl W. Reinsch says:

    Well, Charles, that’s because you aren’t guilty of making the “friend of a friend” type statements. I know that you’ll make good with your data in good time in one form on another. :-)

    I’m fishing for data regarding the multiple other instances I have heard about. Sure, it’s technically possible. But how many people have actually tried it? And of those people, how many did so for more than just an intellectual exercise?

  3. I know what you are saying, and for me this is certainly an intellectual exercise at the current time. I’m anticipating involvement in fairly heavy-duty rule design in a forthcoming project which will probably keep me occupied for half of this year, so maybe there will be occassion there to put things like backward-chaining into action.

    The problem I have with Microsoft asking how many of their customers actually do this for real is that we can safely give the answer. Broadly, none. No one does it because no one knows you can do it, understands how to do it or sees any reason why you would want to do it BRE is powerful (with some holes), but lacks the mature tooling and guidance to attract serious attention from most BizTalk developers. The only thing people like me can do is to point out the missed opportunity and pass on the knowledge…which I shall do.

  4. […] Engine (I even sent him a little example). A couple of days later he published a second post at http://karlreinsch.com/2010/01/11/have-you-implemented-backward-chaining-on-a-microsoft-rule-engine/. So, I shall rise to the challenge and explain how backward chaining can be done in the BRE. […]

  5. Karl, Charles

    And here I have to ask: backward chaining like what?

    It turns out that even in that world, there are as many different aspects to backward chaining as there are to forward chaining (you know, those pesky dynamic prios or not, conflict resolution choice, etc questions). The product I worked on before co-creating Blaze Advisor was a very powerful backward chainer, and, boy did we have discussions around the features…

    I would love to get a better understanding for the type of backward chaining support you are asking about.
    I am quite pleased to see that there seems to be a little bit of interest resurfacing on these technologies.

    Thx

  6. Karl W. Reinsch says:

    Excellent question, Carlos!

    I’m actually interested in any form of backward chaining implemented against one of the Microsoft engines: pseudo-backchaining via forward chaining, more traditional backchaining directly against the rule OM, etc.

    The question does occasionally come up from customers who are doing checklist comparisons against other products.

    I got tired of hearing about “friends” who had done it, but the example code never arrives. If I had a quarter for every claim to have done it – I’d have…well…a few dollars. (And Charles isn’t one of the guilty parties here.)

    I think Charles nails it when he says that the answer is effectively that people aren’t doing it.

    I haven’t had a chance to really dig into what Charles has posted yet, so I can’t answer authoritatively about what he built.

  7. Refgal says:

    Good question. I rellay prefer backward chaining as it teaches the final step first. If the skill we are teaching is not followed by a naturally occurring reinforcing consequence, we can build it in. This helps increase motivation to complete other parts of the chain.As far as forward chaining, we can deliver a reinforcer following each step thus increasing motivation to engage in that part of the chain again in the future. You could include some method for teaching the student about the end result, but that can sometimes be tricky. Think about teaching a student to tie his shoes. Forward chaining is probably the easiest way to teach this skill. I would think it is easier to deliver a reinforcer following each step than to try and teach the student about the clear ending point of tying shoes.Concrete endings sounds like it might have more to do with the TEACCH idea of visual supports. A visual schedule helps teach the child when they will be done with a series of activities. Work systems have similar visuals to support a clear start, middle, and end of the activity. These practices have been very effective for improving productivity and decreasing problem behavior, though I am not sure there is research specifically showing that it is the idea of a concrete ending that makes them effective interventions. That would be interesting research to conduct

Leave a Reply