Friday, October 24, 2008

ORF 2008 - First Report

Greetings:

Third day just starting. This supposed to be the "meat" of the conference. We had desert the first day. Veggies the second day. Raw meat today. Brief recap of the most memorable presentations:

--- Wednesday ---

Rolando Hernandez did a great explanation of Zachman's framework showing how rules fit into the the enterprise. Several Red Hat guys (not the Drools guys) commented that this was what they needed; something that was not so geeky but at a higher level.

Jason Morris: Great talk on Ontology, a subject that few rulebase people ever consider since most are not AI graduates but probably computer science and C/C++ or Java geeks who just drifted into the field.

Edson Terelli: Covered what Drools is doing with the early stages of Complex Event Processing without drifting too much into a product demonstration, something that seems really difficult for the Drools guys because they are all so hyped by their own product. Even Dr. Frogy commented that the talk was really good.

Michael Neal stayed home with his pregnant spousal unit who was due on Thursday of ORF week.

Kris Verlaenen stepped up to delive Mic's talk Guvnor. But he got interrupted by yours truly when he announced that he would now do a Drools demo, something that is totally against the spirit of ORF. I'm sure that his talk would be perfectly suited for some other forum, perhaps a Drools marketing seminar or Java User's Group somewhere but not here. So, we got some wires crossed and Mark Proctor's personality and mine crossed for a few minutes and the talk was over. Me? I blame Mic for hanging Kris out to dry like that. :-)

Pub Night One turned out to be OK since most of us just sat around the hotel lounge and swapped war stories. Some went to supper at one place and some to others.

--- Thursday ---

Dr. Dan Levine opened with a keynote of how the human brain process various thoughts, rules and emotions. I think that knowing how rules are processed in the brain would play a very important role in knowledge acquisition. After all, this whole field owes the origins to the psychology field.

Carole Ann Berlioz-Matigon: Showed us the "other world" of Business Intelligence and Business Analytics and how a rulebase fit into that environment, especially the score card part. I think that most rulebase guys rarely consider that rules play a small part of an overall enterprise IT approach such as that provided by Fair Isaac and other companies.

Carlow Seranno-Morales: Covered Enterprise Decision Management (EDM) from front to back in a gritty (fairly technical) point-of-view. What he and Carole Ann demonstrated was that a rulebase is not the complete answer for a large enterprise - rather it takes of vendors and products that are tightly integrated and rules can be only a small part (sometimes 1/10) of the total solution. The two talks were excellent.

Daniel Selman gave a presentation on sequential rules that verged on product marketing but stayed just out of reach of the "the hook". One thing that he said was that ILOG has a product that is called Rete Non-Node-Merging or something like that. Rete without node merges is not Rete and Dr. Forgy confirmed it later.

Pub Night Two proved to be another bust but lots of great conversations because of the many groups. One such group was composed of Dr. Forgy, Dr. Hicks, Mark Proctor, Gary Riley, Edson Terelli and myself with Steve Nunez joining late. I wish that we had a recorder for what we discussed but one thing came out of it: a slide for my presentation the next day. :-)

--- Friday ---

Rick Hicks: Validation and Verification - mostly verification. This guy is the guru of gurus on this subject and has created modules for CLIPS, OPSJ, Jess and others. He is a professor at Texas A&M but he has his own company, EZ-Xpert. He has published several white papers on his two-tier system; these papers explain WHAT any verification system needs to do to be called a verification system. Excellent talk. Of course he seems to believe that all of the Conflict Resolution Strategies are wrong and that inference engines are most times not needed. See the site for his paper or video presentation.

Gary Riley: (inventor of CLIPS, C Language Integrated Production System) who started at NASA and has been working on the one set of code for 23 years. Being free (or $300 from Comix, the official vendor for CLIPS) this is the "standard" by which so many other rulebased systems are judged. Gary was a very capable speaker and led us deeper into the labyrinth of CLIPS. Beginning with the early days of CLIPS and the reasons for why he did things. He stressed that we need more documentation and many, many more examples to aid the users to understand the systems. Speed is essential. He also talked about how he improved performance on the CLIPS system. A really excellent presentation.

Mark Proctor: (inventor of Drools) did a great discussion on pattern matching, collections, from, etc. Mark also discussed more on multiple entry points on rules for parallel processing.

James Owen: (Yours Truly) Gave a substitute talk (Gary stole my benchmark presentation!) on the original 1979 Rete Algorithm, a second part on the Four Forms of Chaining and, finally, a really brief, four-minute introduction to The History of Parallel Rulebased Programming.

Dr. Charles Forgy gave us a heads up on Parallel Rulebased Programming and why it will be the future of rulebased programming. From what he presented, we, as rulebased systems professionals, need to plan how to parallelize our products and services. Excellent presentation.

Yaakov Kohen showed up and listened in. Interesting fellow.

Pub Night Three turned out pretty good since about 25 of us went to Bone Daddy's, a popular Texas Bar-B-Que joint in North Dallas. Kind of like Hooters but with much younger girls. The food is so good that my wife takes me there from time to time. I'm not allowed to go by myself. :-)

--- Conference Wrap-up ---

LOOONNNGG session on what we wanted more of, less of, suggestions, questions, etc. I hope Rolando and Greg took good notes because we ran out of film before we got very far into it. Here is what little that I gathered:

What attendees want:
1. More question time
2. More time for talks.
3. Donuts and Bagels for breakfast
(David Butler brought donuts on Thursday)
4. Warmer room / Cooler Room / Dimmer Room / Brighter Room
5. MORE Technical talks and less B.S. about products UNLESS it was applicable
6. Maybe two tracks next time; one for beginners and one for Uber Geeks.
7. BOOKS on the subject - what we have is old
8. How To Books on the subject
9. Field is too hard to get into and understand
10. Three days is just about right, not five and not two.

However, we did point out that even selling the few shirts that we had we would probably lose money on the event so everyone agreed that the event should be between $300 and $500 next year (if there is a next year) to help pay for expenses. Apparently setting the cost to $150 to encourage students backfired on us since not one student from the USA attended and only one from the UK.

BTW, if you are an attendee and did not get a shirt and want one, let me know - for a mere $35 + ($10 S/H USA - $15 for outside USA) we'll send you one. Just let us know your size of S / M / L / XL / XXL / XXXL. Greg and I both wear an XXL and Edson Terelli took a Medium so judge accordingly.

------------------------------------------

My conclusions: Great presentations, good coffee, nice folks. For once, it was about 90% Geek and 10% marketing / sales rather than the other way around. If you missed, maybe next year at ORF 2009.

Last thing: Only one person had a comment about my photo. The photo is that of person (a really good friend of mine) throwing a flying side-snap kick with perfect form. What you don't see in the picture is that the person is about 6 feet tall and weighs 215 pounds at the time. If you could see the whole photo you would see that his striking foot is about 5'6" above the ground and he is not using a trampoline to get that high - just lots and lots of training and determination. It proves one thing; success is not easy but it can be done with hard work, determination, proper training and an extremely positive mind set. That's why I keep the photo around - to remind me to keep going when the going gets tough. (Yeah, it's corny but it's true.) Most failures happen because people just give up and begin to see how they can salvage the most from a failure.

Our field is not an easy one and entry to the top level will never be easy. Reading and hard study hurts the head. Planning hurts more. But remember the Seven P's: Proper Prior Planning Prevents Piss-Poor Performance. Also, it is not practice that makes perfect but Proper Perfect Practice Makes Matchless Perfect Performance. (Say that one three times fast!)

SDG
jco

Saturday, October 4, 2008

Full Opportunistic Backward Chaining Rulebased Systems

Greetings:

In this blog I will try to dispel the myth you can do Full Opportunistic Backward Chaining (FOBC) with a Forward Chaining (FC) rulebased system without making significant changes to the FC system. Actually, you can do backward chaining with a forward chaining system - BUT it would take a drastic re-write of all of the FC logic to achieve this and even then probably it would not work properly. So, what do you call it when you want to do backward chaining (BC) with a FC engine? Most of those in this field call it Goal-Driven FC - a misnomer if ever there was one. Which is another good reason to drop the explanation of a Backward Chaining system as "goal-driven" and the Forward Chaining system as "data-driven." A BC engine is or can be just as data-driven as a FC engine.

Before discussing chaining, we have to discuss Conflict Resolution - CR. All forward-chaining rulebased systems have some kind of method that will determine which rule to fire if there are more than one rule wherein all of the condition elements are true. This CR varies from vendor to vendor but, for the most part, they all seem to have recency (whether MEA or LEX or something else) as the first or second element in the CR algorithm. Usually this means for any given set of rules, they are resolved in the following order:

1. Refraction
2. Priority
3. Recency
4. Specificity
5. Arbitrary

OPSJ, a Java version of other systems developed by PST (Dr. Forgy) uses a slightly different variation on this where recency takes a higher order than

1. Refraction
2. Rule Class
3. Recency
4. Priority
5. Specificity
6. Arbitrary

At one time, most vendors posted (documented) their CR Strategy but not many do any more. In Jess and CLIPS you can (or used to be able to) set whatever CRS you wanted - usually depth was sufficient for most applications.

First, for the uninitiated, let's discuss a Forward Chaining (FC) engine. In the normal FC engine all of the data are loaded into objects (either embedded or external to the engine itself) and the rules are instantiated, initialized, started, whatever you want to call it. The rules will interact with the data in a non-monotonic manner until there are no more rules left to "fire" - meaning, to execute the "then" part of the "IF - THEN" rule. This is normal FC and what has come to be called "data-driven" rulebase, which is a misnomer because all rulebased systems use data to drive the rules one way or the other.

Now, what if we use a Goal-Driven approach with a FC? In that case (what is normally done today) the first condition element (CE) of a rule would be something like "if the goal.name == (goalName) " and, due the the recency factor or the CR discussed above and elsewhere, then rules would be "clustered" into those that have the same goal name when a new goal is asserted by any rule. The "goalName" could be a String, Integer, whatever you like. This is NOT backward chaining - this is simply clumping rules together much in the same manner that you might run a sub-routine in C/C++ program. It is the same effect as using a "focus" command in CLIPS or Jess. If this were C++ or Java it would be leaving the main chain of thought to run a sub-routine that might or might not return some value but would operate on whatever objects it needed. Nothing fancy here; Goal-Driven is nothing more than regular old rulebase logic with a first CE that would follow the goal.

