Thursday, June 26, 2014

BRMS Benchmarks - Decision Camp 2014

Greetings:

Once again we will be covering BRMS Benchmarks, this time at Decision Camp 2014 in San Jose, CA.  I covered most of the BRMS Benchmarks in a previous article (above). The new benchmarks for 2014 come from a series of benchmarks known as “NP complete” benchmarks where NP stands for Non-deterministic Polynomial-time.  We have started using these this year, (3Q2014) since we have found that Manners and/or Waltz to be either (1) easy to cheat or (2) that the benchmark fires only one or two rules over and over.  Manners is guilty on both accounts.  So, this year we have include both the Clique Problem and the Vertex Cover Problem for starters.  Later we can expand this to other NP Complete problems. 

Either of these problems can be converted to Java or C syntax but, for starters, I plan on implementing these in Drools, Jess, CLIPS, Smarts, ODM and Blaze Advisor.  That should be enough for comparisons for this year.  Dr. Forgy has been kind enough to have already provided the initial code for these two NP-Complete problems in OPS syntax that we should be able to convert to Java, C/C++ or C#.   Or BASIC for that matter.  If you would like to work on the OPS syntax, here is his suggested code for the LHS of the rules.  If you do work on it, and would like to submit your code without copyrights (except for Apache Copyrights) for the presentation (with appropriate credit, of course) then please send to me.  Thanks.

-----------
CLIQUES:
(find (size 4))
(node (number ?n1))
(node (number ?n2&:(> ?n2 ?n1)))
(edge (from ?n1) (to ?n2))
(node (number ?n3&:(> ?n3 ?n2)))
(edge (from ?n1) (to ?n3))
(edge (from ?n2) (to ?n3))
(node (number ?n4&:(> ?n4 ?n3)))
(edge (from ?n1) (to ?n4))
(edge (from ?n2) (to ?n4))
(edge (from ?n3) (to ?n4))

VERTEX COVER:
(find (size 4))
(node (number ?n1))
(node (number ?n2&:(> ?n4 ?n3)))
(node (number ?n3&:(> ?n3 ?n2)))
(node (number ?n4&:(> ?n4 ?n3)))
(NOT (edge (from ?x&~?n1&~?n2&~?n3&~?n4)))

These assume that every link between two nodes is represented by two edge objects, one for each direction.
----------

Shalom,
jco

No comments: