2007-11-19

Yet another starting-over post

This is the fifth time I've decided to start over (more or less from scratch) in my attempt to produce a Rete rule engine in Python. It' irritating that it's so hard to get the pyRete code into a shape I'm pleased with and I've been feeling kind of low these past few weeks since my last attempt to beat the RuleCompiler into submission failed miserably.

I know that developing a rule engine is no easy task and that others have devoted large portions of their lives doing it so 2 years isn't that much, really. I'd feel a whole lot better though if I was sure that I won't write this post again in a year or so.

5 kommentarer:

woolfel sa...

I recently refactored the rule compiler in morendo branch. It's a lot less ugly and should be a bit simpler to understand. If there's any particular part of the rule compiler that is obtuse or hard to understand, I can write a detailed explanation on my blog.

Johan Lindberg sa...

Thanks Peter,

It would definitely be interesting to hear about Jamocha's RuleCompiler so if you have the time, please go ahead.

The problem I'm having is actually quite Python specific but then again, I've not really found a good representation for transporting information from python source code to rete network either so any tips are welcome.

woolfel sa...

where is the latest source? I'll take a look and see if I have any useful tips. I don't python, so I'm doubtful I have anything useful to add :)

Johan Lindberg sa...

Thanks, that'd be really great of you. The *latest* source is actually on my computer but since it doesn't work as expected anyway I guess you could just as well look at the subversion repo.

The monstrosity that causes the most trouble is captured in the _construct_rete method which you'll find in rulecompiler.py: http://serf.svn.sourceforge.net/viewvc/serf/pyRete/rulecompiler.py?revision=78&view=markup

woolfel sa...

I downloaded the file. will read it the next few days.