Now, on to true Full Opportunistic Backward Chaining: The first thing is that the objects themselves must support this by being able to report to a calling routine whether the value of the slots (attributes) are known, unknown, not known, true / false / value. If a slot is known, then the object returns the value of that slot. But now we have two more wrinkles in the system in that of "not-known" - meaning that we do not know the value and we have not tried to find the value - and "unknown" - meaning that we have tried to find the value and we could not find the value. (Sometimes these are reversed in meaning but, regardless, you should get the idea.) I have always used the rule, "unknown and unknowable" to mean that we cannot find the value. If it were the other kind of state system, then I would use "not-known and never-knowable."

Here is where the wicket gets a bit sticky: If the value is not-known, then there must be some mechanism that will allow the rulebase to try and find the value. This is normally done via question handlers that will either ask the user to enter a value or go back to the database for an answer. If the answer can not be found, then the status of the slot (and the object) is changed to unknown. If this is an AND, NAND, XOR, NXOR gate, it forces the whole object to become unknown. If the object is an OR or NOR gate then other slots have to be checked until all return unknown and then the entire object is unknown.

The bottom line here is that the engine itself must generate the goals to find the value (and state) of the slots, not the programmer. This CAN be done with a forward chaining engine IF and ONLY IF the engine is programmed to do this. Haley (at one time) said that the Haley Expert Rules engine did this for you and OPSJ at one time did this for you. I'm not sure that either does it any longer since it does tend so slow things down if you don't need this.

Why would you need FOBC? Mostly for problems involving diagnostics (medical, instrumentation, processing plants, etc.) or configuration (manufacturing, computers, etc.) where you need to find all of the possibilities for your system. As you can see, this gets to be quite complex with many objects but if answer can be found with just a few backward chains, then the result would be much faster than using a FC rulebase or a "Goal-Oriented" FC rulebase.

SDG
jco

Saturday, September 27, 2008

Ethics and Money

rantBegin:

[Note added 07 Oct 2008] I received several questions about this rant. Most of them saying something like, "What the heck was that all about??" So, a word of explanation: Many of my friends and business contacts consistently look for the "financial bottom line" for a project. Nobody outside of academia does anything without money being attached and, even then, even they have to pay the rent and utilities. There is a passage in the Bible that says, "No one can serve two masters for he will either love the one and hate the other or hate the one and love the other. You cannot serve both God and Mammon." In the same vein of thought, you cannot serve both the client and the vendor for their goals are different. The vendor is there to maximize the profit meaning that they will provide the least expensive consultant and charge for a higher-priced consultant. This has always been so and so it will always be. The only solution is a "Guild" of programmers who can ensure that an IT professional is exactly what is expected by the client.

Part Two: What if you are organizing a "technical" conference and you have various levels of sponsors, each of whom wants to present a talk. Presenting a talk is not the problem - it's a good thing to have a vendor present a technical (not a marketing) talk for the attendees. BUT, if you give preference to a vendor and allow that vendor to present a non-technical talk just because the vendor is helping to sponsor the conference (especially if the vendor is a Diamond level) then you have violated the spirit of the conference. Now, back to the original rant an, hopefully, it will be more understandable:

Here's the problem: You need income, you need money to feed your family (who depend on you as the "bread winner" in the group) and you need to "do the right thing" at all times where "failure is not an option." What do you do? The answer is simple: Do The Right Thing!

Second problem: What is the right thing? If you have rules, then follow the rules or change the rules. If they rules cannot be changed then the rules must be applied to all concerned with the same degree of firmness. And, here's another point on that subject - you can NOT change the rules once they have been established for an event (for example, a conference) or a meeting or any other gathering of like-minded persons half-way through the setup and organization.

If you have a rule that a presentation MUST be technical, then it has to be technical, not a marketing piece on the wonderful advantages of doing business with that company. It cannot be a fluff piece on some aspect of a product that is not technical. It cannot be many things; it must be technical.

rantEnd:

SDG
jco

Thursday, September 11, 2008

Political Deadbeats

What a shame that we start the first blog of September with a short essay on Political deadbeats. I refer you to the Snopes rebuttal of the Joe Biden deadbeat problem at http://www.snopes.com/politics/obama/bidendebt.asp that "kind sorta" clears his name. But, in so doing, it reveals the following deadbeats and the amounts:

Sen Joe Biden, D-DL, $1,200,000
Sen Christopher Dodd, D-CT, $380
Gov Bill Richardson, D-NM, $317,000
Senator Hillary Clinton, $13,000,000
Senator Carol Moseley Braun, D-IL, $262,358
Al Sharpton, $300,000
Rep. Dennis Kucinich, D-OH, $459,000
Rep. Dennis Jucinich, D-OH, $1,100,000 (2nd Time)
Dist Atty Jeanine Pirro, D-NY
(fmr) Sen John Glenn, D-OH, $3,000,000
Mayor Rudy Giuliani, R-NY, $3,600,000
(fmr) Gov Mitt Romney, R-MA, $44,000,000

In fairness, most of what Mitt Romney owes is to himself and he had no intention of paying it back. Something to do with bookkeeping. [BTW, did you know that Bookkeeper an bookkeeping is the only word in English that has three consecutive double letters? That alone makes it a mysterious trade. :-) ]

So? Bottom line: Never "loan" money to politicians. Just GIVE it to them. Better yet, from the Bard, Plolnius speaking to his son Laertes:

"Neither a borrower nor a lender be;
For loan oft loses both itself and friend,
And borrowing dulls the edge of husbandry."

Most of those "skipping out" on debts are not congressmen but deceitful businessmen and businesswomen who gain your trust and then declare bankruptcy. Personally, I can remember only one debt that I never repaid; a $50 loan from a friend in New Orleans to help me get back to my base before I was declared AWOL - and that has eaten on me for going on 35 years now. But I could never find him when I HAD the money. So, if you're out there Ted, and you read this, send me an email with your address and I'll send you the $50.

SDG
jco

Saturday, August 23, 2008

October Rules Fest (ORF)

I spoke with the other directors of the ORF and it seems that ORF is filling up more quickly than anticipated. We now have another Silver Sponsor (thanks to Dr. Forgy of Production Systems Technology) and a few of the Bronze sponsors have moved up to Silver. Visual Rules is still the # 1 sponsor (Gold) but we are anticipating a Diamond sponsor from a major vendor as soon as marketing finishes up their annual budget and allocates the funds. Such is life in the fast lane. :-) We're negotiating with a major hotel chain for decent room rates as well as a large conference room, bar, restaurant, workout gym, etc., so that you won't have to go anywhere for anything unless you just HAVE to sample a bit of the real Wild, Wild West. We'll know by Tuesday if we have it secured or not.

