Another detail overlooked...

So, I was reading through the Doorenbos paper on the train home from work today and I realized that I haven't implemented JoinNodes correctly. Damn! And I had just uploaded the source code to www.pulp.se/johan/. Well, this gives me another chance to polish up those comments before you get to see some code.

The good news is that I think I've made it more complex than it needs to be. Maybe that's why it's sooo slow :-)

1 kommentar:

woolfel sa...

Having read Doorenbos RETE-UL paper about 30+ times, the implementation described in pseudo code actually isn't efficient. Maintaining global bindings ends up hitting a performance bottleneck when the data is large. The approach used by Drools3, Sumatra and JESS is to use late binding and not maintain a global list of bindings as doorenbos describes with the doubly linked lists.

Up on sourceforge http://www.sourceforge.net/projects/ruleml-dev/ you'll see the approach I take, which is also what Drools3 uses. Going with the approach described by doorenbos, you'd have to end up rewriting it, so save yourself some time and go with late binding. it makes sense especially since you're using a scripting language like python.