The conference has guests and speakers from around the world right now; several from the UK, Canada, Australia, France, Germany, Columbia and, of course, many from all over the USA. Where else would you get a chance to meet and greet (and have a few drinks with) the major thought leaders in the rulebased community. I look at the signup list and then at the speaker list and it begins to dwell on the unreal - some of the attendees alone would be honored guests at any other conference dealing with rulebased systems. And our speakers are the creme de la creme de la creme. One speaker said that this might well be the "Woodstock of Rulebased Systems". Another likened it to the 1956 (it isn't anywhere near that level) conference at Dartmouth College where the term AI was first used.

What we really need at ORF is a really good PR guy who could tell the world what is happening here in a way that would help folks understand that this is "must attend" event. And with a price tag of only $150, why not? This will be better than attending any five-day or ten-day school hosted by any one vendor. These speakers are the people who invented all this stuff !! Check out http://www.rulesfest.org/OctoberRulesFest/Speakers.html and look at their credentials: The very people who invented Rete, Rete 2, Rete III, CLIPS, Drools, Advisor, Open Rules, OPSJ, CLIPS/R2 as well as the chief engineers and scientist from all of the major vendors. I have only one comment:

Sign up now or there might not be room later.

SDG
jco

Saturday, August 16, 2008

Blogs, Blogs and More Blogs

I added another blog to the list today - it's by Carole-Ann Beriotz-Matignon, VP at Fair isaac. She continues the EDM blog started by (probably) Paul Vincent that was continued by James Taylor and now Carole-Ann. I could be wrong about Paul. All in all, the blog isn't bad as far as commercial blogs go, but I think that she could add so much more.

I know her personally since she was my boss for almost six months. She seems to be quite quite political in her blogs since all of them reflect heavily on Fair Isaac as a corporate entity - but she could contribute so much more. Blogs on how to extract rules, blogs on letting business users control the rules (always a bad idea) and blogs on business intelligence; these are all good. But what about blogs on really technical problems that plague users or a blog on how to solve problems or a blog on theory of mathematical relationship of rules and objects or a blog on benchmarks?

Carole-Ann has it within her ability, more so I would think than any of her predecessors, to tackle the thorny issues of our industry and get really dirty with mathematical solutions and problems. Only a few other persons at Fair Isaac have her ability to closely analyze problems and arrive at solutions. One is her partner in crime, her former boss, Carlos Serrano-Morales, one of the originators of Blaze Advisor back when we all worked for Neuron Data. Another is Don Tallo, a brilliant AI guy from the old days.

I think that the Fair Isaac folks are treading lightly because of the layoffs and, maybe, fear of getting their heads chopped off if they stick them up too high. Well, live a little - after all, you only go round once in life. Step out and give us a reason to comment on the blog - something that is actually controversial, something with some "bite" in it.

BTW, both Carole-Ann and Carlos will be presenting at the October Rules Fest this year.

SDG
jco
Founder and Director for the October Rules Fest http://rulesfest.org

Friday, August 15, 2008

ORF - October Rules Fest

Greetings, Programs:

Probably once a month from now until October 21st I'll send out a blog on ORF. Yes, it sounds like a barking dog but that's how it worked out. Here's the deal: It's probably the greatest conference since 1954 BECAUSE (1) It's technical, (2) it deals with rulebased systems rather than the nondescript BRMS (Business Rule Management Systems that could be nothing more than an Excel spreadsheet - and sometimes is), (3) it's being held in the Republic of Texas near my hometown of Fort Worth, (4) it has the GREATEST SLATE OF SPEAKERS on the subject of rulebased systems since 1954 and (5) did I mention the great slate of speakers?

OK - check out http://rulesfest.org and see what I'm talking aBOUT! Check out the sponsors. Check out the speakers. Check out the abstracts. And it's being crammed into three wonderful days and nights in Texas where it is usually fairly warm in mid-October. I won't promise great weather, but usually October is really nice in Texas. Maybe next year we can have a rules fest in March in Sweetwater so that everyone can attend the Sweetwater Rattlesnake Roundup, http://www.rattlesnakeroundup.net/main/modules/page/ which is held in March of each year. Or not. :-)

Regardless, we really do have lots of buffalo, jack rabbits, ostrich, llamas and longhorns in Texas. The last night of the conference will be spent at Billy Bobs, http://www.billybobstexas.com/ - the world's biggest Honky Tonk. Three mechanical bulls to ride, lots and lots of pretty ladies in cowgirl outfits and slow talking cowboys. Oh, and lots of real, down-home country music. If you hang around until Saturday night Willie Nelson himself will be there for a $40 reserved ticket or maybe $20 if you're luck enough to get a general admission ticket that night.

Enough about Texas and Billy Bob's. What about the conference itself? If you know anything at all about rules then you know the names of Dr. Charles Forgy, Gary Riley, Mark Proctor, Daniel Selman, Dr. Jacob Feldman, Carlos Seranno-Morales, etc., etc. Check out http://www.rulesfest.org/OctoberRulesFest/Speakers.html for the complete list. The talks are ALL technical ALL the time and NO sales pitches allowed during the talks. But the major vendors will be there to talk about their product(s) - just not during the "official" presentations.

One last thing: If you really want to attend, you had better register NOW! The available space is filling up fast and the cost is only $150 for the conference itself.

SDG
jco

Tuesday, August 5, 2008

Leveling the Playing Field for Rulebase Benchmarks

Sorry about this, but the way that the blog works, I started a blog in July on this subject and just published it today. See

http://javarules.blogspot.com/2008/07/leveling-playing-field-for-rulebase.html

for the blog. Weird...

SDG
jco

2008 Bossie Awards

Greetings:

Still about as hot as Hell's Back Porch here in Texas but here's some "News You Can Use" - not the normal fluff. InfoWorld recently announced it's Best Open Source (egro, BOSsie) awards for 2008 - the whole thing is at http://www.infoworld.com/archives/t.jsp?N=s&V=107881 were you can check your favorite category. Naturally, I was interested in the best rulebased system (BRMS, if you must) aware that is at http://www.infoworld.com/slideshow/2008/08/166-best_of_open_so-6.html for those who care to read the blurb on Drools. There is another interesting one just before that at http://www.infoworld.com/slideshow/2008/08/166-best_of_open_so-5.html that deals with Parallel programming. If you are developing today and you want to be among the "elite" class of programmers, then you will have to learn how to program applications for parallel programming.

InfoWorld covered this in the same eLetter with an article at http://cwflyris.computerworld.com/t/3399854/121129892/130373/0/ that covers what and why you need to be able to program in threads in the coming world of programming. (Just when you had it all down, something else pops up - just like "Whack-A-Mole" at the fair.) True enough, you can trust the vendors to do this for you, but if you are developing your OWN software AND you hate J2EE because it took away threaded programming, now is the chance to get it back. Unfortunately, you'll have to pull out all of your old books on Java Threads and C++ threads and do your best to remember what all that did for you. But, and here is the kicker, if you do that and put in the necessary time and work, you will be among the best 1% of the best 1% of the world's best programmers, an even tighter niche that knowing rulebased systems. Hopefully, it will pay better but I'm not sure. More than likely you will have to write your own multi-threaded program (that probably won't be J2EE compliant) to make any money off this deal.

But, if you are a speed freak (like yours truly) then you probably will do it just for the fun of it. Major vendors will pooh-pooh the idea as being not practical or not really necessary ONLY because they don't want to re-architect and re-write their applications.

Congratulations to all 60 of the winners from a pool of more than 500 nominees this year. If you didn't make the list it may have been because InfoWorld was not aware of your product OR because your product is not true Open Source. (I found a couple of non-Open Source that made the list this year but not many.)

SDG
jco

Monday, August 4, 2008

Texas Heat

OK, most of you won't care about this - but you might get a chuckle or two. At any rate, it will make you appreciate what you have. And it has absolutely NOTHING to do with rulebased systems; just Texas and heat!

Recap Part 1: [Don't bother reading if you already know about it] At about 1:30 a.m. last Friday morning we had a lightening storm (some rain) move through the DFW area, mostly in the Fort Worth area. Lightening hit a transformer, took it out as well as our 33-year-old air conditioner. The blower motor burned and took out the control circuitry with it. I called the Home Warranty service at 6:00 a.m. to be first on the list. The repairman (all air conditioner contractors are working from sun up to sun down these days) arrived at 6:00 p.m. because he had been handling all of the left overs from the past few days. On Saturday morning he tried to find parts but, since it was an old Square-D unit that went out of business years and years ago, no luck. So, with the temperature at 107F/41C for Saturday and Sunday (only 106F/40C today) we hunkered down to "sweat it out." Jimmy (our son) was fortunate enough to have friend who would let him crash on his couch during the night.

Recap Part 2: On Sunday afternoon, my next door neighbor (Jim Welch) was kind enough to find a friend who loaned us his 5K-BTU (small) window A/C unit that we put in the only west-facing window in the house, the one in the master bedroom. This cooled that room down but it's only big enough for one room - maybe two small rooms. But, it really was a blessing. On Sunday night we opened the door to the hall from the MBR (shut all of the other doors) and and put a fan on the floor blowing "some" cool air into Jimmy's BR where I slept last night. Not really as cold as I like it but it was bearable. Today we shut that bedroom door and I'm blowing the air into the office so that it's in the high 70's and low 80's in here now. The rest of the house is not cooled yet but the temperature outside was only 77F/25C so we opened up some windows to cool down the rest of the house until about 9:00 when the temperature had gotten up to 97F/36C so we're now in official shutdown.

Update Part 1: Why not buy another room air conditioner???? Went out Sunday to find one. Conn's had one but no warranty from the store. It had to be returned to the store (in original packing and condition) for store credit or another unit within 24 hours. After that, you're hosed. Went to four other places but all of them were sold out of the 8K and 10K BTU units that we needed except for one store, Target. (Never would have guessed that one, would you?) Bought that puppy and brought it home. Have not installed it yet since we're waiting to see if the central unit can be fixed on Monday.

Update Part 2: This morning (Monday) the Home Warranty people called at 8:00 a.m. and said that after talking with the technician at TKO (the contractor) and because of the catastrophic nature of the damage and the age of the equipment, that the policy covered a 16 SEER rating replacement but we would have to pay the $275 to cart everything off the premises. They said to call the contractor (who didn't know what was happening) and let them know that we had talked with the Home Warranty people. Called TKO and they didn't know anything. Called the technician himself and he said that he was authorized to replace the inside unit only and that they were authorized to put a "hard start" on the outdoor unit (which they said wouldn't last long) and replace only the inside unit. (Sounds fishy, huh?)

Update Part 3: So, until this afternoon, we're still waiting on the 2nd call from the Home warranty people to confirm that it includes the outdoor unit as well. Truly, that would be a blessing from The Almighty since our outdoor unit is probably an 8 or 9 SEER.

How did we live when we were growing up in this area without an air conditioner? Simple, we had 12' ceilings, huge windows, big front porch, steep roof lines and attic fans. From 12:00 noon to 6:00 p.m. we did very little except fan ourselves and drink really sweet ice tea. AND, we didn't know any better. Remember, you never wanted a color TV until you saw the one that your neighbor had. Like the depression, everyone was miserable so that was our lot in life and we lived with it. Soldiers in Nam lived in 110F/43C heat with 100% humidity and went on patrols with 80 pounds of field gear. In Iraq and Afghanistan the troops go on patrol in 120F/49C heat (no humidity though) heat and they have full field packs, steel helmet and body armor. And they bear it because everyone else has to bear it.

Anyway, that's the news from North Texas (which is about 10 degrees hotter than South Texas) where the women are strong, the men are good looking and the children are all above average - just like in Lake Woebegone.

SDG
jco

Saturday, July 26, 2008

How Large is "Large" ??

Greetings, Programs:

WARNING: This is a (long) rambling, philosophic blog - but not a "rant" as in the past. But, if you are new to rules (or even if you have a couple of years experience) you might find it interesting.

OK, so how do mean when we use the terms "large" or "complex" when talking about a rulebase? First, let's consider the term "large" as compared to "medium" or "small." In the 80's the most advanced scientists and rule engineers wrote one of the most sophisticated medical diagnosis software (MYCIN) using a rulebase and it had 587 (or so) rules. Another, written in the late 70's and used through the 80's, was used for configuring large computer systems (REX) ad it had just over 1,000 rules. Today, most rulebase geeks, or most business analysts for that matter, think of "large" in terms of "tens-of-thousands" of rules.

But what does this mean exactly? 10K rules? 20K rules? 50K rules? A couple of years ago I asked the two major vendors what was the largest rulebased system that they had ever designed and successfully implemented. Both said that it was 20K+ rules and that most "enterprise" BRMS consisted of 10K rules or less. Today, even the "little" guys are implementing 10K+ rules by using a spreadsheet approach, called a Decision Table by the vendors, wherein each line in the spreadsheet is a rule. If the spreadsheet has 10 columns that can be true or false, then there are 2^10 decisions to be made, or about 1,024 rules. If you add one more column, they there would be 2,048 rows or rules. (By now you should have guessed that you need to keep the spreadsheets small in terms of the number of decision factors or columns.) The number of action columns in one of these spreadsheets is immaterial since the action for any one rule can be any number of things - we don't really care about that part right now.

Just by comparison, the Homeland Security Department has 500K rules now (running on an IBM mainframe) and it will probably grow to about 2M rules in the next few years. Most are VERY simple rules but the problem is the thousands and thousands of objects. If one rule matches to 10K objects and another rules matches to 20K objects then we have 30K cross-matches in those two rules alone.

A few years ago I had the privilege of dealing with one of the larger insurance companies in the UK who wanted to go into the health insurance business in a big way - they were already in the health insurance business but they were only the tenth largest or so (in the UK) in that part of their business. We looked at the number of spreadsheets that they were already writing and determined that they would have about one spreadsheet for each major complaint, one dealing with just back pain, one with just knee pain, one for just shoulder pain, all of which came under structural or skeletal problems. The knee pain spreadsheet had 512 rows, 19 CE columns and the compression came about ONLY because the vendor had just introduced a N/A or "Any Answer OK" cell for the spreadsheet. Without that, it would have thousands and thousands of rows to be considered.

So, was this a "big" system? In terms of size of the underlying rulebase, I would have say yes because it still was not finished when I left after six months and had grown to more than 50 spreadsheets of this type, some larger, some smaller. The underwriters were still laboring to get their heads around the things that they were saying and put them down on paper.

So, are the rules complex? Meaning, does the CE of each rule, or most of the rules, contain multiple forward-chaining type of propositional logic constraints? What is the average number of CEs in each rule? To answer this question I would suggest that we use the Conflict Resolution technique discussed in the Cooper and Wogrin book, "Rule-Based Programming in OPS5". The book is long since out of print but can still be purchased on-line at many locations in new or almost-new condition. For example, let's look at the following rule (done in modern English, not in the OPS5 syntax - see page 53 in the book for the original source code). If we weight a rule according to the following principles that they have given for specificity

Element Class Name = 1
Predicate Operator With a Constant = 1
Predicate Operator With a Bound Variable = 1
Disjunction = 1
Each Predicate or Disjunction WITHIN a Conjun = 1

So, using that logic for the following rule

IF there is any Student called student (1)
where
student.placed-in == null (1)
sex-is = student.sex
smoker = student.smoke
AND there is any Room called room (1)
where
number = room.room-num
capacity = room.max
vacancies > 0 and < room.max (2)
room.sex == sex-is (1)
room.smokers == smoker (1)

CE1a Element Class Name of Student = (1)
CE1b Predicate With a Constant of place-in being null = (1)
CE2a Element Class Name of Room = (1)
CE2d Each Test in Conjunction where > 0 and < max = (2)
CE2e Predicate With Constant checking for sex (1)
CE2f Predicate With Constant checking for smoker (1)

Accordingly, we can see that the specificity, which should be closely correlated to complexity, is 7 for this rule. [I have put the weighting for each line as a number in parenthesis.] Now, if we "weigh" each rule and divide by the number of rules we should be able to arrive at the overall complexity of any rule set or rulebase. There was a time when vendors not only used MEA (means ends analysis) or LEX for Conflict Resolution but they published how they did it. You won't find it in today's manuals. It seems that they basically use refraction, priority (specificity) and the order in which the rules were entered. BTW, the Cooper and Wogrin book covers in plain detail the examples of MEA and LEX. If only the vendors would put what was right before the convenience of saving time of development and fear of run-time numbers. Remember, with CLIPS, Drools and Jess you can still write your own Conflict Resolution - but that is another subject that I think that I have covered before. Would that you could get the "Big Boys" to actually do Conflict Resolution correctly. :-)

Well, if you enjoyed this, great. If not, well, it wasn't a total waste - at least you learned about another book to read. :-)

SDG
jco
(Corrected some typos on 29 July 08)

Thursday, July 24, 2008

Leveling the Playing Field for Rulebase Benchmarks

Greetings, Programs:

I have, in the past, published lots of benchmark results. Most were "fair" in my own eyes but recently Gary Riley has called my attention to the fact that they were not, in actuality, fair. For instance, some of them were done in the interpreted mode while some were done in the compiled mode. In the days of yore, I didn't have much of a choice since some of the rulebased vendors only had the compiled or the interpreted. Some would not allow external objects and others required external objects.

So, I have decided that we will start a whole new era of rulebase benchmarks. They will be broken down into several categories;

> Interpreted Rules

> Compiled Rules (usually some kind of OPS rulebase) for those that have such configurations and will include both inference mode and sequential mode

> Decision Table benchmark for Corticon, Visual Rules and other companies that use such tools.

Some companies will be able to do all three, such as ILOG (now IBM) and Fair Isaac. Others, such as Corticon and Visual Rules, will be able to do only the decision table version. OPSJ will be compiled only. I have determined that ALL of the three methods of using rules will HAVE to be able to use external objects, not internal objects. The reason for this is that "normal" business practices use external objects that have an API for calling or using these objects that adds abstraction to the objects - meaning that the objects can change, have things added to them, whatever and it should not affect in any way what happens with the old rules. New rules then can be written to access the old objects or the modified objects.

So, considering the first two categories, these would be conventional, OPS-type, IF-THEN-ELSE rules. What we don't want to do is resurrect the Miss Manners benchmark and probably not the Waltz benchmarks since both classes of benchmarks seem to rely on one rule firing over and over and over. Way too easy to cheat - and several closed-source companies have done so long ago.

But what if we came up with an NP-Complete problem that should be solved within a certain timeframe to just whether a rule engine can or can not be used within an viable commercial, business problem rule set AS WELL AS being used within the scientific and academic communities. I don't think that decision tables can do this kind of problem so we'll have to find a completely different benchmark for them, one that deals strictly with getting and reading the data, putting the data in the spreadsheet (OK, decision table) and then firing firing up the rule engine. Something like that. I'm open to suggestions so let me know if you can think of anything.

Meanwhile, congratulations again to Drools for best 2008 Open Source Rulebase/BRMS and to Fair Isaac Blaze Advisor for the best 2008 BRMS application. Well-deserved and well-earned.

SDG
jco

Thursday, July 3, 2008

Structure and Sensibility

Today's Rant:

Is there anyone out there who still remembers doing machine language? Assembly? Algol? FORTRAN, even? If so, consider yourself blessed. You had to learn how to write tight, precise code to fit into a small amount of memory, sometimes only a few Kilobytes, and squeeze out the most speed that you could. Not only that, but if you were running on the "big" IBM-360 or something of that nature, then the code had to be reviewed by your co-workers and then by your supervisor BEFORE ever running it - sometimes you even had to have a complete model of what you wanted to do before hand.

Today? No models. No reviews. Just a bunch of web-weenies slinging code hand-over-fist just to see what will happen. No design, no thought process. And, when he / she gets through with it the only question asked is, "Will it work?" If the (usually using the 20% testing covers 80% of the situations rule) test cases (let's just "assume" that there ARE test cases) produce the right result it probably will be rushed into production.

And then it happens. Somebody crashes into the system via a "little known bug" in the software. Or, because the testing was not extensive enough, the performance is crap. That's when the "fit hits the shan" and heads begin to roll. All because the business guys believed some young punk salesman (or an old silver-haired fox) who guaranteed them that it would work and perform blazingly fast. (My friend Yaakov Kohen wrote a blog on this a while back at http://yaakov2.mindpress.com on why rulebased and BRMS projects fail.)

"Those who will not learn from history will be forced to repeat it." (Was that Ben Franklin or someone else? Doesn't matter. Probably Descartes or Plato or some other philosopher from the past that our children today continue to ignore.) At point here is that we, the IT guys, the supposed "brains" of the projects, do NOT force the project managers to STOP and actually do the design work first. They (the PMs) come to the geeks and tell them, "We have to have 'something' to show for the past two weeks of work." And thinking is not something that you can show. Gathering data and rules is not, usually, something that you can show. BUT, if you make it understood up front that nothing tangible will be produced for the first 50% of the time allocated for the project (which is usually not enough time to do anything of any consequence) you still be get that same, tired, worn out line from the PM. "What do you have for me to show to the VP or CEO or some other person who controls the purse strings."

Remember when the VP was a geek? And he / she could not only understand what was happening but could ask really good, discerning questions about what was happening? And could keep the CEO off of your back until the time was right? Well, those guys are gone. Now all that we have are nit-wit, MBA bean counters who haven't the foggiest notion of anything that would help the company beyond the next two or three weeks. Long-term goals and benefits always give way to the short-term rewards that are usually accompanied by long-range disasters.

SDG
jco

Wednesday, July 2, 2008

Drools Day Camp

OK, they don't call it that, but the Drools team will be in Dallas, Texas, from October 15th to the October 21st of 2008 for seven days of Hard Core Drools. See http://blog.athico.com/2008/07/texas-october-rules-fest-and-drools.html for the "public invitation." They have sent out an invitation should you want to come and to my knowledge, it's totally free. The best part? It immediately precedes the Dallas Rules Group October Rules Fest (http://rulesfest.org) in Addison. The two events are close but they are not at the exact same location.

So, as Autumn draws to a close and Winter begins to beat on the door, come to Texas for some great food, (usually) pleasant weather, good music and not one but TWO great conferences. Mark Proctor has even found a hotel http://book.bestwestern.com/bestwestern/productInfo.do?propertyCode=44540 with decent rates (where they will be having the Drools meetings.) BTB, Addison, Texas, is in the Northern part of Dallas and has more restaurants per square mile than any other place in the world.

Monday, June 16, 2008

Parallel Rulebase Systems and Homeland Security

I first wrote about this back in November 2006, http://javarules.blogspot.com/2006/11/parallel-rulebase-systems.html in which I chatted aimlessly about Forgy and Gupta and others and what they had done. Since that time, I've been doing quite a bit of reading, all of which I will post somewhere that everyone can get the papers and read for themselves. Meanwhiile, let's take a look at what we "think" we can do before we do it.

First, most of the processing time goes into the match process - about 85% to 90% of the total time involved. Moving from there you can get about a 10 times improvement on the speed of that process alone. You can get improvements on the rest of the processes as well but they are dwarfed in significance by the match process. There is one company that has done quite a bit of work for IBM and others on parallelizing processes in C and C++, the Rapid Mind company, http://www.rapidmind.net out of the frozen north (Canada) - but they, too, can only seem to get a 10 to 1 improvement.

Two things to consider here: (1) Unless Dr. Forgy can do something that nobody else can do, we won't get much better performance on small systems using parallel rulebased systems. (2) CLIPS has showed us how to get about 250 to 1 improvement on rulebase performance using proper indexing and proper writing of code. Gary Riley (the CLIPS guy) and Dr. Forgy will be at the October [Technical] Rules Fest in the DFW area in, well, October. See http://www.rulesfest.org for more details on that one.

What I didn't discuss was what is the need for speed? Aren't most rulebased systems sufficiently fast enough as it is? The answer for the business applications, yes. But the answer for research, defense, homeland security, NO! The problem is that in the business world the match process is not terribly complicated BECAUSE the KE (Knowledge Engineer) who oversees the program won't allow it to happen BECAUSE the KE knows that the match process is the problem child of the rulebase world.

Unfortunately, you can't avoid the many objects, many patterns, many rules matching process in the "Big Boy" applications. For example, Homeland security (and I'm not telling things that are in any way a secret here) has between 500K and 2M rules, most of which are small LHS (Left Hand Side) with only a few CE's (Condition Elements) that have to be matched against thousands of ports of entry against millions of travelers. WOW! Even with TeraBytes of RAM you won't be able to process all of that in this century UNLESS you can parallelize most of it. Now this is where the match problem will really dominate.

Let's look at another problem: That one that you see on all of the crime shows so often, the DNA match process. Most of the time they are matching only a small number of DNA samples, usually less than a few thousand, and NOT matching on a national database sized sample. In the UK they match on their own database - one that is growing by leaps and bounds daily - but not on all of the EU. By the time they get a hit on a suspect, days or months later, the suspect has moved and left a cold trail behind or returned to his home country. (I use "his" rather than "her" because I've heard of very few female terrorist except for the poor, misguided Daughters of Islam who have been beguiled into becoming a human bomb.) In R&D or in psychology, the very large database of objects along with many, many rules (usually used in lieu of a neural net) would benefit from a parallel matching process as well.

OK - how can we get this financed? Banks, insurance companies, stock markets, none of them have that problem or they can code around the problem. R&D? No money. Government? Ah, there's the Honey Pot!! Now that we know where the Honey Pot is located, how can we get them (the government watch dogs) to open the lid for us? Simple - show them how it would work on a similar problem that they might have. So, on that thought, does anyone have a simple 2,000,000 rules that can be associated with 5,000 ports (5,000,000 if you include non-listed ports) along with 5,000,000 possible entries? Didn't think so. But Uncle Sam does. Now, if Uncle Sam would just let us play with this problem for a year or two, we could get Homeland Security down pat. But they won't. Not without so many bureaucratic layers that nothing will get done. So, I guess we'll just sit and wait for the mushroom clouds to show up on the horizon. Or next door. See you in ....

SDG
jco

Monday, June 9, 2008

Was Jess a CLIPS Spin-Off?

Here we go again - same article in 2006 I said that Jess was a CLIPS spin-off. It wasn't and isn't and wont' be. I suppose that I "ass-u-me"ed that it was derived from CLIPS because CLIPS came first and Jess uses the same defrule, deftemplate, etc., syntax that is used by CLIPS. It even uses the same file name extension that is used by CLIPS. And, sometimes, if it isn't too complex or too tool-specific, you can import a Jess file straight into CLIPS or a CLIPS file into Jess. (Or so I've been told.)

OK, I should have checked with the authors of the tools before I said that. BUT, in my own defense, if I saw a tool that used ILOG JRules code with the same file name extensions and the same syntax, I would HAVE to "assume" that it was a JRules spinoff. The same thing goes for Drools or any other tool.

So, just to set the record straight, Jess is NOT a CLIPS spinoff and is NOT derived from CLIPS!! Got it? Got it!! Can we close this case now? Two years later? Please?

SDG
jco

Open Source - Myths and Legends

What is "Open Source" software? Wikipedia gives this definition:

"Open source is a development methodology,[1] which offers practical accessibility to a product's source (goods and knowledge). Some consider open source as one of various possible design approaches, while others consider it a critical strategic element of their operations. Before open source became widely adopted, developers and producers used a variety of phrases to describe the concept; the term open source gained popularity with the rise of the Internet, which provided access to diverse production models, communication paths, and interactive communities.

The open source model of operation and decision making allows concurrent input of different agendas, approaches and priorities, and differs from the more closed, centralized models of development.[2] The principles and practices are commonly applied to the development of source code for software that is made available for public collaboration, and it is usually released as open-source software."

Lots of words but not what some have defined as Open Source. Some have defined Open Source according to the Free Software Foundation, aka, Richard Stallman. Others have used the Apache License as the defining criteria. Others, such as my editor with InfoWorld, maintains that if the software is free, the source code is free (or available for a nominal fee), and others are allowed to contribute to the core code, then the blinking stuff is, for all practical purposes, OPEN SOURCE!

Several have taken me to task for this definition: Jason Morris, Dr. Ernest Friedman-Hill (he of Jess fame), Mark Proctor (the Drools guy), and one or two others. They feel that Drools is Open Source while Jess and CLIPS are not. (Gary Riley has not weighed in on this one - not yet.) While I respect their opinion (and indeed I have to respect their opinion since they wrote this stuff) I do feel that if it walks like a duck, quacks like a duck, swims like a duck, has a bill like a duck and webbed feet like a duck, then a swan it ain't. Now we can have Mallard ducks, Brown ducks, Mottled ducks, Green ducks, but they are all ducks.

Quite some time ago, about November of 2006, InfoWorld ran an article on Rulebase Open Source Software in which I called Jess an Open Source product. It seems that this stirred up a hornet's nest and both Dr. Friedman-Hill and Mark Proctor let me know about it the following week at the BR 2006 Forum in D.C. Their complaint (and they both agreed) was that Jess was not true Open Source. Well, again, who is the official Open Source committee members? Richard Stallman wrote an article on this (http://www.gnu.org/philosophy/open-source-misses-the-point.html) in which he argues that the GNU General Public License should be the controlling factor.

Bruce Peren et al have come up with the following "Open Source" definition and (I think - don't know for sure) that they also copyrighted this slogan. (How can you copyright something that is not yours?):

Quote:
"Under the Open Source Definition, licenses must meet ten conditions in order to be considered open source licenses. Below is a copy of the definition, with unauthorized explanatory additions. There is a link to the original unmodified text below. It was taken under fair use.

1. Free Redistribution: the software can be freely given away or sold. (This was intended to expand sharing and use of the software on a legal basis.)
2. Source Code: the source code must either be included or freely obtainable. (Without source code, making changes or modifications can be impossible.)
3. Derived Works: redistribution of modifications must be allowed. (To allow legal sharing and to permit new features or repairs.)
4. Integrity of The Author's Source Code: licenses may require that modifications are redistributed only as patches.
5. No Discrimination Against Persons or Groups: no one can be locked out.
6. No Discrimination Against Fields of Endeavor: commercial users cannot be excluded.
7. Distribution of License: The rights attached to the program must apply to all to whom the program is redistributed without the need for execution of an additional license by those parties.
8. License Must Not Be Specific to a Product: the program cannot be licensed only as part of a larger distribution.
9. License Must Not Restrict Other Software: the license cannot insist that any other software it is distributed with must also be open source.
10. License Must Be Technology-Neutral: no click-wrap licenses or other medium-specific ways of accepting the license must be required."
/Quote

Under that definition, Jess is NOT Open Source. However, CLIPS probably gets in just under the wire. As do many other free, Open Source projects.

All of that being said to say this: My deepest and most humble apologies to anyone who has been offended by my suggestion that Jess is Open Source. But I'm still right - I'm just apologizing for offending. :-) In other words, I didn't do it and I promise never to do it again.

SDG
jco

Tuesday, May 20, 2008

October Rules Fest in Las Colinas

OK - everything is GO except for two slots still open for keynote speakers but I'm thinking that the Friday slot has been filled. No matter. The cost for all three days is only $150 but you have to buy your own lunch from one of the many fine Las Colinas restaurants. Las Colinas is the only place I know that has 12" marble curbs, and overhead mono-rail that goes to all of the major building and water taxis that cruise around the town or take you on a sight-seeing tour. What IS important is that the Rules Fest will have the following, world-class speakers on Thursday and Friday:

http://dallasrulesgroup.org/2008_October_Rules_Fest
Dr. Charles Forgy (Inventor of Rete, Rete 2 / III, OPS, OPSJ, etc.)
Dr. Daniel Levine (One of the ANN God Fathers)
Dr. Rick Hicks (Validation and Verification Guru for past few decades)
Mark Proctor (Inventor of Drools)
Gary Riley (Inventor - with Dr. Girratano - of CLIPS)
Daniel Selman (ILOG JRules Guru)
Edson Terelli (Complex Event Processing guru)
Michael Neal (Drools guru speaking on BRMS in Drools)

Remember - This is a TECHNICAL conference, not a sales pitch for any one product NOR is it a business seminar to teach about rulebased systems to non-technical persons. This is a conference for the geeks, those lads down in the dungeons of darkness where the sun never shines but they are the ones that keep the wheels of progress turning.

There WILL be a day of tutorials on Wednesday covering introduction, history, rule architecture, etc. but that's all part of the $150 fee. If you don't need it they you're just helping out some folks who do need it. :-)

Check out the web page next week to register but this week the DRAFT Agenda is posted. Enjoy,

SDG
jco

Wednesday, May 7, 2008

Yaakov - you dog, you!

Well, Yaakov Kohen is at it again. Ranting and Raving and Raging against the machine. Check out http://yaakov2.wordpress.com/category/rule-stuff/ for his latest blast against the BRMS Vendors, sometimes called the Commercial Bandits of California since most of them are based there.

Anyway, it seems that he feels that the BRMS Vendors are playing games with what is ordinarily a great tool, a rulebased system that has grown into what we call a Business Rule Management System. Who know? He might be right... Check it out. According to an earlier iChat he is going to go after the vendors one at a time with an "expose" kind of thing that promises to tell all about all of them. Enjoy,

SDG
jco

Tuesday, April 22, 2008

October Rules Fest in Las Colinas

Greetings:

Thanks to Yaakov for keeping this running while I did my time with a major vendor.

The Dallas Rules Group ( http://www.dallasrulesgroup.org ) will be sponsoring the first October Rules Fest in Las Colinas, a suburg of Irving, Texas located between Dallas and Fort Worth, Texas, on October 23rd and 24th. Some of our guest speakers will be Dr. Charles Forgy, Dr. Rick Hicks, Mark Proctor, Gary Riley and others as they accept. We will be accepting the first 100 students free (first-come, first-served) who pre-register and have a valid student ID card.

Looking forward to seeing all of you there.

SDG
jco

Thursday, January 24, 2008

EDM / BRMS versus Rulebase

EDM - Enterprise Data Management - the Holy Grail of all businesses with more than 10 employees.  BRMS - Business Rules Management System - how to manage your business using business accessible tools.  Rulebase - the underlying engine for the BRMS previously mentioned.

First: BRMS could technically be nothing more than a sheet of paper.  More sophisticated systems could be nothing more than SQL-driven database or a spreadsheet, whether electronic or manual.  A "Rulebase", on the other hand, is something that is NOT strictly business related, but could be used by R&D, Engineering, Mathematics, Business, Doctors, Psychology, Philosophers - pretty much anyone who had a really complex problem that need solving.

Unlike SQL and BRMS that are fairly procedural in the thought process, a rulebase is characterized by two things; the rules can be incomplete AND the rules can be entered in a random process sometimes called Declarative Programming.  This is how the mind operates, not how a business operates.  A rulebase was originally developed to emulate how the mind thinks - ramdomly and adding or deleting rules as needed to solve a particular problem.  This is what is know as non-monotonic nature of a rulebase.  

Now, why write about something so mundane when there still exists the P != NP / P = NP problem?  Well, it's because WAY too many people in our world seem to think that a BRMS is the same thing as a rulebase.  They aren't!  The BRMS is a special case of the rulebase and, fortunately or unfortunately, it's the BRMS that pays the bills.  Unfortunately, the business guys (you know, the ones with all of the money) are the ones who dictate the direction of the rulebase world.  

So, it's high time for the Geeks to take control and make the rulebase once again predominate.  The business guys have had plenty of time to screw things up - and BOY! Have they ever!  Project after project after project has failed because the business guys or the IT Java geeks got control of the project and turned it into something that the originators never though would happen; a project that was driven by just dumping rule after rules after rule into the pot without any "real" thought process whatsoever.  To even suggest that the company rules are in error is usually met with scepticism and derision.  But, my experience has shown that the thought "process" of business rules is normally in error.  I have tried on project after project after project to direct the process to the "why" rather than the "how" of a solution.  

So, the next time someone mentions using a BRMS for a new project, ask them WHY they want to do this?  If it is so that the business department can control the rules, RUN!

SDG
Yaakov

Friday, December 14, 2007

Conflict Resolution in Rules

Probably the initial work done in Conflict Resolution (CR) for rulebased Systems (RBS) was done by Charles Forgy and John McDermott and published in the collection of papers "Pattern-Directed Inference Systems", edited by D.A. Waterman and Frederick Hayes-Roth way back in 1978. (This was my "bible" in grad school.) Anyway, since that time, several other books have come out, the best of which IHMO is "Rule-based Programming with OPS5" by Thomas Cooper and Nancy Wogrin, published in 1988. Both are long since out of print but can still be found on the internet. Even Giarratano and Riley spend very little time with CR since it's considered by most to be something that we thought about a long time ago and should not need

The first one is a rather high-level book that is far more general than most of us would want to read. The second, however, is very down-to-earth and easily understood by most rulebase guys. In particular I would recommend chapter three where the difference between the LEX and the MEA strategies are explained. But, back to the original point, what exactly do we mean by CR and why do we need it? The first book explains, in excruciating detail WHY we need it; sensitivity of control and stability of rules. But HOW to accomplish this? Some RBS allow you to set your own strategy. Some have it pre-programmed in to the system. Some don't have it at all. But, for now, let's take the Cooper and Wogrin approach, explain it, and later we'll expand on it.

When the system is first initialized, along with setting up the Rete network, the system sets up an Agenda Table wherein the rules that the Left Hand Side (LHS) all evaluate to TRUE are kept and adjusted between cycles. These rules are "ordered" in the following manner:

Refraction (any rule already fired is not eligible to fire again)
Recency (based on the time stamp)
Specificity
Arbitrary

What they did not consider was either priority or ruleset membership. So, just for arguments sake, let's add those.

Refraction (any rule already fired is not eligible to fire again)
Priority
Recency (based on the time stamp)
Specificity
Ruleset
Arbitrary

The hardest of all to understand is the one on Specificity. For each of the following, a count of +1 is given to the rule based on the LHS for

An element Class name
A Predicate Operator with a constant (such a x <= 3)
A Predicate Operator with a "bound" variable
A disjunction such as << a b c d >>
Each predicate of disjunction within a conjunction

An example is that

{ <=> symbol << yes no maybe . >> }

counts as two in the specificity count. Normally, the CR doesn't get much beyond recency. So, why do we need CR? (I think that this is where we started...) Stability and Control. What I have discovered is that systems without a CR strategy do poorly in benchmark tests while those that at least have a depth strategy do much better. In the older systems you could set the strategy to see which one got the better response. AND it helped to see if you got a different answer using a different strategy. If you did, then that helped GREATLY when trouble shooting - you shouldn't get a different answer if the rules are constructed properly but, as Cooper and Wogrin point out, you surely can get a different answer.

SDG
Yaakov

Thursday, December 13, 2007

Truth or Consequences?

At what point does one tell the truth to a client? Or to anyone, for that matter? So often we see a company motto of something like "Our Customers are Number ONE" or "Customers Come First" or ... Well, you get the idea. The problem is that the customer doesn't really want to hear the truth. The customer wants to hear that things are going to be just grand, the the project will be on time and under budget, that there will be no problems, that you will exceed all of the stated goals (even though IT goals are, at best, nebulous), that the bottom line will improve dramatically, and that everyone will get a promotion and huge pay raise because of this wonderful project. Nirvana. Doesn't happen!

So, now that you are in the position of telling the truth or losing the order to another firm that you know is lying through their teeth, what do you do? The answer is (you knew it all along but wouldn't admit it, right?) that you walk away. That's right - walk away. If the customer wants you to lie now then the customer will lie about you later and, when the job goes belly up, you will be the one to blame. A consultant lives and dies on his/her reputation. A company is only as good as what it can do to help the customer. And if a 2nd or 3rd rate company has to lie to get the contract, then let them have it.

True, the customer WON'T call you back later - not normally. That would be to admit a mistake. But maybe they will listen to the next company or person who has to walk away rather than agree to everything and do nothing but take the money and run. If your integrity is for sale, then you lose that integrity on the first sale. And you never get it back. And you won't make as much money as the guys who lie, cheat and steal from their clients. But, in the end, you will be a much happier person.

I think that this will be the last in our line of philosophical blogs. From now on, lets' deal with rulebased systems, the Rete Algorithm, neural nets, statistical analysis - hard core stuff that we can all comment about.

Happy Chaunnuchah
(Yeah, it's over now)
SDG

Yaakov

Wednesday, December 5, 2007

CLIPS and Waltz 50

Greetings:

I finally got around to doing a really simple task - that of just checking the latest claim by some guys that CLIPS 6.30 ran with extra-ordinary speed. OK, it does. I think - but it uses internal deftemplates rather than going through the laborious process of creating external objects like those of us in the "real world" have to do. My experience with Jess is that using a deftemplate that is associated with an external object almost doubles the time it takes. My suspicion is that it would double again if the deftemplate were removed from the internal code entirely. So that will be my task for this coming month - to migrate the CLIPS Waltz-50 benchmark to pure external objects. And to create the testing for the WaltzDB-16 that is even harder than Waltz-50.

Meanwhile, here are the results for the test run that I did on my Mac Core 2 Duo laptop (2 GHz, 2GB of RAM) - if you see where I made a mistake somewhere, let me know. I did compare it to the OPSJ and JRules rules for Waltz-50 and CLIPS is doing some things that you cannot do with Java. Things like getting the arc-tan of an angle so quickly - and, yes, Java does have arc-tan and things like that in the Math class, but doing Math in Java is slower than in C. Java has to work at things like that. So, after I re-write either the Java benchmark or the CLIPS benchmark so that they are both pretty much the same, I'll re-run and re-test all of these. Meanwhile, here is the test result using the code provided with CLIPS 6.30. Two other things that I would like to do is to run CLIPS against Mark Proctors new benchmark as well as against our new 10K Data Cleansing benchmark. (I need to finish writing that one because I don't CARE if you cheat or not - just how fast can you get the answer. It's a good one for the business world if I ever finish it.)

CLIPS> (load waltz.clp)
Defining deftemplate: stage
Defining deftemplate: line
Defining deftemplate: edge
Defining deftemplate: junction
Defining defglobal: MOD-NUM
Defining deffunction: atan2
Defining deffunction: get-y
Defining deffunction: get-x
Defining deffunction: get-angle
Defining deffunction: inscribed-angle
Defining deffunction: make-3-junction
Defining defrule: begin +j+j
Defining defrule: reverse_edges +j+j+j
Defining defrule: done_reversing =j+j+j
Defining defrule: make-3_junction +j+j+j+j+j
Defining defrule: make_L =j=j=j+j+j
Defining defrule: done_detecting =j+j+j
Defining defrule: initial_boundary_junction_L +j+j+j+j+j+j
Defining defrule: initial_boundary_junction_arrow =j+j+j+j+j+j+j
Defining defrule: second_boundary_junction_L +j+j+j+j+j+j
Defining defrule: second_boundary_junction_arrow =j+j+j+j+j+j+j
Defining defrule: match_edge +j+j+j+j
Defining defrule: label_L =j+j+j+j+j
Defining defrule: label_tee_A =j+j+j+j+j
Defining defrule: label_tee_B =j=j+j+j+j
Defining defrule: label_fork-1 =j+j+j+j+j+j
Defining defrule: label_fork-2 =j=j+j+j+j+j
Defining defrule: label_fork-3 =j=j=j+j+j+j
Defining defrule: label_fork-4 =j=j+j+j+j+j
Defining defrule: label_arrow-1A =j+j+j+j+j+j
Defining defrule: label_arrow-1B =j=j=j+j+j+j
Defining defrule: label_arrow-2A =j=j+j+j+j+j
Defining defrule: label_arrow-2B =j=j=j+j+j+j
Defining defrule: label_arrow-3A =j=j+j+j+j+j
Defining defrule: label_arrow-3B =j=j=j+j+j+j
Defining defrule: label_arrow-4A =j=j+j+j+j+j
Defining defrule: label_arrow-4B =j=j=j+j+j+j
Defining defrule: label_arrow-5A =j=j+j+j+j+j
Defining defrule: label_arrow-5B =j=j=j+j+j+j
Defining defrule: done_labeling =j+j
Defining defrule: plot_remaining +j+j+j
Defining defrule: plot_boundaries =j+j+j
Defining defrule: done_plotting =j+j+j
TRUE
CLIPS> (load waltz50.clp)
Defining defrule: startup +j+j
TRUE
CLIPS> (watch statistics)
CLIPS> (reset)
CLIPS> (run)
14065 rules fired Run time is 1.03537487983704 seconds.
13584.4516550506 rules per second.
9097 mean number of facts (10806 maximum).
1 mean number of instances (1 maximum).
2298 mean number of activations (12616 maximum).
CLIPS>


SDG
Yaakov

Thursday, November 29, 2007

Senior?

OK, what does it mean to be a Senior anything? In the normal use of the word, a Senior Citizen is someone over 50. That's the only qualification - age. However, in the technical world, usually it means 10+ (sometimes 15 or 20) years of experience AND someone who is at the top of their profession. In the Java world, a Senior Consultant is "normally" someone who knows OO design, most of the Java API, is usually (not always) certified at one level or the other, and has been a team lead on at least one enterprise project using Java and/or J2EE and/or Spring, etc.

But what about the rulebase world? Where do we draw the line between a "Senior Consultant" and an "Architect" - or is there any difference? What follows here are just my thoughts and not anywhere referenced - so feel free to reference this blog as authoritative. Since I'm over 40 (OK, over 50) and have 23 years experience in IT (yes, since 1984) and another 10+ years prior to that with experience in Electrical Engineering - so I have the longevity if nothing else. Does that alone make me a "Senior" anything? Nope. Not even the 15 or 20 published articles and white papers would server to "officially" make me a Senior consultant without considering their context, audience, etc.

General Patton once commented that he had a mule that had been through two world wars and many battles, but the mule was still a mule. Time alone is not sufficient. The "Senior" rulebase consultant must have been recognized by his/her peers (in the industry, not just with in the company) as someone with exceptional expertise in something to do with rules and/or a rulebased system. And, that person should have experience with MORE than just one particular rulebase tool or one vendor. In addition, that person should have experience with presentations, demonstrations, talks, and, mot of all, at lease ONE SUCCESSFUL enterprise design work that has held up for several years. Installing a rulebase system is easy - any Java monkey can mimic what has been learned in a one-week class and install a system. BUT that system should still be in place, albeit with modifications, two or three years later.

So, what can we, as the industry "leaders" do to correct this all-too-obvious problem? We can demand (probably without results but we don't know until we try) to have a certification board across all vendors that would be vendor-agnostic that would verify and validate a candidate. A written exam is a rather silly way to do this since we have proven over and over (Microsoft and Sun are the latest victims of this craze) that written exams mean nothing. I have seen non-programmers study for and take the Sun Java Programmer certification and pass the first time. I have also seen experienced Java programmers, who did not study for the exam, fail.

Some of the best consultants in the rulebase industry have not one single written exam proclamation on their wall to proclaim their proclivity and productivity in a given field. Except, maybe, for a Masters Degree or a Ph.D. - but even that is not usually on the wall. No, what we need is to have agreement among the techies of all of the vendors (something close to Nirvana) that would be sufficient to satisfy all. I'm thinking of something like a Master's degree thesis or a Ph.D. thesis level of a white paper submitted to the panel - not some project paper but something that requires thinking and thought application.

So, here's my suggestion: Take this idea to the President or CEO of your company and explain that a "Senior" position means nothing today. But, if we could all get agreement on the meaning of that title and validate that person's claims to being a "Senior Consultant" then the company would be able to charge basically twice what they have been getting in the past for the services of that person. Customer would benefit because they KNOW that the person on their project has been examined (not tested - examined) and found to be one of the best in the world. This would mean that a potential rulebase project would have a 90% or better chance of success rather than the 40% or less that we are getting today. Now, how much is a 50% probability of success worth to a client or to a vendor? Let's have some fun and find out.

Rulebase Conflict Resolution

In the book (rather old now) "Pattern Directed Inference Systems" D.A. Waterman and F. Hayes-Roth made the comment in the "Overview" part that, "Linear growth in computation time with the size of the data base (sic) or the the number of production rules is avoided by only considering data in the active part of memory when rules are applied and by associating with each node a list of rules that reference the node. When the node is activated the associated rules are selected for consideration. Thus the number of rules being tested against memory at an time depends on the number of currently active nodes rather than the size of the production system."

John McDermott and Charles Forgy continue this line of thought on page 177 with a section called "Production System Conflict Resolution Strategies" where they explain how a good CR strategy supports the rulebase interpreter by processing the rules in a manner such that only certain ones are selected. This is an excellent example of using meta-rules. In this short, article-length section they discuss CR, sensitivity, stability, special case rules, recency rules, evaluation, etc.

Although they don't discus this in detail in the limited space made available to them, most vendors seem to feel that there are two major approaches in selecting the next rule - width or breadth. Not true. The major approach should be either LEX - Lexigraphical (as in ILOG JRules) or Means Ends Analysis, MEA - as in OPSJ and others. MEA is basically an extended and enhanced version of LEX. The first example of using the Rete Algorithm (OPS) the inventors used LEX but in later versions this was improved with MEA. There is a good discussion of MEA and LEX in the book by Cooper and Wogrin in their book "Rule-Based (sic) Programming With OPS5." This is something more for vendors than for programmers unless you are using a rulebase that allows you to select your own method of CR.

Without a good CR approach, you will find that the engine spends way too much time thrashing around. Once the Agenda Table is built, depending on the CR, then selecting the next rule is a piece of cake for the engine. In addition to CR there are a lot of other topics that we, the rulebase community should be considering and I'll put all of that in another post later.

SDG
Yaakov

Tuesday, November 20, 2007

Freddie Mac loses $2B - AGAIN

See http://biz.yahoo.com/ap/071120/earns_freddie_mac.html for reference.

The last time it was a $2B (OK, maybe $1B) error in bookkeeping. This time, they once again have made some "errors in judgement." So, to correct the problem they aren't going to restructure anything - that would mean admitting that what they had put in place was really bad. Instead they are going to hire Goldman Sachs and/or Lehman Brothers "... to help it examine possible new ways of raising capital in the near future." Fannie Mae, their sister company, is having the same problems for the same reasons.

This is what happens when you put in a rulebased system (extensively) into a company with cheap labor, no thought process other than "Gitter Done" and just dumping rules into a rulebase because they look good at the time. I'm really familiar with this system only because they tried to get me to work on the project (I refused) and later tried to get m to test the project (I refused) and later still tried to get me to debug the project (and I refused the third and last time) when they refused to allow me to re-write it properly. This is what I mean when I say that rules are declarative and should not be applied in a procedural manner as was being done there. Decision Table on top of Decision Table on top of Decision Table. There are times when you have to walk away from a project to protect your own fragile reputation as a rulebase Architect.

They tried to hire some first class people a long time ago to help but only paid $40/hr including expenses. In McLean, Virginia. About the same expense scale as London, Berlin, or NYC. They tried to hire some of my friends - they refused as well. The ones that I know who did go there soon left with horror tales of mis-management and abuse of the BRMS tool that they were using on various projects. Unfortunately, the vendor had little control over what they did since they would not hire the vendor's professional services either.

Monday, November 19, 2007

Blogs on top of Blogs

Well, my buddy Mark Proctor has been really busy blogging about ruleflow and (slight oblique reference to Drools documentation on that subject) work flow and how the two things make it easier for business guys to state their problem. I agree with the ruleflow documentation in that a ruleflow is only PART of the overall solution. So, where's the catch?

If you give a man a fish, he will eat today. If you teach him how to fish, he'll never go back to work. OK, bad analogy. How about having a hammer and everything looks like a nail? If you give business people spreadsheets - what we call decision tables but it's still a spreadsheet to them - or a ruleflow - what looks like a typical workflow engine to them - then THAT'S what they will do (and only that) because it is very familiar and it just "feels right". What can I say? We gave them the gun, they shot themselves in the foot with it, and then we blame them for doing it. And we, the rulebase community, claim that we told them the right way to do and that they just messed it up.

OK, all of the above is procedural programming. You can't get around it. It's just another way to do Java or C++ or COBOL or VB or C# or whatever else procedural language is being used. And that is NOT a rulebase because a rulebase is, primarily, declarative programming. Why, oh WHY can't we, the guys who are supposed to know better, still pushing decision tables, decision trees and ruleflow as answers to complex problems. It probably IS an answer to a specific business problem, but not all problems can be solved that way - which is why we invented a rulebase in the beginning; to solve complex problems that defy conventional, procedural programming.

Bottom line? Don't use a hammer when a screw driver is better suited for that purpose. Sure, the hammer will work to drive a screw into a wall, but it won't hold up very long. A screw will work better. (Don't get snarky on me - sometimes a screw is just a screw and not anything sexual.) And PLEASE do say that I'm against ruleflow, decision tables, decision trees, work flow, etc. I'm not. But a rulebase project just HAS to have it boundaries and applications just like any other tool. Use it properly or it will backfire and kill you.

OK, maybe it's off the subject of what Mark was originally trying to write about. But we just HAVE to draw the line somewhere and it's up to me, Mark, Peter, Dr. Forgy, Haley, ILOG, Fair Isaac, etc., etc., to start drawing and try to write "quality" business - projects that have a chance of being extensible, expandable, and all of the other "-able" handles. BTW, here are the links to Marks stuff so you can read it for yourself. You might start with the first two. The others are along the same lines.

The blog link
http://blog.athico.com/2007/11/vision-for-unified-rules-and-processes.html

The Drools documentation
http://docs.jboss.com/jbpm/pvm/

Another blog on same subject
http://www.dzone.com/links/a_vision_for_unified_rules_and_processes.html

And yet one more - pretty much the same thing in a different wrapper
http://digg.com/software/A_Vision_for_Unified_Rules_and_Processes

SDG
Yaakov

Sunday, November 18, 2007

Obama - TUCC - NOI

OK, this isn't a normal blog about rules but I only have the one blog space. Normally, I don't write about politics - those guys are WAY too obvious in what they say and mostly about what they don't say. But Obama seems to be working both ends against the middle. He attends Trinity United Church of Christ, TUCC, in Chicago where he is very active in the church and the pastor is a close confident - all of this part taken from his press releases. I came across this trying to de-bunk some stuff that was coming from my right-wing Christian friends but when I went to Snopes I found

http://www.snopes.com/politics/obama/muslim.asp

Sorry, but I find it really, really hard to even THINK about a candidate, whether white, black, yellow, pink or purple, whose own church would be so racially biased as this one. The Black Value System is just one step removed from that espoused by the Black Muslim and their leader, Louis Farrakhan.

http://www.tucc.org/black_value_system.html

A VERY flattering bio of Louis Farrakhan by the Nation of Islam, NOI, is available on-line at
http://www.noi.org/mlfbio.htm

A Not-Quite-So-Flattering, and fairly long, documentary about Louis Farrakhan is found on a "New Politics" issue from the Southern Illinois University-Ewardsville, publication on the Rise and Decline of Louis Farrahkan:
http://www.wpunj.edu/~newpol/issue22/chajua22.htm

Finally, there is a rather neutral entry on Wikipedia that deals with the issue of Farrakhan without calling names at
http://en.wikipedia.org/wiki/Louis_Farrakhan

Now, am I saying the the TUCC is the same as NOI? Short answer, no. Long answer, No Way. But, it looks like TUCC is walking a mighty fine line between being mainline Christian and could slide down the slippery slope of extreme racism like the NOI.

But, back to the main issue: According to his own press release, Senator Barak Obama has a personal relationship with Christ. Unfortunately, he also steadfastly maintains that he not only attends the Trinity United Church of Christ in Chicago, but also ascribes to their social and religious values. Read this carefully and if you don't agree with me, fine. If you do, then pass this along to whomever might benefit from it. If you don't have access to a high speed, the text is printed below.

Me? If Obama makes it to the White House, I'm thinking seriously about immigrating to Denmark. It would be worth having to learn Danish and Danish history just to get away from all of the drain bamaged librals here in the USA.

Wait a minute! I'm from Texas now. We can secede from the Union - legally. Sounds good to me. And then we (Texas) could make the remaining 49 states our trading partners along with the Federal Government in Washington. Hey - and maybe get some of that foreign aid money from Washington. You know, the billions that they pour into other countries they could give to us. It should be a whole lot more than we're getting right now. :-)

SDG
Yaakov

Friday, November 9, 2007

Weekly Blogs

It's been said by those who have lots to say that if you have a blog then you shold blog daily. Some do it several times a day. I can't do that. But, I shall try (note the word "try") to do this weekly. And this blog technically counts as this weeks blog. :-)

Benchmarks: So, what has happened this week in the wonderful of Rulebased System benchmarks? Well, for one thing, the past week has been one of rapid-fire comments about benchmarks from Ming Lin (Traveloicity), Mark Proctor (Drools), Peter Lin (Independent Consultant), and Daniel Selman (ILOG). Not many other weighing in so I will see if I can get some time to run some of those benchmarks as well as fire up the old Telecom bencmarks. That should stoke the fires considerably.

New Things out and about rulebased systems: Versata has a new release 6.3.0. Visual Rules now runs with Eclipse. Paul Haley is still MIA - meaning we can not seem to find out where he finally settled down outside of Haley Systems. Mark Proctor et cie are at a Drools conference. Willie Hall (formerly Neuron Data, formerly Blaze Software, formerly Mind Box) has followed Johnathan Halprin and Marty Saulenas in the Mind Box exodus to Fair Isaac's green pastures. James Taylor (formerly at Fair Isaac) is now promoting Open Source - after a fashion. Jess has a new verison,7.0p2, out now. Have not heard much from ILOG on the official front recently except for news blurbs where they got this deal or signed that contract.

Open Source: Lots of different definitions here but, personally, I think that the Apache license is probably the most open of all and the one to which I, personally, subscribe. For example, I "could" (not that I would) take the source for Drools, rename everything and re-write the screens, and then call it "Texas Rules" - and it would be quite legal from what I have heard about the Apache license. Mark Proctor would know more about this than would I. Anyway, it seems quite neat and many companies are finding out that if they want to be in the software business rather than the banking busines (for example) that they can have their own proprietary version of most any Apache software - and re-sell it to their industry.

BTW, if any of you are in the insurance market, it seems that ACORD, http://www.acord.org , is THE company for de facto global e-commerce standards for insurance. This little company, pretty much unknown outside of insurance folks, was called to my attention by Daniel Brookshier who works for No Magic, an OO design company. He seems to think that they really are straight up and above board. Maybe we could have something like that for rulebased systems? But the customers would have to lead the charge on this one - not the vendors. Anyway, check it out and see what you think.

Next Week: We'll be talking about parallel rulebase systems and (maybe) statistical analysis of applications for the insurance industry that is based on the MYCIN work done back in the late 80's. Both interesting topics. And more on Benchmarks. I promise.

Meanwhile, remember, "To thine own self be true" is a nice thought - but being true to God is even more important. :-)

SDG
Yaakov

Saturday, November 3, 2007

Benchmarks - Final Bleat

OK, here's my final bleat on rulebase engine benchmarks. (Right - YOU believe me, don't you?) Anyway, benchmarks cannot, should not, be done by the vendor but rather by some independent party; a firm that does not have any vested interest in any of the outcomes other than the truth and fairness of play. If a vendor produces the benchmark, then the vendor would have to allow anyone (and by that I mean someone outside of the company, including the competitors of said vendor) to double check those figues, even if it means supplying a time-bombed version of the software to the company or person double checking the facts.

If the benchmarks are produced by a company other than the vendor, the the company should be totally independent of that vendor, someone at "arms length." This means that a company that is a "partner" of the vendor could not produce those benchmarks. However, if the company were a company that simply "used" those products in the normal performance of the business of the company then that would not only be OK but preferred. (Someone like a consulting company that is NOT a partner with any of the rulebase vendors, for example.) However, a company who did NOT use a rulebase in the pursuit of its normal business normally would not be eligible either since that company probably would not have the expertise on-board to discriminate between tests and understand if and when one vendor tries to "cheat" on the tests. And vendors do cheat.

On the subject of cheating, all vendors should be held accountable to the same standards. For example, if one vendor is allowed to use compiled code (in an form except compiling the Java or C or C++ classes themselves) then the other vendors should be allowed to do the same thing. An example of this is the compiling of the rules into Java that is run with a JIT compiler. OPSJ has ONLY this method of running the OPSJ rules. With JRules, Blaze Advisor and others it is an option. Drools and Jess can be run in interpreted mode only and so have put themselves in an unfair position. Corticon and others are NOT based on the OPS format of most benchark rules and they, also, sometimes have an advantage and sometimes a disadvantage. The comany doing the benchmarks has to do everythingl possible to make sure that the playing field is level and, where it isn't, point that out to the readers. (Ergo, the reason for the pure independence of the benchmarking company.)

Also, the company producing the benchmarks should not only make the code and data readily available, but should also produce meaningful benchmarks; meaning that Miss Manners has about run its course and probably should be dropped from contention. It's nice to see the results, but the test itself is way to easy to cheat, whether in the code itself or "under the covers" with optimization aimed strictly at that benchmark. (Yes, some companies have been doing that for years and we, the poor schmucks in the industry, have just now caught on.)

OK, let's assume that my company (KBSC) ran the benchmarks. We're independent. We aren't partners with anyone, much to our financial loss. We do NOT produce any kind of variant of the rulebase in questions. We showed our code. What else can we do to ensure the integrity of our results. Here are some vairants that should be posted with the benchmark:

Machine Name
Machine Model
Machine Speed
Machine RAM Total
Machine RAM available (did something else have the machine busy at the time?)
The command line used to run the tests
(the -Xmx and -Xms and -server mean something to the machine)
Operating System and version
Java, C++ or C# version used
Number of "warm up" cycles
J2EE or EJB used
(if so, which one and which version and show setup)

There are lots of variables in running a benchmark. Everyone must be shown because one vendor runs better on one OS and another vendor runs better on another OS. The same thing applies for the Java version used, J2EE, etc. Unfortunately, since I (personally) left the independent arena, lots of folks have jumped into the gap but few can step up to the plate and meet all of those requirements on all of the benchmarks that they produce. (OK, Steve Nunez is trying really hard but Illation is, after all, not only a partner with ILOG but produces their own knowledge software as well.)

How do we fix the independent benchmarking problem? Well, we need an independent agancy. And it must be like UL or ACORD (the de facto global e-commerce standards body for insurance) but designed for testing a rulebase and evaluating a BRMS; and we need it now! So, here's a thought: What IF we (the industry) did the following? We, the industry and customers, form an independent laboratory. Companies (vendor and/or customers) with 1,000 or more employees would contribute $50K annually toward such an organization. Companies with 100 - 999 would contribute $20K annually. Individuals would contribute $100 per year for membership. This would entitle them to the results of any and all tests being run, input to the company for fairness (but they would have to agree that the sole arbiter of any dispute would be the benchmarking company) and monthly reports on what's happening. Stockholders, if you will, but non-voting stockholders.

And the company itself would deal with anything to do with BRMS, including evaluation of products, benchmarks, an annual ranking of products based on various criteria such as speed, integration with other products, technical support, initial costs, professional services effectivenss and their costs and anything else that might impact the customer. Vendors, of course, would be expected to contribute on the same scale as those companies subscribing to the service. (OK, I took a page out of Forrester's book!!)

[Personal grousing time] The reason that I had to leave the pure independent route was that I financially could not survive and do pure research - and nobody in the BRMS market would step up to the plate and provide the wherewithal to be independent and still survive. I even tried (in cahoots with InfoWorld) to form a company that would do what I described above but IW and the reset of the BRMS vendors couldn't see an advantage for them nor the readers. Well, maybe the readers of this blog can see what such an outfit could do to help the poor sod customers by showing them who's who and what's what BEFORE they try to do it themselves.

SDG
jco

Tuesday, October 30, 2007

Benchmarks - AGAIN !!!

This is in reference to Daniel Selman's posting on Meta-Policies where he quietly snuck in some references to benchmarks that were totally out of whack.

I turned all of my benchmarking for InfoWorld over to Steve Nunez back in late December 2006. BUT, as I recall, I did run a BUNCH of tests - over and over and over again - before I released all of it. The last published results still can be found at http://www.kbsc.com/Performance2006.xls - and for JRules "optimized" versus JBoss. Daniel shows Waltz (I can only guess that it's Waltz 50 or something like that) for JRules and Drools as

JRules: 2.65 seconds
Drools: 170.578 seconds

WRONG!!! I did these on earlier versions and the speed hasn't improved dramatically since that time. What I got way back then on a WinXP at 2.0 GHz was

JRules: 3.703
Drools: 14.187
Blaze Advisor: 2.266
OPSJ: 0.703

Drools 4.x is much improved but I have NOT re-run the benchmarks. Mark Proctor has and (I actually trust his results) reports that they have just about halved the previous times.

BTW, it should also be noted that, to my knowledge and not a fact stated from ILOG, that the "optimized" version of JRules is nothing more than compiled sequential rules - which should give great results. But compiled sequential loses the versatility of straight Rete rules where we can add rules wherever we like. If you look at my old spreadsheets, the straight Rete version of JRules puked (ran out of memory) on the 6.1.1 version. I would hope that the later versions are better but I seriously doubt it.

Blaze Advisor has several methods of running as well: Rete, Rete 2 (or Rete III) or Compiled Sequential. Compiled Sequential will "usually" run just a bit faster than Rete III in most commercial applications. BUT, compiled sequential, in my own humble opinion, is a violation of most rulebased principles. I mean, after all, why not do it in Java or C++ or even VB??? Sorry, I'm from the old school where a rulebase is part of the AI environment. Assembly (or plain-jane C) will usually run faster than most anything else.

So, if speed were the ONLY consideration, throw out the rulebase and use Assembly. And hard code it on a chip - bypass the OS completely. BUT, if you want intelligence, versatility Yaakov Kohen and not as any kind of representative of any company.

DS has never me a MetaPolicy he didn't like

Daniel Selman wrote a neat article on Meta: MetaPolicies, MetaRule, MetaData, etc. See http://blogs.ilog.com/brms/author/dselman/ for the whole thing.

I rather like the idea that he proposes in "over-riding" rules and things of that nature. I would think, however, that it might be easier to structure the rules in some kind of architecture using a common ruleset such that you don't have to override rules. Perhaps all of the common rules in one ruleset, then another ruleset that selects the appropriate attribue for each State (USA thing) or Country or whatever so that the proper rate is applied. It probably is more a matter of personal preference but two things I don't really like: Overriding rules and Inheritance of rules. Sooner or later, you get into trouble with which one does what and when.

Everything is new again

OK, FINALLY got the autority to post to Javarules at Google again. And, yes, I like the name and I think I'll keep it. Lots of things have happened since 2006. I've accepted a position with Fair Isaac - yes, I sold out to the dark side of corporate life. I've worked on about 8 or 9 projects since then.

Also, started to do some work on using statistics formerly used in MYCIN to help with "forecasting" in Insurance Underwriting. Meaning, how to "predict" that a person will be a good risk or bad risk from certain data.

Also, doing some work on a book with the Forgenator - a "how to" book on BRMS.

Finally, getting started on doing some work on parallel rulebase systems, a subject that has been around for 20 years now but no one has really done anyting with it in the past.

So, now that Google has finally straightened out my problems with access to my blog, I'll be back. :-)